Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Problem adding managed persistence classes using the jar-file element in persistence.xml


I have a problem adding managed persistence classes using the jar-file element in persistence.xml. I can get it to work (but it looks wrong), see below.

My environment is Websphere Liberty Profile running EclipseLink 2.6.4 (bundled). 

My application is packaged as JAR files placed in a WARs lib directory (I deploy a WAR not an EAR). The persistence.xml, mapping file etc is placed in WEB-INF/classes/META-INF

I follow example 5 section Jar Files in JSR 338 JPA 2.1, it states that



When I use the above configuration it startup without error but blows up at runtime with the following error message in the logs (trace and message log, no ffdc)

Internal Exception: java.lang.RuntimeException: url = "">


...if I change the jar-file path to: ../lib/test.jar instead of lib/test.jar I get the following during startup

CWWJP0024E: The ../lib/test.jar Java archive (JAR) file specification for the test persistence unit is incorrect.

But now it works fine in runtime...

Note: None of the examples in the JSR 338 has a <jar-file>../lib/warEntities.jar</jar-file>

Any ideas?


Med vänlig hälsning / Best regards

Lars-Fredrik Smedberg

The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
address(es) and may contain confidential or privileged information. If
you are not the intended recipient, please notify Lars-Fredrik Smedberg
immediately at itsmeden@xxxxxxxxx, and destroy all copies of this
message and any attachments.

Back to the top