I m run my java class through java command then lazyinitialization exception problem occours:-
(LazyInitializationException.java:19) ERROR org.hibernate.LazyInitializationException - failed to lazily initialize a collection o
f role: com.trilogy.mobilechurn.data.user.User.usernumbers, no session or session was closed
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.trilogy.mobilechurn.data.user.Use
r.usernumbers, no session or session was closed
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.jav
a:358)
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistent
Collection.java:350)
at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:97)
at org.hibernate.collection.PersistentSet.size(PersistentSet.java:114)
at com.trilogy.mobilechurn.dataservices.user.UserDataServiceImpl.getUsernumber(UserDataServiceImpl.java:167)
at com.trilogy.mobilechurn.dataservices.user.UserDataServiceImpl.getUsernumber(UserDataServiceImpl.java:149)
at com.trilogy.ybb.services.message.sms.SMSService.getUsernumber(SMSService.java:473)
at com.trilogy.ybb.services.message.sms.SMSService.send(SMSService.java:345)
at com.trilogy.ybb.services.message.sms.SMSService.send(SMSService.java:323)
at com.trilogy.mobilechurn.SMSCampaign.SMSRunner.runSMS(SMSRunner.java:149)
at com.trilogy.mobilechurn.SMSCampaign.SMSRunner.main(SMSRunner.java:183)
|