[jira] [Updated] (ARIES-1018) JPA container throws Exception when stopped without a JPA-Provider present
[ https://issues.apache.org/jira/browse/ARIES-1018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christoph Gritschenberger updated ARIES-1018: - Attachment: fix-exception.patch JPA container throws Exception when stopped without a JPA-Provider present -- Key: ARIES-1018 URL: https://issues.apache.org/jira/browse/ARIES-1018 Project: Aries Issue Type: Bug Components: JPA Environment: karaf 3.0.0-SNAPSHOT, KARAF-2.3.1-SHAPSHOT Reporter: Christoph Gritschenberger Attachments: fix-exception.patch To reproduce unpack the latest karaf-snapshot and install the JPA-feature: {code} feature:install jpa {code} and install a bundle containing a persistence-unit. stop the JPA Container bundle. {code} {code} This happens since aries-util was upgraded to 1.1.0. The issue did not occur with util-1.0.0. I investigated a bit and found the problem: In util-1.1.0 the BundleHookBundleTracker was changed to untrack all bundles when it's closed. In util-1.0 closing did essentially nothing but setting a closed-flag. So when using JPA Container with util-1.1.0 the persistence-units are destroyed without ever being created. This also happens when having a JPA Provider (like OpenJPA) installed, but when it's stopped before the the JPA-Container Bundle is stopped (the usual case). -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (ARIES-1018) JPA container throws Exception when stopped without a JPA-Provider present
[ https://issues.apache.org/jira/browse/ARIES-1018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13888601#comment-13888601 ] Christoph Gritschenberger commented on ARIES-1018: -- Actually I see no reason why the jpa-container should throw an Exception anyway here. JPA container throws Exception when stopped without a JPA-Provider present -- Key: ARIES-1018 URL: https://issues.apache.org/jira/browse/ARIES-1018 Project: Aries Issue Type: Bug Components: JPA Environment: karaf 3.0.0-SNAPSHOT, KARAF-2.3.1-SHAPSHOT Reporter: Christoph Gritschenberger Attachments: fix-exception.patch To reproduce unpack the latest karaf-snapshot and install the JPA-feature: {code} feature:install jpa {code} and install a bundle containing a persistence-unit. stop the JPA Container bundle. {code} {code} This happens since aries-util was upgraded to 1.1.0. The issue did not occur with util-1.0.0. I investigated a bit and found the problem: In util-1.1.0 the BundleHookBundleTracker was changed to untrack all bundles when it's closed. In util-1.0 closing did essentially nothing but setting a closed-flag. So when using JPA Container with util-1.1.0 the persistence-units are destroyed without ever being created. This also happens when having a JPA Provider (like OpenJPA) installed, but when it's stopped before the the JPA-Container Bundle is stopped (the usual case). -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (ARIES-1155) Error when OSGi container is stopped on aries jpa container No persistence units defined for bundle
[ https://issues.apache.org/jira/browse/ARIES-1155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13888620#comment-13888620 ] Christoph Gritschenberger commented on ARIES-1155: -- I think this is the same problem as in ARIES-1018 Error when OSGi container is stopped on aries jpa container No persistence units defined for bundle Key: ARIES-1155 URL: https://issues.apache.org/jira/browse/ARIES-1155 Project: Aries Issue Type: Bug Components: JPA Environment: Ubuntu Linux, Java 7, Karaf 3.0.1-SNAPSHOT I tried to find the aries jpa versions for Affects Version but could not find any. Reporter: Christian Schneider I run my cameljpa jpa2jms example on karaf 3.0.1-SNAPSHOT (The snapshot version is necessary as karaf had some issues with openjpa). See the readme in: https://github.com/cschneider/Karaf-Tutorial/tree/master/cameljpa/jpa2jms The example works fine but when I stop the OSGi container I get the error below: ERROR: Bundle org.apache.aries.jpa.container [160] Error stopping mvn:org.apache.aries.jpa/org.apache.aries.jpa.container/1.0.0 (org.osgi.framework.BundleException: Activator stop error in bundle org.apache.aries.jpa.container [160].) java.lang.IllegalStateException: No persistence units defined for bundle jpa2jms/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:120) 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:2530) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1309) at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304) at java.lang.Thread.run(Thread.java:744) -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Created] (ARIES-1018) JPA container throws Exception when stopped without a JPA-Provider present
Christoph Gritschenberger created ARIES-1018: Summary: JPA container throws Exception when stopped without a JPA-Provider present Key: ARIES-1018 URL: https://issues.apache.org/jira/browse/ARIES-1018 Project: Aries Issue Type: Bug Components: JPA Environment: karaf 3.0.0-SNAPSHOT, KARAF-2.3.1-SHAPSHOT Reporter: Christoph Gritschenberger To reproduce unpack the latest karaf-snapshot and install the JPA-feature: {code} feature:install jpa {code} and install a bundle containing a persistence-unit. stop the JPA Container bundle. {code} {code} This happens since aries-util was upgraded to 1.1.0. The issue did not occur with util-1.0.0. I investigated a bit and found the problem: In util-1.1.0 the BundleHookBundleTracker was changed to untrack all bundles when it's closed. In util-1.0 closing did essentially nothing but setting a closed-flag. So when using JPA Container with util-1.1.0 the persistence-units are destroyed without ever being created. This also happens when having a JPA Provider (like OpenJPA) installed, but when it's stopped before the the JPA-Container Bundle is stopped (the usual case). -- 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
[jira] [Created] (ARIES-1005) BundleHookBundleTracker throws Exception when close()-method is called twice
Christoph Gritschenberger created ARIES-1005: Summary: BundleHookBundleTracker throws Exception when close()-method is called twice Key: ARIES-1005 URL: https://issues.apache.org/jira/browse/ARIES-1005 Project: Aries Issue Type: Bug Components: Util Reporter: Christoph Gritschenberger {code} public void close() { sr.unregister(); tracked.close(); tracked = null; } {code} Supsequent calls cause sr.unregister to throw an IllegalStateException. Since today, there is a piece of code introduced by ARIES-1004 that does actually do that (http://mail-archives.apache.org/mod_mbox/aries-commits/201301.mbox/%3C20130118083142.DA5852388900%40eris.apache.org%3E) -- 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
[jira] [Commented] (ARIES-1005) BundleHookBundleTracker throws Exception when close()-method is called twice
[ https://issues.apache.org/jira/browse/ARIES-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13557286#comment-13557286 ] Christoph Gritschenberger commented on ARIES-1005: -- Sorry, just noticed it's fixed on trunk https://svn.apache.org/viewvc?view=revisionrevision=1421115 BundleHookBundleTracker throws Exception when close()-method is called twice Key: ARIES-1005 URL: https://issues.apache.org/jira/browse/ARIES-1005 Project: Aries Issue Type: Bug Components: Util Reporter: Christoph Gritschenberger {code} public void close() { sr.unregister(); tracked.close(); tracked = null; } {code} Supsequent calls cause sr.unregister to throw an IllegalStateException. Since today, there is a piece of code introduced by ARIES-1004 that does actually do that (http://mail-archives.apache.org/mod_mbox/aries-commits/201301.mbox/%3C20130118083142.DA5852388900%40eris.apache.org%3E) -- 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
[jira] [Commented] (ARIES-1005) BundleHookBundleTracker throws Exception when close()-method is called twice
[ https://issues.apache.org/jira/browse/ARIES-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13557288#comment-13557288 ] Christoph Gritschenberger commented on ARIES-1005: -- Meaning the real issue is that blueprint-core still uses util-1.0.0 BundleHookBundleTracker throws Exception when close()-method is called twice Key: ARIES-1005 URL: https://issues.apache.org/jira/browse/ARIES-1005 Project: Aries Issue Type: Bug Components: Util Reporter: Christoph Gritschenberger {code} public void close() { sr.unregister(); tracked.close(); tracked = null; } {code} Supsequent calls cause sr.unregister to throw an IllegalStateException. Since today, there is a piece of code introduced by ARIES-1004 that does actually do that (http://mail-archives.apache.org/mod_mbox/aries-commits/201301.mbox/%3C20130118083142.DA5852388900%40eris.apache.org%3E) -- 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
[jira] [Comment Edited] (ARIES-875) ReferenceRecipe may unget a service without ever getting it
[ https://issues.apache.org/jira/browse/ARIES-875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13421414#comment-13421414 ] Christoph Gritschenberger edited comment on ARIES-875 at 7/24/12 1:47 PM: -- attached alternative patch that fixes bind() and unbind() to only call ungetService when getService was called. was (Author: christophg): Fixes bind() and unbind() to only call ungetService when getService was called. ReferenceRecipe may unget a service without ever getting it --- Key: ARIES-875 URL: https://issues.apache.org/jira/browse/ARIES-875 Project: Aries Issue Type: Bug Components: Blueprint Environment: karaf-3.0.0-SNAPSHOT, Aries-1.0.0-SNAPSHOT Reporter: Christoph Gritschenberger Attachments: get-service.patch, my.playground.bundle-0.1.0-SNAPSHOT.jar, only-unget-when-get-service.patch, playground-bundle.zip I discovered this when trying to use the ConfigurationAdmin-service in both blueprint and a BundleActivator. Normally this should work but I get this Exception {code} java.lang.NullPointerException at org.apache.felix.cm.impl.ConfigurationAdminImpl.getConfiguration(ConfigurationAdminImpl.java:105) at my.playground.bundle.Activator$ConfigThread.run(Activator.java:29) {code} This is because this ConfigurationAdminImpl has been disposed after blueprint called ungetService in ReferenceRecipe#unbind(). Normally this should go like this: activator gets ConfigAdmin-service blueprint gets ConfigAdmin-service blueprint ungets ConfigAdmin-service (reference-counter still 0, so it is not destroyed) activator ungets ConfigAdmin-service (reference-counter is now 0, so the dispose-method in the ConfigAdmin is called). But what happens is this: activator gets ConfigAdmin-service blueprint ungets ConfigAdmin-service (reference-counter is now 0, so the dispose-method in the ConfigAdmin is called). activator throws NPE because the ConfigAdmin-service has been destroyed. The Problem is that calling ReferenceRecipe#unbind() always *ungets* the service, but ReferenceRecipe#bind() does not *get* the service. Thus the *unget*-operation invalidates the service-reference for some other thread. I attached a small demo-bundle to show the behaviour. Deploying it in a karaf-3.0.0-SNAPSHOT should show the NPE on the console. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (ARIES-875) ReferenceRecipe may unget a service without ever getting it
[ https://issues.apache.org/jira/browse/ARIES-875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christoph Gritschenberger updated ARIES-875: Attachment: only-unget-when-get-service.patch Fixes bind() and unbind() to only call ungetService when getService was called. ReferenceRecipe may unget a service without ever getting it --- Key: ARIES-875 URL: https://issues.apache.org/jira/browse/ARIES-875 Project: Aries Issue Type: Bug Components: Blueprint Environment: karaf-3.0.0-SNAPSHOT, Aries-1.0.0-SNAPSHOT Reporter: Christoph Gritschenberger Attachments: get-service.patch, my.playground.bundle-0.1.0-SNAPSHOT.jar, only-unget-when-get-service.patch, playground-bundle.zip I discovered this when trying to use the ConfigurationAdmin-service in both blueprint and a BundleActivator. Normally this should work but I get this Exception {code} java.lang.NullPointerException at org.apache.felix.cm.impl.ConfigurationAdminImpl.getConfiguration(ConfigurationAdminImpl.java:105) at my.playground.bundle.Activator$ConfigThread.run(Activator.java:29) {code} This is because this ConfigurationAdminImpl has been disposed after blueprint called ungetService in ReferenceRecipe#unbind(). Normally this should go like this: activator gets ConfigAdmin-service blueprint gets ConfigAdmin-service blueprint ungets ConfigAdmin-service (reference-counter still 0, so it is not destroyed) activator ungets ConfigAdmin-service (reference-counter is now 0, so the dispose-method in the ConfigAdmin is called). But what happens is this: activator gets ConfigAdmin-service blueprint ungets ConfigAdmin-service (reference-counter is now 0, so the dispose-method in the ConfigAdmin is called). activator throws NPE because the ConfigAdmin-service has been destroyed. The Problem is that calling ReferenceRecipe#unbind() always *ungets* the service, but ReferenceRecipe#bind() does not *get* the service. Thus the *unget*-operation invalidates the service-reference for some other thread. I attached a small demo-bundle to show the behaviour. Deploying it in a karaf-3.0.0-SNAPSHOT should show the NPE on the console. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (ARIES-875) ReferenceRecipe may unget a service without ever getting it
Christoph Gritschenberger created ARIES-875: --- Summary: ReferenceRecipe may unget a service without ever getting it Key: ARIES-875 URL: https://issues.apache.org/jira/browse/ARIES-875 Project: Aries Issue Type: Bug Components: Blueprint Environment: karaf-3.0.0-SNAPSHOT, Aries-1.0.0-SNAPSHOT Reporter: Christoph Gritschenberger I discovered this when trying to use the ConfigurationAdmin-service in both blueprint and a BundleActivator. Normally this should work but I get this Exception {code} java.lang.NullPointerException at org.apache.felix.cm.impl.ConfigurationAdminImpl.getConfiguration(ConfigurationAdminImpl.java:105) at my.playground.bundle.Activator$ConfigThread.run(Activator.java:29) {code} This is because this ConfigurationAdminImpl has been disposed after blueprint called ungetService in ReferenceRecipe#unbind(). Normally this should go like this: activator gets ConfigAdmin-service blueprint gets ConfigAdmin-service blueprint ungets ConfigAdmin-service (reference-counter still 0, so it is not destroyed) activator ungets ConfigAdmin-service (reference-counter is now 0, so the dispose-method in the ConfigAdmin is called). But what happens is this: activator gets ConfigAdmin-service blueprint ungets ConfigAdmin-service (reference-counter is now 0, so the dispose-method in the ConfigAdmin is called). activator throws NPE because the ConfigAdmin-service has been destroyed. The Problem is that calling ReferenceRecipe#unbind() always *ungets* the service, but ReferenceRecipe#bind() does not *get* the service. Thus the *unget*-operation invalidates the service-reference for some other thread. I attached a small demo-bundle to show the behaviour. Deploying it in a karaf-3.0.0-SNAPSHOT should show the NPE on the console. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (ARIES-875) ReferenceRecipe may unget a service without ever getting it
[ https://issues.apache.org/jira/browse/ARIES-875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christoph Gritschenberger updated ARIES-875: Attachment: my.playground.bundle-0.1.0-SNAPSHOT.jar playground-bundle.zip Source and compiled jar for the demo-bundle. Just deploy it in a Karaf-3.0.0-SNAPSHOT. (It works correctly in karaf-2.2.5) ReferenceRecipe may unget a service without ever getting it --- Key: ARIES-875 URL: https://issues.apache.org/jira/browse/ARIES-875 Project: Aries Issue Type: Bug Components: Blueprint Environment: karaf-3.0.0-SNAPSHOT, Aries-1.0.0-SNAPSHOT Reporter: Christoph Gritschenberger Attachments: my.playground.bundle-0.1.0-SNAPSHOT.jar, playground-bundle.zip I discovered this when trying to use the ConfigurationAdmin-service in both blueprint and a BundleActivator. Normally this should work but I get this Exception {code} java.lang.NullPointerException at org.apache.felix.cm.impl.ConfigurationAdminImpl.getConfiguration(ConfigurationAdminImpl.java:105) at my.playground.bundle.Activator$ConfigThread.run(Activator.java:29) {code} This is because this ConfigurationAdminImpl has been disposed after blueprint called ungetService in ReferenceRecipe#unbind(). Normally this should go like this: activator gets ConfigAdmin-service blueprint gets ConfigAdmin-service blueprint ungets ConfigAdmin-service (reference-counter still 0, so it is not destroyed) activator ungets ConfigAdmin-service (reference-counter is now 0, so the dispose-method in the ConfigAdmin is called). But what happens is this: activator gets ConfigAdmin-service blueprint ungets ConfigAdmin-service (reference-counter is now 0, so the dispose-method in the ConfigAdmin is called). activator throws NPE because the ConfigAdmin-service has been destroyed. The Problem is that calling ReferenceRecipe#unbind() always *ungets* the service, but ReferenceRecipe#bind() does not *get* the service. Thus the *unget*-operation invalidates the service-reference for some other thread. I attached a small demo-bundle to show the behaviour. Deploying it in a karaf-3.0.0-SNAPSHOT should show the NPE on the console. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (ARIES-875) ReferenceRecipe may unget a service without ever getting it
[ https://issues.apache.org/jira/browse/ARIES-875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christoph Gritschenberger updated ARIES-875: Attachment: get-service.patch Patch that would fix the issue. ReferenceRecipe may unget a service without ever getting it --- Key: ARIES-875 URL: https://issues.apache.org/jira/browse/ARIES-875 Project: Aries Issue Type: Bug Components: Blueprint Environment: karaf-3.0.0-SNAPSHOT, Aries-1.0.0-SNAPSHOT Reporter: Christoph Gritschenberger Attachments: get-service.patch, my.playground.bundle-0.1.0-SNAPSHOT.jar, playground-bundle.zip I discovered this when trying to use the ConfigurationAdmin-service in both blueprint and a BundleActivator. Normally this should work but I get this Exception {code} java.lang.NullPointerException at org.apache.felix.cm.impl.ConfigurationAdminImpl.getConfiguration(ConfigurationAdminImpl.java:105) at my.playground.bundle.Activator$ConfigThread.run(Activator.java:29) {code} This is because this ConfigurationAdminImpl has been disposed after blueprint called ungetService in ReferenceRecipe#unbind(). Normally this should go like this: activator gets ConfigAdmin-service blueprint gets ConfigAdmin-service blueprint ungets ConfigAdmin-service (reference-counter still 0, so it is not destroyed) activator ungets ConfigAdmin-service (reference-counter is now 0, so the dispose-method in the ConfigAdmin is called). But what happens is this: activator gets ConfigAdmin-service blueprint ungets ConfigAdmin-service (reference-counter is now 0, so the dispose-method in the ConfigAdmin is called). activator throws NPE because the ConfigAdmin-service has been destroyed. The Problem is that calling ReferenceRecipe#unbind() always *ungets* the service, but ReferenceRecipe#bind() does not *get* the service. Thus the *unget*-operation invalidates the service-reference for some other thread. I attached a small demo-bundle to show the behaviour. Deploying it in a karaf-3.0.0-SNAPSHOT should show the NPE on the console. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (ARIES-851) BundleTrackerCustomizer in BundleHookBundleTracker is called multiple times for the same event.
[ https://issues.apache.org/jira/browse/ARIES-851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christoph Gritschenberger updated ARIES-851: Attachment: ARIES-851-regression-fix.patch BundleTrackerCustomizer in BundleHookBundleTracker is called multiple times for the same event. --- Key: ARIES-851 URL: https://issues.apache.org/jira/browse/ARIES-851 Project: Aries Issue Type: Bug Components: JPA, Util Environment: Linux-3.0.0, Karaf-3.0.0-SNAPSHOT with Felix, openjdk-6 Reporter: Christoph Gritschenberger Assignee: Guillaume Nodet Fix For: 1.0 Attachments: ARIES-851-regression-fix.patch, ARIES-851-stacktrace.TXT, BundleHookBundleTracker-solution1.patch, BundleHookBundleTracker-solution2.patch, bundletracker-test-src.zip, jpa-test-bundle-src.zip, persistence-feature.xml, test.bundletracker.bundle-0.1.0-SNAPSHOT.jar, test.jpa.bundle-0.1.0-SNAPSHOT.jar Steps to reproduce * Compile or get a karaf-3.0.0-SNAPSHOT and unpack it * Install openjpa-2.2.0 (using the attached feature-file) * Deploy a bundle containing a persistence-unit (attached jar for example) get the following Exception 4 times: {code} ERROR: Bundle org.apache.aries.jpa.container [78] EventDispatcher: Error during dispatch. (java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist.) java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist. {code} See attachment for full stacktrace In subsequent startups the Exception is still thrown but the stacktrace does not show in the console or the log. Also when using equinox the Stacktrace does not appear in either the console or the log ever, but it's still thrown. The problem is that the PersistenceBundleManager#addingBundle is called multiple times for the newly installed bundle. The PersistenceBundleManager is passed as a BundleTrackerCustomizer to a BundleHookBundleTracker. The BundleHookBundleTracker stores it in it's own private attribute and also passes it to it's super-constructor. So the customizer is stored in the instance twice. It's called by both BundleTracker$Tracked.customizerAdding and BundleHookBundleTracker$Tracked.customizerAdding. Both Tracked recognize the bundle as untracked and call the addingBundle-method. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (ARIES-851) BundleTrackerCustomizer in BundleHookBundleTracker is called multiple times for the same event.
[ https://issues.apache.org/jira/browse/ARIES-851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christoph Gritschenberger reopened ARIES-851: - The initial fix caused several JPA-related tests to fail BundleTrackerCustomizer in BundleHookBundleTracker is called multiple times for the same event. --- Key: ARIES-851 URL: https://issues.apache.org/jira/browse/ARIES-851 Project: Aries Issue Type: Bug Components: JPA, Util Environment: Linux-3.0.0, Karaf-3.0.0-SNAPSHOT with Felix, openjdk-6 Reporter: Christoph Gritschenberger Assignee: Guillaume Nodet Fix For: 1.0 Attachments: ARIES-851-stacktrace.TXT, BundleHookBundleTracker-solution1.patch, BundleHookBundleTracker-solution2.patch, bundletracker-test-src.zip, jpa-test-bundle-src.zip, persistence-feature.xml, test.bundletracker.bundle-0.1.0-SNAPSHOT.jar, test.jpa.bundle-0.1.0-SNAPSHOT.jar Steps to reproduce * Compile or get a karaf-3.0.0-SNAPSHOT and unpack it * Install openjpa-2.2.0 (using the attached feature-file) * Deploy a bundle containing a persistence-unit (attached jar for example) get the following Exception 4 times: {code} ERROR: Bundle org.apache.aries.jpa.container [78] EventDispatcher: Error during dispatch. (java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist.) java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist. {code} See attachment for full stacktrace In subsequent startups the Exception is still thrown but the stacktrace does not show in the console or the log. Also when using equinox the Stacktrace does not appear in either the console or the log ever, but it's still thrown. The problem is that the PersistenceBundleManager#addingBundle is called multiple times for the newly installed bundle. The PersistenceBundleManager is passed as a BundleTrackerCustomizer to a BundleHookBundleTracker. The BundleHookBundleTracker stores it in it's own private attribute and also passes it to it's super-constructor. So the customizer is stored in the instance twice. It's called by both BundleTracker$Tracked.customizerAdding and BundleHookBundleTracker$Tracked.customizerAdding. Both Tracked recognize the bundle as untracked and call the addingBundle-method. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (ARIES-851) Multiple IllegalStateException when deploying a new PersistenceUnit
[ https://issues.apache.org/jira/browse/ARIES-851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christoph Gritschenberger updated ARIES-851: Component/s: Util Multiple IllegalStateException when deploying a new PersistenceUnit --- Key: ARIES-851 URL: https://issues.apache.org/jira/browse/ARIES-851 Project: Aries Issue Type: Bug Components: JPA, Util Environment: Linux-3.0.0, Karaf-3.0.0-SNAPSHOT with Felix, openjdk-6 Reporter: Christoph Gritschenberger Attachments: ARIES-851-stacktrace.TXT, BundleHookBundleTracker-solution1.patch, BundleHookBundleTracker-solution2.patch, jpa-test-bundle-src.zip, persistence-feature.xml, test.jpa.bundle-0.1.0-SNAPSHOT.jar Steps to reproduce * Compile or get a karaf-3.0.0-SNAPSHOT and unpack it * Install openjpa-2.2.0 (using the attached feature-file) * Deploy a bundle containing a persistence-unit (attached jar for example) get the following Exception 4 times: {code} ERROR: Bundle org.apache.aries.jpa.container [78] EventDispatcher: Error during dispatch. (java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist.) java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist. {code} See attachment for full stacktrace In subsequent startups the Exception is still thrown but the stacktrace does not show in the console or the log. Also when using equinox the Stacktrace does not appear in either the console or the log ever, but it's still thrown. The problem is that the PersistenceBundleManager#addingBundle is called multiple times for the newly installed bundle. The PersistenceBundleManager is passed as a BundleTrackerCustomizer to a BundleHookBundleTracker. The BundleHookBundleTracker stores it in it's own private attribute and also passes it to it's super-constructor. So the customizer is stored in the instance twice. It's called by both BundleTracker$Tracked.customizerAdding and BundleHookBundleTracker$Tracked.customizerAdding. Both Tracked recognize the bundle as untracked and call the addingBundle-method. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (ARIES-851) BundleTrackerCustomizer in BundleHookBundleTracker is called multiple times for the same event.
[ https://issues.apache.org/jira/browse/ARIES-851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christoph Gritschenberger updated ARIES-851: Attachment: (was: bundletracker-test.zip) BundleTrackerCustomizer in BundleHookBundleTracker is called multiple times for the same event. --- Key: ARIES-851 URL: https://issues.apache.org/jira/browse/ARIES-851 Project: Aries Issue Type: Bug Components: JPA, Util Environment: Linux-3.0.0, Karaf-3.0.0-SNAPSHOT with Felix, openjdk-6 Reporter: Christoph Gritschenberger Attachments: ARIES-851-stacktrace.TXT, BundleHookBundleTracker-solution1.patch, BundleHookBundleTracker-solution2.patch, jpa-test-bundle-src.zip, persistence-feature.xml, test.jpa.bundle-0.1.0-SNAPSHOT.jar Steps to reproduce * Compile or get a karaf-3.0.0-SNAPSHOT and unpack it * Install openjpa-2.2.0 (using the attached feature-file) * Deploy a bundle containing a persistence-unit (attached jar for example) get the following Exception 4 times: {code} ERROR: Bundle org.apache.aries.jpa.container [78] EventDispatcher: Error during dispatch. (java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist.) java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist. {code} See attachment for full stacktrace In subsequent startups the Exception is still thrown but the stacktrace does not show in the console or the log. Also when using equinox the Stacktrace does not appear in either the console or the log ever, but it's still thrown. The problem is that the PersistenceBundleManager#addingBundle is called multiple times for the newly installed bundle. The PersistenceBundleManager is passed as a BundleTrackerCustomizer to a BundleHookBundleTracker. The BundleHookBundleTracker stores it in it's own private attribute and also passes it to it's super-constructor. So the customizer is stored in the instance twice. It's called by both BundleTracker$Tracked.customizerAdding and BundleHookBundleTracker$Tracked.customizerAdding. Both Tracked recognize the bundle as untracked and call the addingBundle-method. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (ARIES-851) BundleTrackerCustomizer in BundleHookBundleTracker is called multiple times for the same event.
[ https://issues.apache.org/jira/browse/ARIES-851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christoph Gritschenberger updated ARIES-851: Attachment: bundletracker-test.zip BundleTrackerCustomizer in BundleHookBundleTracker is called multiple times for the same event. --- Key: ARIES-851 URL: https://issues.apache.org/jira/browse/ARIES-851 Project: Aries Issue Type: Bug Components: JPA, Util Environment: Linux-3.0.0, Karaf-3.0.0-SNAPSHOT with Felix, openjdk-6 Reporter: Christoph Gritschenberger Attachments: ARIES-851-stacktrace.TXT, BundleHookBundleTracker-solution1.patch, BundleHookBundleTracker-solution2.patch, jpa-test-bundle-src.zip, persistence-feature.xml, test.jpa.bundle-0.1.0-SNAPSHOT.jar Steps to reproduce * Compile or get a karaf-3.0.0-SNAPSHOT and unpack it * Install openjpa-2.2.0 (using the attached feature-file) * Deploy a bundle containing a persistence-unit (attached jar for example) get the following Exception 4 times: {code} ERROR: Bundle org.apache.aries.jpa.container [78] EventDispatcher: Error during dispatch. (java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist.) java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist. {code} See attachment for full stacktrace In subsequent startups the Exception is still thrown but the stacktrace does not show in the console or the log. Also when using equinox the Stacktrace does not appear in either the console or the log ever, but it's still thrown. The problem is that the PersistenceBundleManager#addingBundle is called multiple times for the newly installed bundle. The PersistenceBundleManager is passed as a BundleTrackerCustomizer to a BundleHookBundleTracker. The BundleHookBundleTracker stores it in it's own private attribute and also passes it to it's super-constructor. So the customizer is stored in the instance twice. It's called by both BundleTracker$Tracked.customizerAdding and BundleHookBundleTracker$Tracked.customizerAdding. Both Tracked recognize the bundle as untracked and call the addingBundle-method. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (ARIES-851) BundleTrackerCustomizer in BundleHookBundleTracker is called multiple times for the same event.
[ https://issues.apache.org/jira/browse/ARIES-851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christoph Gritschenberger updated ARIES-851: Attachment: test.bundletracker.bundle-0.1.0-SNAPSHOT.jar bundletracker-test-src.zip I also found a way to illustriate the behaviour with plain felix. Download and start felix-4.0.2 felix:install file:/path/to/org.apache.aries.util-1.0.0-SNAPSHOT.jar start id felix:install file:/path/to/test.bundletracker.bundle-0.1.0-SNAPSHOT.jar start id then install any bundle (e.g. commons-collections) and watch how often the bundletracker prints the event felix:install file:/path/to/commons-collections-3.2.1.jar {code} g! felix:lb START LEVEL 1 ID|State |Level|Name 0|Active |0|System Bundle (4.0.2) 1|Active |1|Apache Felix Bundle Repository (1.6.6) 2|Active |1|Apache Felix Gogo Command (0.12.0) 3|Active |1|Apache Felix Gogo Runtime (0.10.0) 4|Active |1|Apache Felix Gogo Shell (0.10.0) 5|Active |1|Test :: BundleTracker :: Bundle (0.1.0.SNAPSHOT) 7|Active |1|Apache Aries Util (1.0.0.SNAPSHOT) 9|Installed |1|Commons Collections (3.2.1) g! felix:start 9 Event: org.osgi.framework.BundleEvent[source=org.apache.commons.collections [9]] modified bundleorg.apache.commons.collections Event: org.osgi.framework.BundleEvent[source=org.apache.commons.collections [9]] modified bundleorg.apache.commons.collections Event: org.osgi.framework.BundleEvent[source=org.apache.commons.collections [9]] modified bundleorg.apache.commons.collections Event: org.osgi.framework.BundleEvent[source=org.apache.commons.collections [9]] modified bundleorg.apache.commons.collections Event: org.osgi.framework.BundleEvent[source=org.apache.commons.collections [9]] modified bundleorg.apache.commons.collections Event: org.osgi.framework.BundleEvent[source=org.apache.commons.collections [9]] modified bundleorg.apache.commons.collections {code} BundleTrackerCustomizer in BundleHookBundleTracker is called multiple times for the same event. --- Key: ARIES-851 URL: https://issues.apache.org/jira/browse/ARIES-851 Project: Aries Issue Type: Bug Components: JPA, Util Environment: Linux-3.0.0, Karaf-3.0.0-SNAPSHOT with Felix, openjdk-6 Reporter: Christoph Gritschenberger Attachments: ARIES-851-stacktrace.TXT, BundleHookBundleTracker-solution1.patch, BundleHookBundleTracker-solution2.patch, bundletracker-test-src.zip, jpa-test-bundle-src.zip, persistence-feature.xml, test.bundletracker.bundle-0.1.0-SNAPSHOT.jar, test.jpa.bundle-0.1.0-SNAPSHOT.jar Steps to reproduce * Compile or get a karaf-3.0.0-SNAPSHOT and unpack it * Install openjpa-2.2.0 (using the attached feature-file) * Deploy a bundle containing a persistence-unit (attached jar for example) get the following Exception 4 times: {code} ERROR: Bundle org.apache.aries.jpa.container [78] EventDispatcher: Error during dispatch. (java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist.) java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist. {code} See attachment for full stacktrace In subsequent startups the Exception is still thrown but the stacktrace does not show in the console or the log. Also when using equinox the Stacktrace does not appear in either the console or the log ever, but it's still thrown. The problem is that the PersistenceBundleManager#addingBundle is called multiple times for the newly installed bundle. The PersistenceBundleManager is passed as a BundleTrackerCustomizer to a BundleHookBundleTracker. The BundleHookBundleTracker stores it in it's own private attribute and also passes it to it's super-constructor. So the customizer is stored in the instance twice. It's called by both BundleTracker$Tracked.customizerAdding and BundleHookBundleTracker$Tracked.customizerAdding. Both Tracked recognize the bundle as untracked and call the addingBundle-method. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (ARIES-851) Multiple IllegalStateException when deploying a new PersistenceUnit
[ https://issues.apache.org/jira/browse/ARIES-851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christoph Gritschenberger updated ARIES-851: Attachment: test.jpa.bundle-0.1.0-SNAPSHOT.jar jpa-test-bundle-src.zip persistence-feature.xml Multiple IllegalStateException when deploying a new PersistenceUnit --- Key: ARIES-851 URL: https://issues.apache.org/jira/browse/ARIES-851 Project: Aries Issue Type: Bug Components: JPA Environment: Linux-3.0.0, Karaf-3.0.0-SNAPSHOT with Felix, openjdk-6 Reporter: Christoph Gritschenberger Attachments: jpa-test-bundle-src.zip, persistence-feature.xml, test.jpa.bundle-0.1.0-SNAPSHOT.jar Steps to reproduce * Compile or get a karaf-3.0.0-SNAPSHOT and unpack it * Install openjpa-2.2.0 (using the attached feature-file) * Deploy a bundle containing a persistence-unit (attached jar for example) get the following Exception 4 times: {code} ERROR: Bundle org.apache.aries.jpa.container [78] EventDispatcher: Error during dispatch. (java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist.) java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist. {code} See attachment for full stacktrace In subsequent startups the Exception is still thrown but the stacktrace does not show in the console or the log. Also when using equinox the Stacktrace does not appear in either the console or the log ever, but it's still thrown. The problem is that the PersistenceBundleManager#addingBundle is called multiple times for the newly installed bundle. The PersistenceBundleManager is passed as a BundleTrackerCustomizer to a BundleHookBundleTracker. The BundleHookBundleTracker stores it in it's own private attribute and also passes it to it's super-constructor. So the customizer is stored in the instance twice. It's called by both BundleTracker$Tracked.customizerAdding and BundleHookBundleTracker$Tracked.customizerAdding. Both Tracked recognize the bundle as untracked and call the addingBundle-method. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (ARIES-851) Multiple IllegalStateException when deploying a new PersistenceUnit
Christoph Gritschenberger created ARIES-851: --- Summary: Multiple IllegalStateException when deploying a new PersistenceUnit Key: ARIES-851 URL: https://issues.apache.org/jira/browse/ARIES-851 Project: Aries Issue Type: Bug Components: JPA Environment: Linux-3.0.0, Karaf-3.0.0-SNAPSHOT with Felix, openjdk-6 Reporter: Christoph Gritschenberger Attachments: jpa-test-bundle-src.zip, persistence-feature.xml, test.jpa.bundle-0.1.0-SNAPSHOT.jar Steps to reproduce * Compile or get a karaf-3.0.0-SNAPSHOT and unpack it * Install openjpa-2.2.0 (using the attached feature-file) * Deploy a bundle containing a persistence-unit (attached jar for example) get the following Exception 4 times: {code} ERROR: Bundle org.apache.aries.jpa.container [78] EventDispatcher: Error during dispatch. (java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist.) java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist. {code} See attachment for full stacktrace In subsequent startups the Exception is still thrown but the stacktrace does not show in the console or the log. Also when using equinox the Stacktrace does not appear in either the console or the log ever, but it's still thrown. The problem is that the PersistenceBundleManager#addingBundle is called multiple times for the newly installed bundle. The PersistenceBundleManager is passed as a BundleTrackerCustomizer to a BundleHookBundleTracker. The BundleHookBundleTracker stores it in it's own private attribute and also passes it to it's super-constructor. So the customizer is stored in the instance twice. It's called by both BundleTracker$Tracked.customizerAdding and BundleHookBundleTracker$Tracked.customizerAdding. Both Tracked recognize the bundle as untracked and call the addingBundle-method. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (ARIES-851) Multiple IllegalStateException when deploying a new PersistenceUnit
[ https://issues.apache.org/jira/browse/ARIES-851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christoph Gritschenberger updated ARIES-851: Attachment: ARIES-851-stacktrace.TXT Multiple IllegalStateException when deploying a new PersistenceUnit --- Key: ARIES-851 URL: https://issues.apache.org/jira/browse/ARIES-851 Project: Aries Issue Type: Bug Components: JPA Environment: Linux-3.0.0, Karaf-3.0.0-SNAPSHOT with Felix, openjdk-6 Reporter: Christoph Gritschenberger Attachments: ARIES-851-stacktrace.TXT, BundleHookBundleTracker-solution1.patch, BundleHookBundleTracker-solution2.patch, jpa-test-bundle-src.zip, persistence-feature.xml, test.jpa.bundle-0.1.0-SNAPSHOT.jar Steps to reproduce * Compile or get a karaf-3.0.0-SNAPSHOT and unpack it * Install openjpa-2.2.0 (using the attached feature-file) * Deploy a bundle containing a persistence-unit (attached jar for example) get the following Exception 4 times: {code} ERROR: Bundle org.apache.aries.jpa.container [78] EventDispatcher: Error during dispatch. (java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist.) java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist. {code} See attachment for full stacktrace In subsequent startups the Exception is still thrown but the stacktrace does not show in the console or the log. Also when using equinox the Stacktrace does not appear in either the console or the log ever, but it's still thrown. The problem is that the PersistenceBundleManager#addingBundle is called multiple times for the newly installed bundle. The PersistenceBundleManager is passed as a BundleTrackerCustomizer to a BundleHookBundleTracker. The BundleHookBundleTracker stores it in it's own private attribute and also passes it to it's super-constructor. So the customizer is stored in the instance twice. It's called by both BundleTracker$Tracked.customizerAdding and BundleHookBundleTracker$Tracked.customizerAdding. Both Tracked recognize the bundle as untracked and call the addingBundle-method. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (ARIES-851) Multiple IllegalStateException when deploying a new PersistenceUnit
[ https://issues.apache.org/jira/browse/ARIES-851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christoph Gritschenberger updated ARIES-851: Attachment: BundleHookBundleTracker-solution2.patch BundleHookBundleTracker-solution1.patch Two solutions that prevent, that addingBundle is called too often. Multiple IllegalStateException when deploying a new PersistenceUnit --- Key: ARIES-851 URL: https://issues.apache.org/jira/browse/ARIES-851 Project: Aries Issue Type: Bug Components: JPA Environment: Linux-3.0.0, Karaf-3.0.0-SNAPSHOT with Felix, openjdk-6 Reporter: Christoph Gritschenberger Attachments: ARIES-851-stacktrace.TXT, BundleHookBundleTracker-solution1.patch, BundleHookBundleTracker-solution2.patch, jpa-test-bundle-src.zip, persistence-feature.xml, test.jpa.bundle-0.1.0-SNAPSHOT.jar Steps to reproduce * Compile or get a karaf-3.0.0-SNAPSHOT and unpack it * Install openjpa-2.2.0 (using the attached feature-file) * Deploy a bundle containing a persistence-unit (attached jar for example) get the following Exception 4 times: {code} ERROR: Bundle org.apache.aries.jpa.container [78] EventDispatcher: Error during dispatch. (java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist.) java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist. {code} See attachment for full stacktrace In subsequent startups the Exception is still thrown but the stacktrace does not show in the console or the log. Also when using equinox the Stacktrace does not appear in either the console or the log ever, but it's still thrown. The problem is that the PersistenceBundleManager#addingBundle is called multiple times for the newly installed bundle. The PersistenceBundleManager is passed as a BundleTrackerCustomizer to a BundleHookBundleTracker. The BundleHookBundleTracker stores it in it's own private attribute and also passes it to it's super-constructor. So the customizer is stored in the instance twice. It's called by both BundleTracker$Tracked.customizerAdding and BundleHookBundleTracker$Tracked.customizerAdding. Both Tracked recognize the bundle as untracked and call the addingBundle-method. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Comment Edited] (ARIES-851) Multiple IllegalStateException when deploying a new PersistenceUnit
[ https://issues.apache.org/jira/browse/ARIES-851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13276712#comment-13276712 ] Christoph Gritschenberger edited comment on ARIES-851 at 5/16/12 12:59 PM: --- Attached two possible solutions that prevent, that addingBundle is called too often. was (Author: christophg): Two solutions that prevent, that addingBundle is called too often. Multiple IllegalStateException when deploying a new PersistenceUnit --- Key: ARIES-851 URL: https://issues.apache.org/jira/browse/ARIES-851 Project: Aries Issue Type: Bug Components: JPA Environment: Linux-3.0.0, Karaf-3.0.0-SNAPSHOT with Felix, openjdk-6 Reporter: Christoph Gritschenberger Attachments: ARIES-851-stacktrace.TXT, BundleHookBundleTracker-solution1.patch, BundleHookBundleTracker-solution2.patch, jpa-test-bundle-src.zip, persistence-feature.xml, test.jpa.bundle-0.1.0-SNAPSHOT.jar Steps to reproduce * Compile or get a karaf-3.0.0-SNAPSHOT and unpack it * Install openjpa-2.2.0 (using the attached feature-file) * Deploy a bundle containing a persistence-unit (attached jar for example) get the following Exception 4 times: {code} ERROR: Bundle org.apache.aries.jpa.container [78] EventDispatcher: Error during dispatch. (java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist.) java.lang.IllegalStateException: Unable to create persistence units for the bundle test.jpa.test.jpa.bundle/0.1.0.SNAPSHOT as previous persistence units already exist. {code} See attachment for full stacktrace In subsequent startups the Exception is still thrown but the stacktrace does not show in the console or the log. Also when using equinox the Stacktrace does not appear in either the console or the log ever, but it's still thrown. The problem is that the PersistenceBundleManager#addingBundle is called multiple times for the newly installed bundle. The PersistenceBundleManager is passed as a BundleTrackerCustomizer to a BundleHookBundleTracker. The BundleHookBundleTracker stores it in it's own private attribute and also passes it to it's super-constructor. So the customizer is stored in the instance twice. It's called by both BundleTracker$Tracked.customizerAdding and BundleHookBundleTracker$Tracked.customizerAdding. Both Tracked recognize the bundle as untracked and call the addingBundle-method. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira