Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] NPE on entity-listeners metadata merging

Hello all,

I'm facing an issue when upgrading from EclipseLink 2.2 to 2.3 (same issue with 2.4 and 2.5-M1). Predeployment of my PersistenceUnit failed with a Null Pointer Exception on merging orm descriptors.

This happens when I have both the default META-INF/orm.xml descriptor and a custom one (defined in the PU descriptor) defining a PU default entity-listener element on the same class.

Kindly find bellow the stacktrace.

I can provide you a sample project that reproduce it.

Regards,
Loïc

Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.3.v20120629-r11760): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [EM-2] failed.
Internal Exception: java.lang.NullPointerException
at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:127) at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:115) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:125) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:73)
    at tests.persistence.Main.main(Main.java:46)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.3.v20120629-r11760): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [EM-2] failed.
Internal Exception: java.lang.NullPointerException
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1402) at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:98) at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:105)
    ... 8 more
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.3.v20120629-r11760): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [EM-2] failed.
Internal Exception: java.lang.NullPointerException
at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:221)
    ... 11 more
Caused by: java.lang.NullPointerException
at org.eclipse.persistence.internal.jpa.metadata.ORMetadata.shouldOverride(ORMetadata.java:680) at org.eclipse.persistence.internal.jpa.metadata.ORMetadata.mergeORObjectLists(ORMetadata.java:505) at org.eclipse.persistence.internal.jpa.metadata.xml.XMLPersistenceUnitDefaults.merge(XMLPersistenceUnitDefaults.java:229) at org.eclipse.persistence.internal.jpa.metadata.xml.XMLPersistenceUnitMetadata.merge(XMLPersistenceUnitMetadata.java:171) at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.setPersistenceUnitMetadata(MetadataProject.java:1824) at org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings.processPersistenceUnitMetadata(XMLEntityMappings.java:822) at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processEntityMappings(MetadataProcessor.java:510) at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:522) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1337)
    ... 10 more



Back to the top