Community
Participate
Working Groups
Build Identifier: 20100917-0705 The following exception is thrown when trying to deploy generators with different names and types defined in the mapping XML: Exception in thread "main" Local Exception Stack: Exception [EclipseLink-30005] (Eclipse Persistence Services - 2.1.0.v20100614-r7608): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: sun.misc.Launcher$AppClassLoader@1ef6a746 Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100614-r7608): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [DaliRuntimeProj] failed. Internal Exception: java.lang.NullPointerException at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:126) at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:133) at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:65) at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source) at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source) at dali.runtim.Runtime.main(Runtime.java:14) Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100614-r7608): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [DaliRuntimeProj] failed. Internal Exception: java.lang.NullPointerException at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1005) at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:88) at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:124) ... 4 more Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100614-r7608): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [DaliRuntimeProj] failed. Internal Exception: java.lang.NullPointerException at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210) ... 7 more Caused by: java.lang.NullPointerException at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.addSequenceGenerator(MetadataProject.java:573) at org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings.process(XMLEntityMappings.java:526) at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processEntityMappings(MetadataProcessor.java:463) at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:437) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:959) ... 6 more Reproducible: Always Steps to Reproduce: 1. Define a sequence generator and a table generator with different names at the mapping file level in the mapping XML 2. Try to run the application Note: The same exception is thrown with the following cases: - table generator at the mapping file level in the mapping XML + sequence generator at the mapping level in the Java entity - table generator at the entity level in the mapping XML + sequence generator at the entity level in the Java entity
We should triage this issue for the next patch.
This has been fixed in 2.3.1, please upgrade your version. Otherwise a workaround would be to add pk-column-value="" to your table generator specification. *** This bug has been marked as a duplicate of bug 351791 ***
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink