Win a copy of Securing DevOps this week in the Security forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to solve JSON exception error [org.hibernate.LazyInitializationException: failed to lazily init]  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to get a list of objects using JSON. To get the list of objects, I implemented the lists using hibernate and struts2. If i execute the code in the console then i am getting the exact result. Bu if i tried to get the result then I am getting the following error. What is actual problem to execute the code:



And my codes are like the following:

Hibernate implementation:



and JSON action class implementation:




Can anybody tell me the reasons for getting the exceptions.

Thank you
 
Do you want ants? Because that's how you get ants. And a tiny ads:
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!