Seems like you might be missing the main eclipselink bundle. I'm not sure what that core bundle you have is. I just got an app up and running using EclipseLink in Spring DM server. The bundles I had to add to get everything working were:
com.springsource.com.mysql.jdbc-5.1.6.jar com.springsource.javax.persistence-2.0.0.jar com.springsource.javax.validation-1.0.0.GA.jar com.springsource.org.apache.commons.dbcp-1.2.2.osgi.jar com.springsource.org.apache.commons.pool-1.4.0.jar com.springsource.org.eclipse.persistence-2.0.0.jar com.springsource.org.eclipse.persistence.internal.libraries.asm-2.0.0.jar com.springsource.org.eclipse.persistence.jpa-2.0.0.jar org.springframework.aspects-3.0.0.RELEASE.jar I'm not sure if all of those are required just for JPA but that's all the bundles I've installed and like I said things are working for me. It looks like I'm using a newer version but anyway maybe this will help. I think org.eclipse.persistence.jpa at the version you have may be a Fragment bundle. So make sure that whatever parent bundle it's expecting is installed. Chris On Sat, Dec 26, 2009 at 5:01 AM, Miguel <[email protected]> wrote: > 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 >
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
