2 Replies Latest reply on Jul 19, 2011 7:50 AM by David Bosschaert

    osgi jpa

    wiktorowski maximilien Novice

      Hi,

       

      I'm trying to share my JPA model between different apps.

       

      I've created an OSGI-JPA bundle with Meta-Persistence, Import-Package and Export-Package headers.

      The bundle starts without error but the JPA stuff doesn't seem to be done ( no  table mapping log etc ...)

       

      Where can i find some doc and/or example about this ?

       

      Best regards,

      Maximilien

        • 1. Re: osgi jpa
          wiktorowski maximilien Novice

          Changing my Meta-Persistence to something more "standard" /META-INF/persistence.xml causes an exception :

           

           

          11:56:26,495 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.unit."0-model.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."0-model.jar".INSTALL: Failed to process phase INSTALL of deployment "0-model.jar"

                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

                  at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_20]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_20]

                  at java.lang.Thread.run(Thread.java:619) [:1.6.0_20]

          Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to get module attachment for deployment "0-model.jar"

                  at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.addPuService(PersistenceUnitDeploymentProcessor.java:212)

                  at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.handleJarDeployment(PersistenceUnitDeploymentProcessor.java:115)

                  at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deploy(PersistenceUnitDeploymentProcessor.java:96)

                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)

                  ... 5 more

           

          So my problem seems to be linked to https://issues.jboss.org/browse/AS7-888

           

          Maximilien

          • 2. Re: osgi jpa
            David Bosschaert Expert

            Hi Maximilien,

             

            FYI - While JavaEE JPA is part of JBoss AS7, OSGi-JPA support as described in the OSGi 4.2 Enterprise specification (chapter 127) is not yet provided with 7.0.0.

             

            Best regards,

             

            David