Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] EclipseLink OSGi bundles deployment in Tomcat (with Eclipse ServletBridge) errors.

Hi Azrin,

  What EclipseLink version are you using?

  Can you post the code you are using to create your entity manager factory?

-Tom

azrin masfian wrote:
Hello EclipseLink users and developers,
Currently, I am trying to deploy EclipseLink OSGi bundles together with my persistence bundles in Tomcat. I am making used of Eclipse Servlet Bridge to have the OSGi environment inside Tomcat. I have deployed and tested my persistence bundles in Eclipse IDE and they are indeed working. No exceptions or errors are observed. However, when deploying them in the mentioned OSGi environment within Tomcat, I experienced the following errors: Framework is launched.
id      State       Bundle
0       ACTIVE      org.eclipse.osgi_3.3.2.R33x_v20080105
                    Fragments=45
1       ACTIVE      org.eclipse.equinox.common_3.3.0.v20070426
2       ACTIVE      org.eclipse.update.configurator_3.2.100.v20070322
3 ACTIVE org.eclipse.equinox.http.servletbridge_1.0.0.200704022148
4       ACTIVE      org.eclipse.equinox.http.registry_1.0.0.200704022148
5       ACTIVE      com.ibm.icu_3.4.5.20061213
6       RESOLVED    commonj.sdo_2.1.0
7       ACTIVE      javax.activation_1.1.0.v200706111329
8       ACTIVE      javax.ejb_3.0.0
9       ACTIVE      javax.jms_1.1.0
10      ACTIVE      javax.mail_1.4.0.v200706111329
11      RESOLVED    javax.persistence_1.0.0
12      ACTIVE      javax.persistence_1.99.0
13      ACTIVE      javax.resource_1.5.0
14      ACTIVE      javax.servlet.jsp_2.0.0.v200706191603
15      ACTIVE      javax.servlet_2.4.0.v200706111738
16      ACTIVE      javax.transaction_1.1.0
17      ACTIVE      javax.xml.bind_2.0.0
18      ACTIVE      javax.xml.rpc_1.1.0.v200706111329
19      ACTIVE      javax.xml.soap_1.3.0
20      ACTIVE      javax.xml.stream_1.0.0
21      ACTIVE      my.mimos.mcpc.profile.domain_1.0.0
22      ACTIVE      my.mimos.mcpc.server.jpa.application.entities_1.0.0
23      ACTIVE      my.mimos.mcpc.server.jpa.application_1.0.0
24      ACTIVE      my.mimos.mcpc.server.jpa.profile_1.0.0
25      ACTIVE      my.mimos.mcpc.server.manager.application.test_1.0.0
26      ACTIVE      my.mimos.mcpc.server.manager.application_1.0.0
27      ACTIVE      my.mimos.mcpc.server.rules.query_1.0.0
28      ACTIVE      my.mimos.mcpc.server_1.0.0
29      ACTIVE      org.apache.log4j_1.2.13.v200706111418
30      ACTIVE      org.eclipse.core.commands_3.3.0.I20070605-0010
31      ACTIVE      org.eclipse.core.contenttype_3.2.100.v20070319
32      ACTIVE      org.eclipse.core.expressions_3.3.0.v20070606-0010
33      RESOLVED    org.eclipse.core.filesystem.win32.x86_1.1.0.v20070510
                    Master=34
34      ACTIVE      org.eclipse.core.filesystem_1.1.0.v20070606
                    Fragments=33
35      ACTIVE      org.eclipse.core.jobs_3.3.1.R33x_v20070709
36      ACTIVE      org.eclipse.core.resources_3.3.1.R33x_v20080205
37      ACTIVE      org.eclipse.core.runtime_3.3.100.v20070530
38      ACTIVE      org.eclipse.equinox.app_1.0.1.R33x_v20070828
42      ACTIVE      org.eclipse.equinox.http.servlet_1.0.0.200704022148
43      ACTIVE      org.eclipse.equinox.preferences_3.2.101.R33x_v20080117
44      ACTIVE      org.eclipse.equinox.registry_3.3.1.R33x_v20070802
45      RESOLVED    org.eclipse.equinox.servletbridge.extensionbundle_1.0.0
                    Master=0
