Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » eclipselink doesn't find my persistence.xml
eclipselink doesn't find my persistence.xml [message #538027] Fri, 04 June 2010 14:43 Go to next message
ambassador is currently offline ambassador
Messages: 4
Registered: June 2010
Junior Member
Hello there I'm new here.

I am using EL nightly 20100604 under jdk1.6_20. If I start my programm directly through Eclipse it works fine.
When I start the jar of this programm it doesn't find the persistence.xml outside (but in the classpath).

Some more information:
PersistenceUnitProperties.ECLIPSELINK_PERSISTENCE_XML is set to the canonical path of the file.
The file must be out of the jar, because it should be rebuilt before EL starts.

I figured out, that the PersistenceUnitProcessor calls loader.getResources(descriptorPath). It returns almost the right, but index of the CompoundEnumeration is set to 2. So EL ignores the PU entries of my file and I get a PersistenceException "No Persistence provider for EntityManager named"

Has anyone an idea what to do? Should I file a bug?
Re: eclipselink doesn't find my persistence.xml [message #538470 is a reply to message #538027] Mon, 07 June 2010 16:56 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Make sure that the eclipselink.jar is on your classpath.

Otherwise, please include your persistence.xml and the exception stack trace.


James : Wiki : Book : Blog : Twitter
Re: eclipselink doesn't find my persistence.xml [message #538721 is a reply to message #538027] Tue, 08 June 2010 13:32 Go to previous message
ambassador is currently offline ambassador
Messages: 4
Registered: June 2010
Junior Member
i got some help from the mailing list, but i finally found a solution on my own.
thanks anyway

this thread could be closed

[Updated on: Tue, 08 June 2010 13:33]

Report message to a moderator

Previous Topic:HistoryPolicy: INSERT Error with missing fields
Next Topic:XML Composite Object Mapping problem
Goto Forum:
  


Current Time: Tue Oct 21 17:02:13 GMT 2014

Powered by FUDForum. Page generated in 0.05496 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software