You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Kristoffer Peterhänsel (JIRA)" <ji...@apache.org> on 2009/09/22 16:10:16 UTC

[jira] Created: (AXIS2-4504) ConcurrentModificationException when running axis2 as OSGi bundle with a configadmin

ConcurrentModificationException when running axis2 as OSGi bundle with a configadmin
------------------------------------------------------------------------------------

                 Key: AXIS2-4504
                 URL: https://issues.apache.org/jira/browse/AXIS2-4504
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
    Affects Versions: 1.5
         Environment: Equinox 3.5.0 and either the Equinox or the Felix Configuration Admin Service
            Reporter: Kristoffer Peterhänsel


Running the axis2 OSGi bundle in an environment with a Configuration Admin Service installed seems to provoke an ConcurrentModificationException. Specifically if the Configuration Admin Service is started before the axis2 bundle.

This is the exception I am getting:


[Configuration Updater] ERROR org.apache.felix.configadmin - Unexpected problem executing task
java.lang.NullPointerException
        at org.apache.felix.cm.impl.ConfigurationManager.toString(ConfigurationManager.java:986)
        at org.apache.felix.cm.impl.ConfigurationManager.handleCallBackError(ConfigurationManager.java:1012)
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1116)
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:88)
[Framework Event Dispatcher] DEBUG org.apache.axis2.osgi - FrameworkEvent ERROR
org.osgi.framework.BundleException: Exception in org.apache.axis2.osgi.internal.Activator.start() of bundle org.apache.axis2.osgi.
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:805)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:754)
        at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
        at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:220)
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:330)
Caused by: java.util.ConcurrentModificationException
        at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
        at java.util.AbstractList$Itr.next(AbstractList.java:343)
        at org.apache.axis2.osgi.deployment.tracker.BundleTracker.open(BundleTracker.java:121)
        at org.apache.axis2.osgi.deployment.OSGiConfigurationContextFactory.updated(OSGiConfigurationContextFactory.java:114)
        at org.apache.axis2.osgi.internal.Activator.start(Activator.java:48)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:782)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:773)
        ... 10 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AXIS2-4504) ConcurrentModificationException when running axis2 as OSGi bundle with a configadmin

Posted by "Kristoffer Peterhänsel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristoffer Peterhänsel updated AXIS2-4504:
------------------------------------------

               Labels: osgi  (was: )
    Affects Version/s: 1.5.1

> ConcurrentModificationException when running axis2 as OSGi bundle with a configadmin
> ------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4504
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4504
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.5.1, 1.5
>         Environment: Equinox 3.5.0 and either the Equinox or the Felix Configuration Admin Service
>            Reporter: Kristoffer Peterhänsel
>         Attachments: patch.txt
>
>
> Running the axis2 OSGi bundle in an environment with a Configuration Admin Service installed seems to provoke an ConcurrentModificationException. Specifically if the Configuration Admin Service is started before the axis2 bundle.
> This is the exception I am getting:
> [Configuration Updater] ERROR org.apache.felix.configadmin - Unexpected problem executing task
> java.lang.NullPointerException
>         at org.apache.felix.cm.impl.ConfigurationManager.toString(ConfigurationManager.java:986)
>         at org.apache.felix.cm.impl.ConfigurationManager.handleCallBackError(ConfigurationManager.java:1012)
>         at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1116)
>         at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:88)
> [Framework Event Dispatcher] DEBUG org.apache.axis2.osgi - FrameworkEvent ERROR
> org.osgi.framework.BundleException: Exception in org.apache.axis2.osgi.internal.Activator.start() of bundle org.apache.axis2.osgi.
>         at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:805)
>         at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:754)
>         at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
>         at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
>         at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
>         at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
>         at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
>         at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
>         at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
>         at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:220)
>         at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:330)
> Caused by: java.util.ConcurrentModificationException
>         at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
>         at java.util.AbstractList$Itr.next(AbstractList.java:343)
>         at org.apache.axis2.osgi.deployment.tracker.BundleTracker.open(BundleTracker.java:121)
>         at org.apache.axis2.osgi.deployment.OSGiConfigurationContextFactory.updated(OSGiConfigurationContextFactory.java:114)
>         at org.apache.axis2.osgi.internal.Activator.start(Activator.java:48)
>         at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:782)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:773)
>         ... 10 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AXIS2-4504) ConcurrentModificationException when running axis2 as OSGi bundle with a configadmin

Posted by "Kristoffer Peterhänsel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristoffer Peterhänsel updated AXIS2-4504:
------------------------------------------

    Attachment: patch.txt

It seems that the problem is BundleTracker#addRegistry is not using the lock. So the lists might be changed by it while another thread is running though it. At least adding the lock seems to have fixed this issue.

So I submit this simple patch.

> ConcurrentModificationException when running axis2 as OSGi bundle with a configadmin
> ------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4504
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4504
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.5
>         Environment: Equinox 3.5.0 and either the Equinox or the Felix Configuration Admin Service
>            Reporter: Kristoffer Peterhänsel
>         Attachments: patch.txt
>
>
> Running the axis2 OSGi bundle in an environment with a Configuration Admin Service installed seems to provoke an ConcurrentModificationException. Specifically if the Configuration Admin Service is started before the axis2 bundle.
> This is the exception I am getting:
> [Configuration Updater] ERROR org.apache.felix.configadmin - Unexpected problem executing task
> java.lang.NullPointerException
>         at org.apache.felix.cm.impl.ConfigurationManager.toString(ConfigurationManager.java:986)
>         at org.apache.felix.cm.impl.ConfigurationManager.handleCallBackError(ConfigurationManager.java:1012)
>         at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1116)
>         at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:88)
> [Framework Event Dispatcher] DEBUG org.apache.axis2.osgi - FrameworkEvent ERROR
> org.osgi.framework.BundleException: Exception in org.apache.axis2.osgi.internal.Activator.start() of bundle org.apache.axis2.osgi.
>         at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:805)
>         at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:754)
>         at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
>         at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
>         at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
>         at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
>         at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
>         at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
>         at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
>         at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:220)
>         at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:330)
> Caused by: java.util.ConcurrentModificationException
>         at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
>         at java.util.AbstractList$Itr.next(AbstractList.java:343)
>         at org.apache.axis2.osgi.deployment.tracker.BundleTracker.open(BundleTracker.java:121)
>         at org.apache.axis2.osgi.deployment.OSGiConfigurationContextFactory.updated(OSGiConfigurationContextFactory.java:114)
>         at org.apache.axis2.osgi.internal.Activator.start(Activator.java:48)
>         at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:782)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:773)
>         ... 10 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.