Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] How to use EclipseLink Native API with JPA

I appreciate all the replies, but when I try to use Eclipselink sessions and
unitOfWork to create or modify a managed entity, I get the following error:

Local Exception Stack: 
Exception [EclipseLink-7009] (Eclipse Persistence Services - 1.0 (Build 1.0
- 20080707)): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Missing descriptor for [class java.lang.Class]. 
Verify that the descriptor has been properly registered with the Session.

I can get sessions and acquire unitOfWork from the JPA EntityManager, and I
can even query for entities without any problem. However, when I try to use
transactions and call commit on a session or unitOfWork, I get the error
noted above.

This leads me to believe you can't use EclipseLink extensions using just
persistence.xml, annotations and orm to describe your persistence entities.
It seems you also have to use sessions.xml and project.xml and Eclipselink
descriptor files - an XML nightmare I'd rather avoid. Is the documentation
wrong on this?

As for the issue of weaving, if the JPA spec already includes the capability
for lazy loading of entities, why is weaving necessary if Eclipselink is my
persistence provider? Is this true of other persistence providers? I don't
recall ever having to use it for the original TopLink implementation in Java
EE. I don't believe it's required for OpenJPA or Hibernate, either. Weaving
seems to me to be a serious problem for developers, since it modifies
original code, with who-knows-what side affects, and makes debugging
practically impossible.

Maybe it's a Spring thing?
-- 
View this message in context: http://www.nabble.com/How-to-use-EclipseLink-Native-API-with-JPA-tp19761716p19802833.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top