Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » EclipseLink-7242
EclipseLink-7242 [message #484854] Wed, 09 September 2009 09:53 Go to previous message
Mauro is currently offline Mauro
Messages: 79
Registered: July 2009
Member
Hi,

I'd like to change the jpa implementation of all systems of my company
from Openjpa to Eclipselink.
No big deal until start to test lazy loading relationship and get this
exception:

Exception [EclipseLink-7242] (Eclipse Persistence Services -
1.1.2.v20090612-r4475):
org.eclipse.persistence.exceptions.ValidationException
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 exception happens whenever I call an EJB that returns an entity with
a lazy relationship from outside the EJB container (webservice or web).
Sometimes I don't want to 'instantiate the LAZY relationship prior to
serialization.', because I don't want to work with the relationships.
Openjpa returns a empty Collection in those cases. Eclipselink returns a
Linked List that returns this exception when I try to use it.

Is there a way to configure Eclipselink to have the same behavior of
OpenJpa.

Thanks. Mauro.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:not support executeThreadRuntime
Next Topic:release plans
Goto Forum:
  


Current Time: Tue Jun 18 01:00:32 EDT 2013

Powered by FUDForum. Page generated in 0.18562 seconds