You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Eamonn Dwyer (JIRA)" <ji...@apache.org> on 2009/03/11 19:10:50 UTC
[jira] Created: (CXF-2105) The CxfBusLifeCycleManager can cause
ConcurrentModificationExceptions to be thrown
The CxfBusLifeCycleManager can cause ConcurrentModificationExceptions to be thrown
----------------------------------------------------------------------------------
Key: CXF-2105
URL: https://issues.apache.org/jira/browse/CXF-2105
Project: CXF
Issue Type: Bug
Components: Core
Affects Versions: 2.0.10
Reporter: Eamonn Dwyer
Fix For: 2.0.11
The CxfBusLifeCycleManager has a list of listeners. in a number of occasions it iterates over this list and makes calls out to each listener. Each listener can then call back into the CxfBusLifeCycleManager and potentially try access the listeners. This causes the exception. Typically the exception thrown looks like.
java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:449)
at java.util.AbstractList$Itr.next(AbstractList.java:420)
at org.apache.cxf.buslifecycle.CXFBusLifeCycleManager.preShutdown(CXFBusLifeCycleManager.java:81)
at org.apache.cxf.bus.CXFBusImpl.shutdown(CXFBusImpl.java:122)
at org.apache.cxf.testutil.common.AbstractBusClientServerTestBase.deleteStaticBus(AbstractBusClientServerTestBase.java:89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
at org.junit.internal.runners.BeforeAndAfterRunner.runAfters(BeforeAndAfterRunner.java:65)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:37)
at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-2105) The CxfBusLifeCycleManager can cause
ConcurrentModificationExceptions to be thrown
Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-2105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680973#action_12680973 ]
Daniel Kulp commented on CXF-2105:
----------------------------------
Actually, the fix is even easier:
- listeners = new ArrayList<BusLifeCycleListener>();
+ listeners = new CopyOnWriteArrayList<BusLifeCycleListener>();
Anyway, I'll get the committed and merged down.
> The CxfBusLifeCycleManager can cause ConcurrentModificationExceptions to be thrown
> ----------------------------------------------------------------------------------
>
> Key: CXF-2105
> URL: https://issues.apache.org/jira/browse/CXF-2105
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.10
> Reporter: Eamonn Dwyer
> Assignee: Daniel Kulp
> Fix For: 2.0.11
>
> Attachments: Mar11.patch
>
>
> The CxfBusLifeCycleManager has a list of listeners. in a number of occasions it iterates over this list and makes calls out to each listener. Each listener can then call back into the CxfBusLifeCycleManager and potentially try access the listeners. This causes the exception. Typically the exception thrown looks like.
> java.util.ConcurrentModificationException
> at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:449)
> at java.util.AbstractList$Itr.next(AbstractList.java:420)
> at org.apache.cxf.buslifecycle.CXFBusLifeCycleManager.preShutdown(CXFBusLifeCycleManager.java:81)
> at org.apache.cxf.bus.CXFBusImpl.shutdown(CXFBusImpl.java:122)
> at org.apache.cxf.testutil.common.AbstractBusClientServerTestBase.deleteStaticBus(AbstractBusClientServerTestBase.java:89)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
> at org.junit.internal.runners.BeforeAndAfterRunner.runAfters(BeforeAndAfterRunner.java:65)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:37)
> at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
> at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
> at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CXF-2105) The CxfBusLifeCycleManager can cause
ConcurrentModificationExceptions to be thrown
Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-2105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp resolved CXF-2105.
------------------------------
Resolution: Fixed
Fix Version/s: 2.1.5
> The CxfBusLifeCycleManager can cause ConcurrentModificationExceptions to be thrown
> ----------------------------------------------------------------------------------
>
> Key: CXF-2105
> URL: https://issues.apache.org/jira/browse/CXF-2105
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.10
> Reporter: Eamonn Dwyer
> Assignee: Daniel Kulp
> Fix For: 2.0.11, 2.1.5
>
> Attachments: Mar11.patch
>
>
> The CxfBusLifeCycleManager has a list of listeners. in a number of occasions it iterates over this list and makes calls out to each listener. Each listener can then call back into the CxfBusLifeCycleManager and potentially try access the listeners. This causes the exception. Typically the exception thrown looks like.
> java.util.ConcurrentModificationException
> at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:449)
> at java.util.AbstractList$Itr.next(AbstractList.java:420)
> at org.apache.cxf.buslifecycle.CXFBusLifeCycleManager.preShutdown(CXFBusLifeCycleManager.java:81)
> at org.apache.cxf.bus.CXFBusImpl.shutdown(CXFBusImpl.java:122)
> at org.apache.cxf.testutil.common.AbstractBusClientServerTestBase.deleteStaticBus(AbstractBusClientServerTestBase.java:89)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
> at org.junit.internal.runners.BeforeAndAfterRunner.runAfters(BeforeAndAfterRunner.java:65)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:37)
> at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
> at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
> at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-2105) The CxfBusLifeCycleManager can cause
ConcurrentModificationExceptions to be thrown
Posted by "Eamonn Dwyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-2105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680961#action_12680961 ]
Eamonn Dwyer commented on CXF-2105:
-----------------------------------
I should add I spotted this while using the
http://svn.apache.org/repos/asf/cxf/branches/2.0.x-fixes
branch so the fix could be applied just there.
> The CxfBusLifeCycleManager can cause ConcurrentModificationExceptions to be thrown
> ----------------------------------------------------------------------------------
>
> Key: CXF-2105
> URL: https://issues.apache.org/jira/browse/CXF-2105
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.10
> Reporter: Eamonn Dwyer
> Fix For: 2.0.11
>
> Attachments: Mar11.patch
>
>
> The CxfBusLifeCycleManager has a list of listeners. in a number of occasions it iterates over this list and makes calls out to each listener. Each listener can then call back into the CxfBusLifeCycleManager and potentially try access the listeners. This causes the exception. Typically the exception thrown looks like.
> java.util.ConcurrentModificationException
> at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:449)
> at java.util.AbstractList$Itr.next(AbstractList.java:420)
> at org.apache.cxf.buslifecycle.CXFBusLifeCycleManager.preShutdown(CXFBusLifeCycleManager.java:81)
> at org.apache.cxf.bus.CXFBusImpl.shutdown(CXFBusImpl.java:122)
> at org.apache.cxf.testutil.common.AbstractBusClientServerTestBase.deleteStaticBus(AbstractBusClientServerTestBase.java:89)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
> at org.junit.internal.runners.BeforeAndAfterRunner.runAfters(BeforeAndAfterRunner.java:65)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:37)
> at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
> at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
> at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CXF-2105) The CxfBusLifeCycleManager can cause
ConcurrentModificationExceptions to be thrown
Posted by "Eamonn Dwyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-2105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eamonn Dwyer updated CXF-2105:
------------------------------
Attachment: Mar11.patch
The patch attached is a possible solution to this issue
> The CxfBusLifeCycleManager can cause ConcurrentModificationExceptions to be thrown
> ----------------------------------------------------------------------------------
>
> Key: CXF-2105
> URL: https://issues.apache.org/jira/browse/CXF-2105
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.10
> Reporter: Eamonn Dwyer
> Fix For: 2.0.11
>
> Attachments: Mar11.patch
>
>
> The CxfBusLifeCycleManager has a list of listeners. in a number of occasions it iterates over this list and makes calls out to each listener. Each listener can then call back into the CxfBusLifeCycleManager and potentially try access the listeners. This causes the exception. Typically the exception thrown looks like.
> java.util.ConcurrentModificationException
> at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:449)
> at java.util.AbstractList$Itr.next(AbstractList.java:420)
> at org.apache.cxf.buslifecycle.CXFBusLifeCycleManager.preShutdown(CXFBusLifeCycleManager.java:81)
> at org.apache.cxf.bus.CXFBusImpl.shutdown(CXFBusImpl.java:122)
> at org.apache.cxf.testutil.common.AbstractBusClientServerTestBase.deleteStaticBus(AbstractBusClientServerTestBase.java:89)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
> at org.junit.internal.runners.BeforeAndAfterRunner.runAfters(BeforeAndAfterRunner.java:65)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:37)
> at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
> at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
> at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CXF-2105) The CxfBusLifeCycleManager can cause
ConcurrentModificationExceptions to be thrown
Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-2105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp reassigned CXF-2105:
--------------------------------
Assignee: Daniel Kulp
> The CxfBusLifeCycleManager can cause ConcurrentModificationExceptions to be thrown
> ----------------------------------------------------------------------------------
>
> Key: CXF-2105
> URL: https://issues.apache.org/jira/browse/CXF-2105
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.10
> Reporter: Eamonn Dwyer
> Assignee: Daniel Kulp
> Fix For: 2.0.11
>
> Attachments: Mar11.patch
>
>
> The CxfBusLifeCycleManager has a list of listeners. in a number of occasions it iterates over this list and makes calls out to each listener. Each listener can then call back into the CxfBusLifeCycleManager and potentially try access the listeners. This causes the exception. Typically the exception thrown looks like.
> java.util.ConcurrentModificationException
> at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:449)
> at java.util.AbstractList$Itr.next(AbstractList.java:420)
> at org.apache.cxf.buslifecycle.CXFBusLifeCycleManager.preShutdown(CXFBusLifeCycleManager.java:81)
> at org.apache.cxf.bus.CXFBusImpl.shutdown(CXFBusImpl.java:122)
> at org.apache.cxf.testutil.common.AbstractBusClientServerTestBase.deleteStaticBus(AbstractBusClientServerTestBase.java:89)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
> at org.junit.internal.runners.BeforeAndAfterRunner.runAfters(BeforeAndAfterRunner.java:65)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:37)
> at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
> at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
> at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.