From my perspective as a frequent JPA user: If I specify jar-file elements in the persistence.xml, I want them to be searched for managed persistence classes, and any mapping metadata annotations (as stated in the JPA 2.2 spec). Thus, then a specified JAR is not present (on the classpath or the location specified), I would expect a failure rather than a warning. If annotated classes are missing (due to a missing or wrongly packaged JARs), the persistence unit isn't fully operable and will imho fail at a later point. Best,Richard Z Am Montag, den 30.11.2020, 15:17 +0100 schrieb Jean-Louis Monteiro: > Got some feedback on the issue .... > Looks like glassfish is doing some kind of pre-processing and > cleanup. > https://github.com/eclipse-ee4j/glassfish/blob/master/appserver/persistence/jpa-container/src/main/java/org/glassfish/persistence/jpa/PersistenceUnitInfoImpl.java#L266 > > If a file does not exist, it's just ignored.Should we also have the > same behavior? > Currently, if you do a bad job with packaging, it fails and you need > to fixyour errors. In glassfish, it prints a warning and keeps going > even thoughthe behavior is completely different from what is > expected. > I'm still inclined to send a PR to fix the TCK packaging instead > ofhiding user errors. > --Jean-Louis Monteirohttp://twitter.com/jlouismonteiro > http://www.tomitribe.com > > > On Mon, Nov 30, 2020 at 10:09 AM Jean-Louis Monteiro < > [email protected]> wrote: > > Thanks Richard for the feedback. > > I created https://github.com/eclipse-ee4j/jakartaee-tck/issues/580 > > andupdated TomEE ticket for tracking--Jean-Louis Monteirohttp://tw > > itter.com/jlouismonteiro > > http://www.tomitribe.com > > > > > > On Fri, Nov 27, 2020 at 3:24 PM Zowalla, Richard < > > [email protected]> wrote: > > > Hi, > > > seems the JARs are really build with that name missing the > > > "_jarfile" [1]part of the files specified in the persistence.xml > > > [2].Just discussed it with @mawiesne - seems to be inconsistent. > > > BestRichard > > > [1] > > > https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/jpa/ee/packaging/jar/build.xml > > > (line27, 58 and 64)[2] > > > https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/jpa/ee/packaging/jar/persistence.xml > > > > > > > > > Am Freitag, den 27.11.2020, 11:14 +0100 schrieb Jean-Louis > > > Monteiro: > > > Sorry missed the screenshot for the EAR content[image: image.png] > > > BTW, here is the link to the TomEE JIRA. > > > https://issues.apache.org/jira/browse/TOMEE-2931 > > > > > > > > > > > > --Jean-Louis Monteirohttp://twitter.com/jlouismonteiro > > > http://www.tomitribe.com > > > > > > > > > On Fri, Nov 27, 2020 at 11:11 AM Jean-Louis Monteiro < > > > [email protected]> wrote: > > > Hello, > > > As mentioned, I'm currently working on JPA to address the TCK > > > issues.I'm facing one where I'd like to get some feedback. I > > > think it's again aTCK bug that's why I would appreciate some more > > > eyes before opening achallenge. > > > The test is com.sun.ts.tests.jpa.ee.packaging.jar.Client --> > > > https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/jpa/ee/packaging/jar/Client.java > > > > > > This error is this one > > > Caused by: > > > Exception > > > [EclipseLink- > > > 28018 > > > ] (Eclipse Persistence Services - > > > 2 > > > . > > > 7 > > > . > > > 4 > > > .v20190115- > > > ad5b7c6b2a > > > ): > > > org.eclipse.persistence.exceptions.EntityManagerSetupException > > > > > > Exception > > > Description: Predeployment of PersistenceUnit [CTS-EM] failed. > > > > > > Internal > > > Exception > > > : > > > java.lang.RuntimeException > > > : > > > java.io.FileNotFoundException > > > : /Users/<path>/jakartaeetck- > > > prebuilt-8.0 > > > . > > > 2 > > > /release/jakartaeetck- > > > prebuilt-8.0 > > > . > > > 2 > > > /dist/com/sun/ts/tests/jpa/ee/packaging/jar/jpa_ee_packaging_jar_ > > > vehicles/lib/jpa_ee_packaging_jar_jarfile1.jar (No such file or > > > directory) > > > > > > at > > > org.eclipse.persistence.exceptions.EntityManagerSetupException.pr > > > edeployFailed(EntityManagerSetupException.java:233) > > > > > > ... > > > 63 > > > more > > > > > > Caused by: > > > java.lang.RuntimeException > > > : > > > java.io.FileNotFoundException > > > : /Users/<path>/jakartaeetck- > > > prebuilt-8.0 > > > . > > > 2 > > > /release/jakartaeetck- > > > prebuilt-8.0 > > > . > > > 2 > > > /dist/com/sun/ts/tests/jpa/ee/packaging/jar/jpa_ee_packaging_jar_ > > > vehicles/lib/jpa_ee_packaging_jar_jarfile1.jar (No such file or > > > directory) > > > > > > at > > > org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.l > > > oadStandardMappingFiles(MetadataProcessor.java:491) > > > > > > at > > > org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.l > > > oadMappingFiles(MetadataProcessor.java:400) > > > > > > at > > > org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitPr > > > ocessor.processORMetadata(PersistenceUnitProcessor.java:619) > > > > > > at > > > org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.prede > > > ploy(EntityManagerSetupImpl.java:2003) > > > > > > > > > > > > If we open the EAR file and look at the persistence.xml it indeed > > > has 2jar-file entries. Great.But if we look at the file name and > > > compare it to what's on the left side(EAR content), we can see > > > that the jar file name is not fully the expectedone. > > > Before 1 and 2, there is a "jarfile" in the persistence.xml > > > I don't see how it could work.What do you think? > > > > > > > > > > > > --Jean-Louis Monteirohttp://twitter.com/jlouismonteiro > > > http://www.tomitribe.com > > > > > > -- > > > > > > --
smime.p7s
Description: S/MIME cryptographic signature