46      ACTIVE      org.eclipse.jdt.core_3.3.3.v_793_R33x
47      ACTIVE      org.eclipse.osgi.services_3.1.200.v20070605
49      ACTIVE      org.eclipse.persistence.antlr_0.1.0
50      ACTIVE      org.eclipse.persistence.asm_0.1.0
51      ACTIVE      org.eclipse.persistence.core_0.1.0
52      ACTIVE      org.eclipse.persistence.jpa_0.1.0
53      RESOLVED    org.eclipse.persistence.moxy_0.1.0
54      RESOLVED    org.eclipse.persistence.oracle_0.1.0
55      RESOLVED    org.eclipse.persistence.sdo_0.1.0
56      ACTIVE      org.eclipse.text_3.3.0.v20070606-0010
58      RESOLVED    my.mimos.mcpc.server.osgi.test_1.0.0
osgi> start 58
2008-07-21 12:12:38,046 DEBUG my.mimos.mcpc.server.osgi.test.OSGiTestPlugin - ou
t
2008-07-21 12:12:38,046 DEBUG my.mimos.mcpc.server.jpa.profile.PersistenceServic
eImpl - The profile service is not null
2008-07-21 12:12:38,046 DEBUG my.mimos.mcpc.profile.bean.ProfileServiceBean - Pr ofileServiceBean.persist(), the profile which is about to be persisted is [UName
1]
Bundle stopping: update@plugins/my.mimos.mcpc.server.osgi.test_1.0.0.jar <mailto:update@plugins/my.mimos.mcpc.server.osgi.test_1.0.0.jar> [58] org.osgi.framework.BundleException: Exception in my.mimos.mcpc.server.osgi.test.
OSGiTestPlugin.start() of bundle my.mimos.mcpc.server.osgi.test.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActiv
ator(BundleContextImpl.java:1018)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(Bund
leContextImpl.java:974)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(Bundl
eHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Abstrac
tBundle.java:260)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Abstrac
tBundle.java:252)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._st
art(FrameworkCommandProvider.java:260)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.
execute(FrameworkCommandInterpreter.java:150)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(F
rameworkConsole.java:300)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(Fra
meworkConsole.java:285)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(Framewo
rkConsole.java:221)
        at java.lang.Thread.run(Thread.java:619)
Caused by: javax.persistence.PersistenceException: No Persistence provider for E
ntityManager named entityManager
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.
java:89)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.
java:60)
at my.mimos.mcpc.profile.bean.ProfileServiceBean.persist(ProfileServiceB
ean.java:42)
at my.mimos.mcpc.server.jpa.profile.PersistenceServiceImpl.persistProfil
e(PersistenceServiceImpl.java:37)
at my.mimos.mcpc.server.osgi.test.OSGiServiceTest.testPersistProfile(OSG
iServiceTest.java:168)
at my.mimos.mcpc.server.osgi.test.OSGiServiceTest.setPersistenceService(
OSGiServiceTest.java:101)
at my.mimos.mcpc.server.osgi.test.ProfilePersistenceServiceTracker.addin
gService(ProfilePersistenceServiceTracker.java:35)
at org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTrack
er.java:1064)
at org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(Ser
viceTracker.java:926)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:330) at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:274) at my.mimos.mcpc.server.osgi.test.OSGiTestPlugin.start(OSGiTestPlugin.ja
va:56)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(Bund
leContextImpl.java:999)
        at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActiv
ator(BundleContextImpl.java:993)
        ... 14 more
