I’m having a big problem with JPA when I try serialize objects with JSON-Struts2 plugin.
I have the next exception:
Exception Description: An attempt was made to traverse a relationship using indirection that had a null Session. This often occurs when an entity with an uninstantiated LAZY relationship is serialized and that lazy relationship is traversed after serialization. To avoid this issue, instantiate the LAZY relationship prior to serialization.
This is caused ’cause some parameters are lists and these lists have objects with other lists..
There is a way to inicializate all lists without modify the object facade?… or another option.. serializate only some parameters with JSON
Solved using string list instead the whole object