Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-1525

Problems with startup under certain circumstances

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.13.0
    • Fix Version/s: 1.13.1
    • Component/s: Core
    • Labels:
      None

      Description

      see mailing list thread

      https://lists.apache.org/thread.html/e468c2e6d12172402e65c3158aca1758d564cef4a1ca6b8027e5b0ef@%3Cusers.isis.apache.org%3E

      Has anyone observed problems with running version 1.13.0? We upgraded a while ago and a bit after that we saw sometimes this error when redeploying our application on tomcat:

      2016-10-14 14:29:21,690 [IsisWicketApplication http-nio-18080-exec-103 ERROR] Failed to initialize com.google.inject.ProvisionException: Unable to provision, see the following errors:  1) Error in custom provider, java.util.ConcurrentModificationException at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSessionFactory(IsisInjectModule.java:109) at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSessionFactory(IsisInjectModule.java:109) while locating org.apache.isis.core.runtime.system.session.IsisSessionFactory for field at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.isisSessionFactory(IsisWicketApplication.java:138) while locating domainapp.webapp.A1FulfilllmentApplication  1 error at com.google.inject.internal.Errors.throwProvisionExceptionIfErrorsExist(Errors.java:482) at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:67) at com.google.inject.internal.InjectorImpl.injectMembers(InjectorImpl.java:984) at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.init(IsisWicketApplication.java:279) at domainapp.webapp.A1FulfilllmentApplication.init(A1FulfilllmentApplication.java:73) at org.apache.wicket.Application.initApplication(Application.java:823) at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:427) at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:351) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4561) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5204) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:952) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:473) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1617) at sun.reflect.GeneratedMethodAccessor3189.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1483) at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:731) at org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:424) at javax.servlet.http.HttpServlet.service(HttpServlet.java:651) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:632) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) 
      

      Caused by:

      java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextNode(HashMap.java:1437) at java.util.HashMap$ValueIterator.next(HashMap.java:1466) at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1042) at org.apache.isis.core.runtime.system.session.IsisSessionFactory.constructServices(IsisSessionFactory.java:151) at org.apache.isis.core.runtime.system.session.IsisSessionFactoryBuilder.buildSessionFactory(IsisSessionFactoryBuilder.java:204) at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSessionFactory(IsisInjectModule.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.google.inject.internal.ProviderMethod$ReflectionProviderMethod.doProvision(ProviderMethod.java:299) at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:172) at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81) at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53) at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61) at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54) at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132) at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:93) at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:80) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:80) at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:62) ... 54 more 2016-10-14 14:29:21,703 [ThreadPoolSupport http-nio-18080-exec-103 INFO ] join'ing 6 tasks: waited 1 milliseconds 2016-10-14 14:29:21,703 [WicketFilter http-nio-18080-exec-103 ERROR] The initialization of an application with name 'WicketFilter' has failed. com.google.inject.ProvisionException: Unable to provision, see the following errors:  1) Error in custom provider, java.util.ConcurrentModificationException at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSessionFactory(IsisInjectModule.java:109) at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSessionFactory(IsisInjectModule.java:109) while locating org.apache.isis.core.runtime.system.session.IsisSessionFactory for field at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.isisSessionFactory(IsisWicketApplication.java:138) while locating domainapp.webapp.A1FulfilllmentApplication  1 error at com.google.inject.internal.Errors.throwProvisionExceptionIfErrorsExist(Errors.java:482) at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:67) at com.google.inject.internal.InjectorImpl.injectMembers(InjectorImpl.java:984) at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.init(IsisWicketApplication.java:279) at domainapp.webapp.A1FulfilllmentApplication.init(A1FulfilllmentApplication.java:73) at org.apache.wicket.Application.initApplication(Application.java:823) at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:427) at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:351) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4561) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5204) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:952) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:473) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1617) at sun.reflect.GeneratedMethodAccessor3189.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1483) at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:731) at org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:424) at javax.servlet.http.HttpServlet.service(HttpServlet.java:651) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:632) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextNode(HashMap.java:1437) at java.util.HashMap$ValueIterator.next(HashMap.java:1466) at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1042) at org.apache.isis.core.runtime.system.session.IsisSessionFactory.constructServices(IsisSessionFactory.java:151) at org.apache.isis.core.runtime.system.session.IsisSessionFactoryBuilder.buildSessionFactory(IsisSessionFactoryBuilder.java:204) at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSessionFactory(IsisInjectModule.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.google.inject.internal.ProviderMethod$ReflectionProviderMethod.doProvision(ProviderMethod.java:299) at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:172) at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81) at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53) at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61) at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54) at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132) at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:93) at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:80) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:80) at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:62) ... 54 more 2016-10-14 14:29:21,720 [Application http-nio-18080-exec-103 INFO ] [WicketFilter] destroy: Wicket core library initializer 2016-10-14 14:29:21,720 [Application http-nio-18080-exec-103 INFO ] [WicketFilter] destroy: Wicket extensions initializer
      

      After this the application seems to shutdown, if I executed shutdown command for tomcat it isn't successful and the process hangs, only option is to kill it. Normally the shutdown command works perfectly! Only option is to wait some time and suddenly it starts normally. We observe a similar error sometimes during integration tests. The only message is:

      java.lang.RuntimeException: java.util.ConcurrentModificationException Caused by: java.util.ConcurrentModificationException And after that:  java.lang.RuntimeException: org.apache.isis.core.commons.exceptions.IsisException: SessionFactory already set up  Caused by: org.apache.isis.core.commons.exceptions.IsisException: SessionFactory already set up  
      

      Solution is to start the build again then it works most of the time. Has anyone an idea?

        Issue Links

          Activity

          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 28b9a255adf6784b2b1123c31ddd1bd07f640c31 in isis's branch refs/heads/master from Dan Haywood
          [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=28b9a25 ]

          ISIS-1525: takes a copy of all services prior to iterating over them during startup, to avoid an occasional concurrent modification exception.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 28b9a255adf6784b2b1123c31ddd1bd07f640c31 in isis's branch refs/heads/master from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=28b9a25 ] ISIS-1525 : takes a copy of all services prior to iterating over them during startup, to avoid an occasional concurrent modification exception.

            People

            • Assignee:
              danhaywood Dan Haywood
              Reporter:
              danhaywood Dan Haywood
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development