Nested Exception:
javax.persistence.PersistenceException: No Persistence provider for EntityManage
r named entityManager
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.
java:89)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.
java:60)
at my.mimos.mcpc.profile.bean.ProfileServiceBean.persist(ProfileServiceB
ean.java:42)
at my.mimos.mcpc.server.jpa.profile.PersistenceServiceImpl.persistProfil
e(PersistenceServiceImpl.java:37)
at my.mimos.mcpc.server.osgi.test.OSGiServiceTest.testPersistProfile(OSG
iServiceTest.java:168)
at my.mimos.mcpc.server.osgi.test.OSGiServiceTest.setPersistenceService(
OSGiServiceTest.java:101)
at my.mimos.mcpc.server.osgi.test.ProfilePersistenceServiceTracker.addin
gService(ProfilePersistenceServiceTracker.java:35)
at org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTrack
er.java:1064)
at org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(Ser
viceTracker.java:926)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:330) at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:274) at my.mimos.mcpc.server.osgi.test.OSGiTestPlugin.start(OSGiTestPlugin.ja
va:56)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(Bund
leContextImpl.java:999)
        at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActiv
ator(BundleContextImpl.java:993)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(Bund
leContextImpl.java:974)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(Bundl
eHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Abstrac
tBundle.java:260)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Abstrac
tBundle.java:252)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._st
art(FrameworkCommandProvider.java:260)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.
execute(FrameworkCommandInterpreter.java:150)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(F
rameworkConsole.java:300)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(Fra
meworkConsole.java:285)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(Framewo
rkConsole.java:221)
        at java.lang.Thread.run(Thread.java:619)
Nested Exception:
javax.persistence.PersistenceException: No Persistence provider for EntityManage
r named entityManager
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.
java:89)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.
java:60)
at my.mimos.mcpc.profile.bean.ProfileServiceBean.persist(ProfileServiceB
ean.java:42)
at my.mimos.mcpc.server.jpa.profile.PersistenceServiceImpl.persistProfil
e(PersistenceServiceImpl.java:37)
at my.mimos.mcpc.server.osgi.test.OSGiServiceTest.testPersistProfile(OSG
iServiceTest.java:168)
at my.mimos.mcpc.server.osgi.test.OSGiServiceTest.setPersistenceService(
OSGiServiceTest.java:101)
at my.mimos.mcpc.server.osgi.test.ProfilePersistenceServiceTracker.addin
gService(ProfilePersistenceServiceTracker.java:35)
at org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTrack
er.java:1064)
at org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(Ser
viceTracker.java:926)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:330) at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:274) at my.mimos.mcpc.server.osgi.test.OSGiTestPlugin.start(OSGiTestPlugin.ja
va:56)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(Bund
leContextImpl.java:999)
        at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActiv
ator(BundleContextImpl.java:993)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(Bund
leContextImpl.java:974)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(Bundl
eHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Abstrac
tBundle.java:260)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Abstrac
tBundle.java:252)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._st
art(FrameworkCommandProvider.java:260)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.
execute(FrameworkCommandInterpreter.java:150)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(F
rameworkConsole.java:300)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(Fra
meworkConsole.java:285)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(Framewo
rkConsole.java:221)
        at java.lang.Thread.run(Thread.java:619)
osgi>
I have done the following but the errors still persist:

   1. Developed the OSGi bundles according to sample demo specified at
      http://wiki.eclipse.org/EclipseLink/Development/OSGi_Proof_of_Concept.
      The content of MANIFEST.MF is exactly the same. In particular, I
      have added the required-bundle 'org.eclipse.persistence.jpa'.
   2. Checked the jar files to ensure that META-INF/persistence.xml are
      there.
   3. Inside persistence.xml, I have added in <provider> tag with
      'org.eclipse.persistence.jpa.PersistenceProvider'.

For normal JEE/JSE deployment, the main reason why this error could happen is because it could not find the persistence.xml file inside the class-path. I have read the posts http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg00148.html, but none of the steps described could solve the problem that I am facing. Thank you for your time and immediate attention. Regards,
Azrin.


------------------------------------------------------------------------

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top