Hello,
I have a java application using JPA and mysql libraries. The application
works correctly using standard java but now I am trying to deploy in insite
an OSGI platform.
I have tried to have a look to EclipseLink. Eclipe provides you some bundles
to make JPA works properly. The target platform I have:
0 ACTIVE org.eclipse.osgi_3.5.1.R35x_v20090827
1 ACTIVE org.eclipse.persistence.asm_1.1.2.v20090612-r4475
2 RESOLVED com.as.jpa.example_1.0.0.qualifier
3 ACTIVE org.eclipse.persistence.core_1.1.2.v20090612-r4475
4 ACTIVE javax.persistence_2.0.0.v200911271158
5 ACTIVE org.eclipse.persistence.jpa_1.1.2.v20090612-r4475
6 ACTIVE org.eclipse.persistence.antlr_1.1.2.v20090612-r4475
and the error I get:
org.osgi.framework.BundleException: Exception in
com.as.jpa.example.Activator.start() of bundle com.as.jpa.example.
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org. ... [...]
Caused by: Exception [EclipseLink-28027] (Eclipse Persistence Services -
1.1.2.v20090612-r4475):
org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: An attempt has been made to use PersistenceUnit
[hello-world], but no bundle is available that defines that persistence
unit.
at
org.eclipse.persistence.exceptions.EntityManagerSetupException.couldNotFindPersistenceUnitBundle(EntityManagerSetupException.java:298)
at
org.eclipse.persistence.internal.jpa.deployment.osgi.OSGiPersistenceInitializationHelper.getClassLoader(OSGiPersistenceInitializationHelper.java:129)
at
org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:66)
at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:78)
at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
at com.as.jpa.example.JpaTest.initEntityManager(JpaTest.java:23)
at com.as.jpa.example.Activator.start(Activator.java:15)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
... 14 more
I have also tried
http://www.dynamicjava.org/projects/jsr-api/jpa-osgi
but I must be missing some bundles or libraries because i can not make it
works.
could anybody throw light about it?
thank you!
Miguel
Sent from Madrid, Spain
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev