You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Gert Vanthienen (JIRA)" <ji...@apache.org> on 2013/03/26 15:55:14 UTC

[jira] [Updated] (ARIES-1040) Exception during jpa-container shutdown

     [ https://issues.apache.org/jira/browse/ARIES-1040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gert Vanthienen updated ARIES-1040:
-----------------------------------

    Attachment: 0001-ARIES-1040-Exception-during-jpa-container-shutdown.patch

This git patch fixes the issue by checking if the {{EntityManagerFactoryManager}} is not listed in the {{managersAwaitingProviders}} collection before attempting to destroy persistence bundles.
                
> Exception during jpa-container shutdown
> ---------------------------------------
>
>                 Key: ARIES-1040
>                 URL: https://issues.apache.org/jira/browse/ARIES-1040
>             Project: Aries
>          Issue Type: Bug
>          Components: JPA
>    Affects Versions: jpa-container-context-1.0.1
>            Reporter: Gert Vanthienen
>         Attachments: 0001-ARIES-1040-Exception-during-jpa-container-shutdown.patch
>
>
> During OSGi Framework shutdown, if the JPA provider bundle is stopped before the JPA Container's {{PersistenceBundleManager.stop()}} method is being called, you end up with this exception:
> {noformat}
> ERROR: Bundle org.apache.aries.jpa.container [235] Error stopping bundle. (java.lang.IllegalStateException: No persistence units defined for bundle org.fusesource.example.transactions.database/1.0.0.SNAPSHOT.)
> java.lang.IllegalStateException: No persistence units defined for bundle org.fusesource.example.transactions.database/1.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.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerRemoved(BundleHookBundleTracker.java:513)
> 	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerRemoved(BundleHookBundleTracker.java:433)
> 	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.untrack(BundleHookBundleTracker.java:834)
> 	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker.close(BundleHookBundleTracker.java:196)
> 	at org.apache.aries.util.tracker.RecursiveBundleTracker.close(RecursiveBundleTracker.java:106)
> 	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:667)
> 	at org.apache.felix.framework.Felix.stopBundle(Felix.java:2707)
> 	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1327)
> 	at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
> 	at java.lang.Thread.run(Thread.java:680)
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira