Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Predeployment of PersistenceUnit [. . .] failed
Predeployment of PersistenceUnit [. . .] failed [message #1065806] Thu, 27 June 2013 14:29 Go to next message
Hannes Kühtreiber is currently offline Hannes KühtreiberFriend
Messages: 21
Registered: June 2013
Junior Member
Hello everybody,

I am fairly new to EclipseLink and I try to complete a mapping consisting of several orm.xml files.

after adding one more mapping file to the persistence.xml, I get the following exception:
Exception in thread "main" Local Exception Stack: 
Exception [EclipseLink-30005] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: sun.misc.Launcher$AppClassLoader@11b86e7
Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [EclipseLinkTest] failed.
Internal Exception: java.lang.NullPointerException
	at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:127)
	at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactoryImpl(PersistenceProvider.java:107)
	at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:177)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
	at controller.Test_Biooffice_Classes_old.test_contact(Test_Biooffice_Classes_old.java:114)
	at controller.Test_Biooffice_Classes_old.main(Test_Biooffice_Classes_old.java:34)
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [EclipseLinkTest] failed.
Internal Exception: java.lang.NullPointerException
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.createPredeployFailedPersistenceException(EntityManagerSetupImpl.java:1950)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1941)
	at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:98)
	at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactoryImpl(PersistenceProvider.java:96)
	... 5 more
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [EclipseLinkTest] failed.
Internal Exception: java.lang.NullPointerException
	at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:230)
	... 9 more
Caused by: java.lang.NullPointerException
	at org.eclipse.persistence.internal.jpa.metadata.MetadataDescriptor.setJavaClass(MetadataDescriptor.java:1775)
	at org.eclipse.persistence.internal.jpa.metadata.MetadataDescriptor.<init>(MetadataDescriptor.java:287)
	at org.eclipse.persistence.internal.jpa.metadata.MetadataDescriptor.<init>(MetadataDescriptor.java:294)
	at org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings.initPersistenceUnitClasses(XMLEntityMappings.java:581)
	at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.initPersistenceUnitClasses(MetadataProcessor.java:295)
	at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processEntityMappings(MetadataProcessor.java:559)
	at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:581)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1865)
	... 7 more


I also had minor problems with the previous mappings, but the previous error messages contained some hints what was wrong.

But this time I cannot pin it down - any Idea would be very helpful!!
pretty desperate by now!
Hannes

Should I post the mapping? I am afraid it is fairly long ...
Re: Predeployment of PersistenceUnit [message #1065899 is a reply to message #1065806] Fri, 28 June 2013 08:05 Go to previous messageGo to next message
Hannes Kühtreiber is currently offline Hannes KühtreiberFriend
Messages: 21
Registered: June 2013
Junior Member
well, figured this one out myself. Embarrassing but interesting at the same time, so for the benefit of someone who might have the same problem:

It was a typo in the class name:
wrong:
<orm:entity class="lumo.core.biooffice.Impl.TaxonImpl" name="Taxon">
correct:
<orm:entity class="lumo.core.biooffice.impl.TaxonImpl" name="Taxon">

just a case of Uppercase '.Impl.' versus Lowercase '.impl.'

The interesting bit is that if the class is totally wrong there is some form of (albeit misleading *) explanation in the error message, but in this case it was totally unspecific.

cheers
Hannes

(* if eclipselink cannot find the class it complains it cannot find the getter of the first attribute it comes across. but thats close enough Wink

[Updated on: Fri, 28 June 2013 08:33]

Report message to a moderator

Re: Predeployment of PersistenceUnit [message #1066634 is a reply to message #1065899] Wed, 03 July 2013 14:06 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Please log a bug, a better exception should occur than a null-pointer.


James : Wiki : Book : Blog : Twitter
Previous Topic:How to customize the update query?
Next Topic:missing Embeddable
Goto Forum:
  


Current Time: Tue Apr 23 16:15:28 GMT 2024

Powered by FUDForum. Page generated in 0.02611 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top