Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2105

The CxfBusLifeCycleManager can cause ConcurrentModificationExceptions to be thrown

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.10
    • 2.0.11, 2.1.5
    • Core
    • None

    Description

      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)

      Attachments

        1. Mar11.patch
          2 kB
          Eamonn Dwyer

        Activity

          People

            dkulp Daniel Kulp
            eamonndwyer Eamonn Dwyer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: