ObjectDB ObjectDB

@Entity saved in Tomcat session - problem

#1

Hi,

I have found a problem, when storing @Entity object in Tomcat session. When starting or stopping Tomcat, I get nasty exception - please check attached log. Strange thing is, that after this exception everything works perfectly fine. The problem appears after using Enhancer.

The nasty solution is to create copy of @Entity class as normal POJO and use it to store in session. The problem is, that we need the same logic for temporary users (without storing in DB) and permanent users (stored in database). A separate POJO makes the whole logic quite complicated.

Any thoughts on this?

edit
delete
#2

The exception indicates an attempt to serialize an entity object (when Tomcat stores the session before shutdown) that failed due to an inverse (mapped by) field in the entity object.

Version 2.0.3 should fix this serialization problem. Please try it.

Notice that after stopping and starting Tomcat entity objects in the session will be detached.

Thank you for this report.

ObjectDB Support
edit
delete

Reply

To post on this website please sign in.