I use Spring's openSessionInViewInterceptor to handle opening and closing
Hibernate sessions.
It seems to work fine when I hit pages directly. However, when I have a wicket
POST that then redirects to a response page, I get
Unexpected RuntimeException
...
Caused by: org.hibernate.HibernateException: collection was evicted
at
org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:40)
at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1422)
at
org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:171)
at
org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:48)
at org.hibernate.collection.PersistentSet.size(PersistentSet.java:110)
...
My guess is that it's because RequestCycle.onBeginRequest (where I re-attach
some objects to the session) is called once for the pair of requests, while
openSessionInViewInterceptor is called for each part.
Does anyone know if that's the case?
*More importantly, is there any Wicket function that's called for each
part of the request that I can use instead of onBeginRequest?
Thanks,
Dan
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user