Dear Gemini JPA maintainers,
When using Gemini JPA outside of eclipse, the BundleArchive
class fires a NullPointerException :
Caused by: java.lang.NullPointerException
at
org.eclipse.gemini.jpa.eclipselink.BundleArchive.getEntries(BundleArchive.java:71)
at
org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.getClassNamesFromURL(PersistenceUnitProcessor.java:434)
at
org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.buildClassSet(PersistenceUnitProcessor.java:118)
at
org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:90)
at
org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactoryImpl(PersistenceProvider.java:96)
Besides the lack of null check at line 71, this bug can be fixed
by changing the call to findEntries line 67 :
- bundle.findEntries(".","*.class", true);
+ bundle.findEntries("/","*.class", true);
This seems to me that "/" actually makes more sense
here, as we look for all classes in the bundle, and as I
don't know how "." is interpreted here.
A patch, in which I also added a null check, is
attached to this mail
Regards,
Matthieu Foucault