Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363543

Summary: Jar file refs not resolved when placed in Ear
Product: [WebTools] Dali JPA Tools Reporter: Chris Stodden <chris.stodden>
Component: JPAAssignee: dali.general-inbox <dali.general-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: neil.hauge, paul.fullbright
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Chris Stodden CLA 2011-11-10 18:53:13 EST
Build Identifier: M20110909-1335

Given a persistent unit jar:
HRjpa.jar Containing:  META-INF/persistence.xml
entities/Employee.class
entities/Country.class

Given an Ear Application Project with JPA/EJB Project.

Where HRjpa.jar is in APP-INF/lib, the JPA/EJB Project persistence.xml jar-files from Persistent Editor General tab does not display this jar.

Reproducible: Always
Comment 1 Neil Hauge CLA 2012-04-09 17:48:08 EDT
Sorry for the lack of comment on this...

You may have to type in the jar file location that will work with your environment in some cases, but looking for comment from Paul on whether this is something we could/should support.
Comment 2 Neil Hauge CLA 2012-05-09 14:51:22 EDT
Looking at this again.  I have reread your comment and am a bit confused.  Getting a jar file into this list on the General tab requires the user to specifically add the jar to the persistence.xml.  It would not just end up in that list as there is no defaulting with jar refs.

It also sounds like you are building an application with more than one persistence.xml, which is an advanced case.
Comment 3 Neil Hauge CLA 2013-04-16 14:53:44 EDT
Just reviewing some older bugs.  I think the issue here is a configuration issue.  Dali (JPA facet) should be used in the project that builds the HRjpa.jar, and not in the EAR application project in the case you describe.  jar-file refs are for identifying classes to pull into a persistence unit, not to define one.  Using the JPA facet in the EAR project just adds confusion.  Closing this for now, but let me know if you need more assistance configuring this application.