Uploaded image for project: 'JBoss OSGi'
  1. JBoss OSGi
  2. JBOSGI-805

ConcurrentModificationException from AbstractWiring when loading a dynamically imported class

    Details

      Description

      java.util ConcurrentModificationException
      at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901) [rt.jar:1.8.0_102]
      at java.util.ArrayList$Itr.next(ArrayList.java:851) [rt.jar:1.8.0_102]
      at org.jboss.osgi.resolver.spi.AbstractWiring.addProvidedWire(AbstractWiring.java:120)
      at org.jboss.osgi.framework.internal.FallbackLoader.loadClassLocal (FallbackLoader.java:165)
      at org.jboss.modules.Module.loadModuleClass(Module.java:613) [jboss-modules.jar:1.5.1.Final]
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.5.1.Final]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363) [jboss-modules.jar:1.5.1.Final]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351) [jboss-modules.jar:1.5.1.Final]
      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93) [jboss-modules.jar:1.5.1.Final]
      ...
      

      Steps that cause the exception to occur:
      1. bundle with DIP: * in MANIFEST.
      2. 2 different threads call above mentioned bundle with the same class that needs to be imported dynamically.

      This exception is timing based and does not happen every time but in our environment happens about 20% of the time.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                arcivanov Arcadiy Ivanov
                Reporter:
                hannu1 Hannu Lahtinen
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: