Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] OSGi , running outside of eclipse can't find persistence.xml

Well, the OSGi code works inside eclipse, but exporting and running
outside of eclipse is a whole different animal.

Has anyone gotten it to work? I'm running into a problem where it
doesn't look like EclipseLink can find the persistence.xml -- i'm
creating my EntityManagerFactory by passing the bundle activator's
classLoader, here's the error that occurs. I think the URL should be:
bundleresource://24/emname

However it's just blank when run outside, any ideas? Maybe this is a bug.

Caused by: Exception [EclipseLink-30004] (Eclipse Persistence Services
- @VERSION@ (Build @BUILD_NUMBER@)):
org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while processing
persistence.xml from URL: bundleresource://24/
Internal Exception: java.net.MalformedURLException
at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionProcessingPersistenceXML(PersistenceUnitLoadingException.java:112)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processPersistenceXML(PersistenceUnitProcessor.java:343)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processPersistenceArchive(PersistenceUnitProcessor.java:289)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.getPersistenceUnits(PersistenceUnitProcessor.java:217)
at org.eclipse.persistence.internal.jpa.OSGiInitializer.initPersistenceUnits(OSGiInitializer.java:96)
at org.eclipse.persistence.internal.jpa.OSGiInitializer.initialize(OSGiInitializer.java:113)
at org.eclipse.persistence.jpa.osgi.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:114)

-- 
./tch


Back to the top