0 Replies Latest reply on Apr 19, 2013 4:59 PM by jigneshmpatel

    OSGI-JPA deployment on mysql

    jigneshmpatel

      I am trying to deploy JPA enabled OSGI bundle for the mysql database but at the time of deployment seeing following error and doesn't let me deploy the bundle

       

      16:36:29,035 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-10) MSC00001: Failed to start service jboss.deployment.unit."osgi-jpa.jar".Activate: org.jboss.msc.service.StartException in service jboss.deployment.unit."osgi-jpa.jar".Activate: JBAS011968: Cannot start bundle: osgi-jpa:1.0.0.SNAPSHOT

                at org.jboss.as.osgi.deployment.BundleActivateProcessor$BundleActivateService.start(BundleActivateProcessor.java:131)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [classes.jar:1.6.0_45]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [classes.jar:1.6.0_45]

                at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_45]

      Caused by: org.osgi.framework.BundleException: JBOSGI011254: Cannot start bundle: osgi-jpa:1.0.0.SNAPSHOT

                at org.jboss.osgi.framework.internal.HostBundleState.startInternalNow(HostBundleState.java:302)

                at org.jboss.osgi.framework.internal.HostBundleState.startInternal(HostBundleState.java:199)

                at org.jboss.osgi.framework.internal.BundleManagerPlugin.startBundle(BundleManagerPlugin.java:406)

                at org.jboss.as.osgi.deployment.BundleActivateProcessor$BundleActivateService.start(BundleActivateProcessor.java:128)

                ... 5 more

      Caused by: java.lang.NullPointerException

                at com.etipl.osgi.service.TestPersistenceSvcImpl.getEntityById(TestPersistenceSvcImpl.java:21)

                at com.etipl.osgi.jpa.Activator.start(Activator.java:17)

                at org.jboss.osgi.framework.internal.HostBundleState.startInternalNow(HostBundleState.java:276)

                ... 8 more

       

      16:36:29,243 ERROR [org.jboss.as.server] (management-handler-thread - 2) JBAS015870: Deploy of deployment "osgi-jpa.jar" was rolled back with the following failure message:

      {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"osgi-jpa.jar\".Activate" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"osgi-jpa.jar\".Activate: JBAS011968: Cannot start bundle: osgi-jpa:1.0.0.SNAPSHOT

          Caused by: org.osgi.framework.BundleException: JBOSGI011254: Cannot start bundle: osgi-jpa:1.0.0.SNAPSHOT

          Caused by: java.lang.NullPointerException"}}

      For reference I have attached source code.