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 fix your errors. In glassfish, it prints a warning and keeps going even though the behavior is completely different from what is expected. I'm still inclined to send a PR to fix the TCK packaging instead of hiding user errors. -- Jean-Louis Monteiro http://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 and > updated TomEE ticket for tracking > -- > Jean-Louis Monteiro > http://twitter.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. >> >> Best >> Richard >> >> [1] >> https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/jpa/ee/packaging/jar/build.xml >> (line >> 27, 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 Monteiro >> http://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 a >> TCK bug that's why I would appreciate some more eyes before opening a >> challenge. >> >> 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.predeployFailed(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.loadStandardMappingFiles(MetadataProcessor.java:491) >> >> >> at >> org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.loadMappingFiles(MetadataProcessor.java:400) >> >> >> at >> org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:619) >> >> >> at >> org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:2003) >> >> >> >> >> If we open the EAR file and look at the persistence.xml it indeed has 2 >> jar-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 expected >> one. >> >> 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 Monteiro >> http://twitter.com/jlouismonteiro >> http://www.tomitribe.com >> >> -- >> >> >>
