I'm trying to get the size of a collection of entities within a web page.
I receive this error:
[LazyInitializationException] failed to lazily initialize a collection of role:
I understand this is because the hibernate session is closed after a http request, but I don't understand why or the process behind this. I also don't know how to correct this without forcing the Set to have an Eager load.
Can anyone point me in the right direction to read up on the first/give me an explination, and could anyone directly explain how to resolve the issue correctly.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060921#4060921
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060921
I don't really understand what are you trying to do. Usually you should just end() a taskInstance for the related token to continue to the next node in the graph, unless it's not signalling. Looking at your code, you are loading the taskinstance and a token independently. Then, you get the last available transition and signal the token to get through it, because the while just goes through the transition list obtained before.
Maybe you can explain further the objective you are trying to accomplish to understand the problem better.
Finally, if it helps anyway, I believe the error you are seeing is telling you that the taskInstance you are trying to save doesn't have a related task, or the task assigned as a property doesn't exist in the database.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060918#4060918
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060918