Skip to main content

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

Hi, Lars-Fredrik, this sounds more like an issue with WebSphere Liberty's JPA runtime integration rather than a problem with Eclipselink.  If you have a support contract with IBM my first suggestion would be to open a PMR about the problem.  If you are using Open Liberty without a support contract, then please open an issue at Open Liberty's Github at https://github.com/OpenLiberty/open-liberty 

On Thu, Dec 7, 2017 at 3:03 AM, Lars-Fredrik Smedberg <itsmeden@xxxxxxxxx> wrote:
Hi!

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 17.0.0.3 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 8.2.1.6.3 Jar Files in JSR 338 JPA 2.1, it states that

    app.ear
     war2.war
     WEB-INF/lib/warEntities.jar
     WEB-INF/classes/META-INF/persistence.xml

    persistence.xml
    <jar-file>lib/warEntities.jar</jar-file>

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 = "">out/artifacts/test/test.war!/WEB-INF/classes/lib/test.jar]

BUT....

...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?

Regards
LF




--
Med vänlig hälsning / Best regards

Lars-Fredrik Smedberg

STATEMENT OF CONFIDENTIALITY:
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.

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top