OpenEngSB
  1. OpenEngSB
  2. OPENENGSB-3000

EDB and aries-jpa-1.0 throws exception on shutdown

    Details

      Description

      ERROR: Bundle org.apache.aries.jpa.container [127] Error stopping bundle. (java.lang.IllegalStateException: No persistence units defined for bundle org.openengsb.framework.security/3.0.0.SNAPSHOT.)
      java.lang.IllegalStateException: No persistence units defined for bundle org.openengsb.framework.security/3.0.0.SNAPSHOT.
      at org.apache.aries.jpa.container.unit.impl.ManagedPersistenceUnitInfoFactoryImpl.destroyPersistenceBundle(ManagedPersistenceUnitInfoFactoryImpl.java:60)
      at org.apache.aries.jpa.container.impl.PersistenceBundleManager.removedBundle(PersistenceBundleManager.java:313)
      at org.osgi.util.tracker.BundleTracker$Tracked.customizerRemoved(BundleTracker.java:508)
      at org.osgi.util.tracker.BundleTracker$Tracked.customizerRemoved(BundleTracker.java:424)
      at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:352)
      at org.osgi.util.tracker.BundleTracker.close(BundleTracker.java:200)
      at org.apache.aries.util.tracker.hook.BundleHookBundleTracker.close(BundleHookBundleTracker.java:73)
      at org.apache.aries.util.tracker.RecursiveBundleTracker.close(RecursiveBundleTracker.java:98)
      at org.apache.aries.jpa.container.impl.PersistenceBundleManager.close(PersistenceBundleManager.java:140)
      at org.apache.aries.jpa.container.impl.PersistenceBundleManager.stop(PersistenceBundleManager.java:643)
      at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:663)
      at org.apache.felix.framework.Felix.stopBundle(Felix.java:2361)
      at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1214)
      at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
      at java.lang.Thread.run(Thread.java:679)
      ERROR: Bundle org.apache.aries.jpa.container [127] Error stopping mvn:org.apache.aries.jpa/org.apache.aries.jpa.container/1.0.0-SNAPSHOT (org.osgi.framework.BundleException: Activator stop error in bundle org.apache.aries.jpa.container [127].)
      java.lang.IllegalStateException: No persistence units defined for bundle org.openengsb.framework.security/3.0.0.SNAPSHOT.
      at org.apache.aries.jpa.container.unit.impl.ManagedPersistenceUnitInfoFactoryImpl.destroyPersistenceBundle(ManagedPersistenceUnitInfoFactoryImpl.java:60)
      at org.apache.aries.jpa.container.impl.PersistenceBundleManager.removedBundle(PersistenceBundleManager.java:313)
      at org.osgi.util.tracker.BundleTracker$Tracked.customizerRemoved(BundleTracker.java:508)
      at org.osgi.util.tracker.BundleTracker$Tracked.customizerRemoved(BundleTracker.java:424)
      at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:352)
      at org.osgi.util.tracker.BundleTracker.close(BundleTracker.java:200)
      at org.apache.aries.util.tracker.hook.BundleHookBundleTracker.close(BundleHookBundleTracker.java:73)
      at org.apache.aries.util.tracker.RecursiveBundleTracker.close(RecursiveBundleTracker.java:98)
      at org.apache.aries.jpa.container.impl.PersistenceBundleManager.close(PersistenceBundleManager.java:140)
      at org.apache.aries.jpa.container.impl.PersistenceBundleManager.stop(PersistenceBundleManager.java:643)
      at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:663)
      at org.apache.felix.framework.Felix.stopBundle(Felix.java:2361)
      at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1214)
      at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
      at java.lang.Thread.run(Thread.java:679)

        Gliffy Diagrams

        Error rendering 'com.meetme.plugins.jira.gerrit-plugin:gerritreviewsmodule'. Please contact your JIRA administrators.

          Activity

          Hide
          Christoph Gritschenberger added a comment -

          The Exception is not displayed when using equinox.
          However I don't think that it behaves correctly either.

          The persistence-unit is created multiple times.

          Show
          Christoph Gritschenberger added a comment - The Exception is not displayed when using equinox. However I don't think that it behaves correctly either. The persistence-unit is created multiple times.
          Hide
          Christoph Gritschenberger added a comment -

          Alright the cause of the Exception is that Aries tries to destroy the EntityManager twice.
          One time when the managed bundle (i.e. edb, security, ...) is removed
          Another time when the provider bundle (i.e. OpenJPA) is removed.

          The second time the exception is thrown because the container has already been destroyed.

          Show
          Christoph Gritschenberger added a comment - Alright the cause of the Exception is that Aries tries to destroy the EntityManager twice. One time when the managed bundle (i.e. edb, security, ...) is removed Another time when the provider bundle (i.e. OpenJPA) is removed. The second time the exception is thrown because the container has already been destroyed.
          Hide
          Andreas Pieber added a comment -

          this might be worth a patch to openjpa; should be a quite simple "only-destroy-if-exists" check?

          Show
          Andreas Pieber added a comment - this might be worth a patch to openjpa; should be a quite simple "only-destroy-if-exists" check?
          Hide
          Christoph Gritschenberger added a comment -

          aries-jpa explicitly throws the exception.
          But I agree. apache-jira was down yesterday. I'll check now.

          Show
          Christoph Gritschenberger added a comment - aries-jpa explicitly throws the exception. But I agree. apache-jira was down yesterday. I'll check now.
          Hide
          Christoph Gritschenberger added a comment -

          fix committed to aries and available in current snapshots.

          Show
          Christoph Gritschenberger added a comment - fix committed to aries and available in current snapshots.

            People

            • Assignee:
              Christoph Gritschenberger
              Reporter:
              Christoph Gritschenberger
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: