Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Static Weaving failed with NPE
Static Weaving failed with NPE [message #1517622] Fri, 19 December 2014 16:34 Go to next message
Jens Reimann is currently offline Jens ReimannFriend
Messages: 29
Registered: June 2013
Junior Member
Hi,

I have an OSGi bundle, which also acts as a Persistence Unit.

Now since I don't get dynamic weaving working propertly with Gemini JPA, I tried with static weaving instead.

I enabled static weaving from the project settings, added EclipseLink as JPA Library and get the following exception in the console view:

The weaving properties are:
SourceClasses: bin
TargetClasses: bin
Persistence XML Root: META-INF (does not matter if empty or META-INF)

Exception in thread "main" Local Exception Stack: 
Exception [EclipseLink-40007] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.StaticWeaveException
Exception Description: An exception was thrown while weaving: [Ljava.lang.String;@76a0416a
Internal Exception: Exception [EclipseLink-30009] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while trying to load persistence unit at url: file:/home/jens/Development/workspace_opm/pkgrepo/de.dentrassi.pm.storage.jpa/META-INF/
Internal Exception: Exception [EclipseLink-30004] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while processing persistence.xml from URL: file:/home/jens/Development/workspace_opm/pkgrepo/de.dentrassi.pm.storage.jpa/META-INF/
Internal Exception: java.net.MalformedURLException
	at org.eclipse.persistence.exceptions.StaticWeaveException.exceptionPerformWeaving(StaticWeaveException.java:138)
	at org.eclipse.persistence.tools.weaving.jpa.StaticWeave.main(StaticWeave.java:86)
Caused by: Exception [EclipseLink-30009] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while trying to load persistence unit at url: file:/home/jens/Development/workspace_opm/pkgrepo/de.dentrassi.pm.storage.jpa/META-INF/
Internal Exception: Exception [EclipseLink-30004] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while processing persistence.xml from URL: file:/home/jens/Development/workspace_opm/pkgrepo/de.dentrassi.pm.storage.jpa/META-INF/
Internal Exception: java.net.MalformedURLException
	at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionLoadingFromUrl(PersistenceUnitLoadingException.java:100)
	at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processPersistenceArchive(PersistenceUnitProcessor.java:597)
	at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveClassTransformer.buildClassTransformers(StaticWeaveClassTransformer.java:109)
	at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveClassTransformer.<init>(StaticWeaveClassTransformer.java:76)
	at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveProcessor.process(StaticWeaveProcessor.java:248)
	at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveProcessor.performWeaving(StaticWeaveProcessor.java:174)
	at org.eclipse.persistence.tools.weaving.jpa.StaticWeave.start(StaticWeave.java:115)
	at org.eclipse.persistence.tools.weaving.jpa.StaticWeave.main(StaticWeave.java:84)
Caused by: Exception [EclipseLink-30004] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while processing persistence.xml from URL: file:/home/jens/Development/workspace_opm/pkgrepo/de.dentrassi.pm.storage.jpa/META-INF/
Internal Exception: java.net.MalformedURLException
	at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionProcessingPersistenceXML(PersistenceUnitLoadingException.java:118)
	at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processPersistenceXML(PersistenceUnitProcessor.java:638)
	at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processPersistenceArchive(PersistenceUnitProcessor.java:595)
	... 6 more
Caused by: java.net.MalformedURLException
	at java.net.URL.<init>(URL.java:619)
	at java.net.URL.<init>(URL.java:482)
	at java.net.URL.<init>(URL.java:431)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:616)
	at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:189)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:812)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:648)
	at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processPersistenceXML(PersistenceUnitProcessor.java:636)
	... 7 more
Caused by: java.lang.NullPointerException
	at java.net.URL.<init>(URL.java:524)
	... 17 more
Re: Static Weaving failed with NPE [message #1517644 is a reply to message #1517622] Fri, 19 December 2014 16:54 Go to previous message
Rick Curtis is currently offline Rick CurtisFriend
Messages: 24
Registered: September 2014
Location: Rochester, MN
Junior Member
I seem to remember hitting this problem in the past, but I don't recall the details. I believe the net of this message is that EclipseLink can't find your persistence.xml file. I'm not familiar with the tools you mentioned, but I suspect you'll need to fiddle around with the 'Persistence XML Root' property. From the error message, is this the folder[1] that your persistence.xml is in?

file:/home/jens/Development/workspace_opm/pkgrepo/de.dentrassi.pm.storage.jpa/META-INF/
Previous Topic:Using FetchGroup and BATCH fetch for OneToMany association
Next Topic:NamedPLSQLStoredProcedureQuery with multiple out parameters
Goto Forum:
  


Current Time: Wed Feb 21 17:27:03 GMT 2024

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

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

Back to the top