Hello,
I have tried to change the version from 2.0 to 3.0, but I have this error:
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: it.eminds.data.Basket.servizi, no session or session was closed
I think, this because, after search, I close the session, and then I use the object "Basket" for read that!
But why with 2.0 it works?!
This is the log:
Hibernate: select this_.id as id4_1_, this_.bookID as bookID4_1_, this_.utente as utente4_1_, this_.carteDiCredito as carteDiC4_4_1_, this_.cliente as cliente4_1_, this_.spedizione as spedizione4_1_, this_.dataBooking as dataBook7_4_1_, this_.bookId_Gest as bookId8_4_1_, this_.pos as pos4_1_, servicebas1_.id as id5_0_, servicebas1_.pax as pax5_0_, servicebas1_.RQBook as RQBook5_0_, servicebas1_.RSBook as RSBook5_0_, servicebas1_.RSPrev as RSPrev5_0_, servicebas1_.Type as Type5_0_, servicebas1_.idServizio as idServizio5_0_, servicebas1_.failed as failed5_0_, servicebas1_.invoiceNumber as invoiceN9_5_0_, servicebas1_.notaNumber as notaNumber5_0_, servicebas1_.startDate as startDate5_0_, servicebas1_.correlation as correla12_5_0_ from Basket this_ inner join serviceBasket servicebas1_ on this_.id=servicebas1_.uid and this_.bookID=servicebas1_.ubookID where this_.bookID=?
11:55:04,806 ERROR otalogger:9627 - BASKET: Errore durante l'elaborazione della richiesta xml
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: it.eminds.data.Basket.servizi, no session or session was closed
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:246)
at it.eminds.data.Basket.toString(Basket.java:369)
|