ConcurrentModificationException during servelet initialization

ZeroTurnaround Homepage Forums JRebel Support ConcurrentModificationException during servelet initialization

This topic contains 1 reply, has 3 voices, and was last updated by  ristoparnapuu 5 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #61814

    I am getting a CME during start of our webapp (Actually in this instance, I got two!)

    It could well be an error in Spring (or even our own application) but it only happens when I am using JRebel, and when it happens within our code, it is usually at (but not always, don’t we all love a good CME!) at applicationContext.getBean().

    
    [WARNING] unavailable
    java.util.ConcurrentModificationException
    	at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
    	at java.util.ArrayList$Itr.next(ArrayList.java:851)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:423)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:412)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:398)
    	at org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType(AbstractApplicationContext.java:1040)
    	at org.apache.cxf.transport.servlet.CXFServlet.createSpringContext(CXFServlet.java:139)
    	at org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:74)
    	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(CXFNonSpringServlet.java:77)
    	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:621)
    	at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:403)
    	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:875)
    	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:346)
    	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1368)
    	at org.eclipse.jetty.maven.plugin.JettyWebAppContext.startWebapp(JettyWebAppContext.java:320)
    	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1335)
    	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:772)
    	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:259)
    	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:511)
    	at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:403)
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    	at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    	at org.eclipse.jetty.server.Server.start(Server.java:405)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106)
    	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    	at org.eclipse.jetty.server.Server.doStart(Server.java:372)
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    	at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:457)
    	at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:328)
    	at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute(JettyRunMojo.java:170)
    	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.__invoke(DelegatingMethodAccessorImpl.java:43)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    	at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
    [INFO] Initializing Spring FrameworkServlet 'springMVC'
    2017-03-02 14:43:29 JRebel: Monitoring Spring bean definitions in '/home/magne/sandbox/iscustomer/java/iscustomer-war/src/main/webapp/WEB-INF/public-servlet.xml'.
    [INFO] Initializing Spring FrameworkServlet 'uniface-api'
    2017-03-02 14:43:30 JRebel: Monitoring Spring bean definitions in '/home/magne/sandbox/iscustomer/java/iscustomer-war/src/main/webapp/WEB-INF/uniface-api-servlet.xml'.
    [INFO] Initializing Spring FrameworkServlet 'fileStreamer'
    2017-03-02 14:43:30 JRebel: Monitoring Spring bean definitions in '/home/magne/sandbox/iscustomer/java/iscustomer-war/src/main/webapp/WEB-INF/fileStreamer-servlet.xml'.
    [WARNING] Failed startup of context o.e.j.m.p.JettyWebAppContext@26bb2723{/iscustomer,[file:///home/magne/sandbox/iscustomer/java/iscustomer-war/src/main/webapp/, jar:file:///home/magne/.m2/repository/com/infosynergi/admin/admin-oracleaq/1.63/admin-oracleaq-1.63.jar!/META-INF/resources, jar:file:///home/magne/.m2/repository/com/infosynergi/admin/admin-core/1.63/admin-core-1.63.jar!/META-INF/resources, jar:file:///home/magne/.m2/repository/com/infosynergi/admin/admin-tools/1.63/admin-tools-1.63.jar!/META-INF/resources, jar:file:///home/magne/.m2/repository/com/infosynergi/issecurity/issecurity-core/1.2/issecurity-core-1.2.jar!/META-INF/resources, jar:file:///home/magne/.m2/repository/com/infosynergi/admin/admin-activemq/1.63/admin-activemq-1.63.jar!/META-INF/resources, jar:file:///home/magne/.m2/repository/com/infosynergi/admin/admin-database/1.63/admin-database-1.63.jar!/META-INF/resources, jar:file:///home/magne/.m2/repository/com/infosynergi/admin/admin-dev/1.63/admin-dev-1.63.jar!/META-INF/resources, jar:file:///home/magne/.m2/repository/com/infosynergi/admin/admin-logging/1.63/admin-logging-1.63.jar!/META-INF/resources, jar:file:///home/magne/.m2/repository/com/infosynergi/admin/admin-applicationevents/1.63/admin-applicationevents-1.63.jar!/META-INF/resources, jar:file:///home/magne/.m2/repository/com/infosynergi/admin/admin-ehcache/1.63/admin-ehcache-1.63.jar!/META-INF/resources, jar:file:///home/magne/.m2/repository/com/infosynergi/admin/admin-issecurity/1.63/admin-issecurity-1.63.jar!/META-INF/resources],STARTING}{file:///home/magne/sandbox/iscustomer/java/iscustomer-war/src/main/webapp/}
    javax.servlet.ServletException: CXFServlet-REST@37f77f6d==org.apache.cxf.transport.servlet.CXFServlet,1,false
    	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:642)
    	at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:403)
    	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:875)
    	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:346)
    	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1368)
    	at org.eclipse.jetty.maven.plugin.JettyWebAppContext.startWebapp(JettyWebAppContext.java:320)
    	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1335)
    	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:772)
    	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:259)
    	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:511)
    	at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:403)
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    	at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    	at org.eclipse.jetty.server.Server.start(Server.java:405)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106)
    	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    	at org.eclipse.jetty.server.Server.doStart(Server.java:372)
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    	at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:457)
    	at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:328)
    	at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute(JettyRunMojo.java:170)
    	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.__invoke(DelegatingMethodAccessorImpl.java:43)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    	at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
    Caused by: java.util.ConcurrentModificationException
    	at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
    	at java.util.ArrayList$Itr.next(ArrayList.java:851)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:423)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:412)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:398)
    	at org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType(AbstractApplicationContext.java:1040)
    	at org.apache.cxf.transport.servlet.CXFServlet.createSpringContext(CXFServlet.java:139)
    	at org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:74)
    	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(CXFNonSpringServlet.java:77)
    	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:621)
    	... 54 more
    [INFO] Started ServerConnector@a822d03{HTTP/1.1,[http/1.1]}{0.0.0.0:9060}
    [INFO] Started @310160ms
    [INFO] Started Jetty Server
    
    #61827

    ristoparnapuu
    Rebel Staff

    Hi,

    To get a better understanding of the issue we would need to see the jrebel.log log file. Could you send us a trace level jrebel.log file to support@zeroturnaround.com after reproducing this issue? You can find instructions on how to generate this file from https://manuals.zeroturnaround.com/jrebel/misc/sendinglogs.html.

    Also, please add this forum link to the email.

    All the best,
    Risto

    #62002

    Log file incoming!

    Hopefully you can see what happens here, its a whooping 700+MB, so I do expect a response within, say 30 minutes? :P

    #62055

    I am experiencing the same issue and the exact same stacktrace, so if any solution is incoming, I hope I can be a part of it as well.

    #62084

    Note that downgrading to 6.5.2 and using legacy agent seems to have fixed the issue for now.

    #62381

    The issue unfortunately persisted for me, but using the 7.0.8-SNAPSHOT nightly fixed the CME for me. However a new, probably related to JSF issue surfaced. Logs submitted to support.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.