Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-1608

Error "ConcurrentModificationException" during startup

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.14.0
    • 1.15.0
    • Core
    • None

    Description

      Hi,

      I've upgraded our current application to Apache ISIS 1.14.0 running on Apache Tomcat 8.5.6 and after that I receive on one environment consistently this error:

      2017-04-28 16:25:08,305 [IsisWicketApplication localhost-startStop-1 ERROR]  Failed to initialize
      com.google.inject.ProvisionException: Unable to provision, see the following errors:
      
      1) Error in custom provider, java.lang.RuntimeException: An error occurred while executing code in a temporary session
        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:139)
        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:284)
              at domainapp.webapp.A1FulfilllmentApplication.init(A1FulfilllmentApplication.java:75)
              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:271)
              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:4572)
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5215)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
              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$DeployWar.run(HostConfig.java:1823)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.RuntimeException: An error occurred while executing code in a temporary session
              at org.apache.isis.core.runtime.system.session.IsisSessionFactory.doInSession(IsisSessionFactory.java:355)
              at org.apache.isis.core.runtime.system.session.IsisSessionFactory.doInSession(IsisSessionFactory.java:319)
              at org.apache.isis.core.runtime.system.session.IsisSessionFactory.doInSession(IsisSessionFactory.java:306)
              at org.apache.isis.core.runtime.system.session.IsisSessionFactoryBuilder.buildSessionFactory(IsisSessionFactoryBuilder.java:201)
              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)
              ... 22 more
      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.metamodel.specloader.validator.MetaModelValidatorVisiting.validate(MetaModelValidatorVisiting.java:46)
              at org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorComposite.validate(MetaModelValidatorComposite.java:60)
              at org.apache.isis.core.metamodel.specloader.SpecificationLoader.validate(SpecificationLoader.java:261)
              at org.apache.isis.core.metamodel.specloader.SpecificationLoader.validateAndAssert(SpecificationLoader.java:251)
              at org.apache.isis.core.runtime.system.session.IsisSessionFactoryBuilder$1.run(IsisSessionFactoryBuilder.java:206)
              at org.apache.isis.core.runtime.system.session.IsisSessionFactory$1.call(IsisSessionFactory.java:322)
              at org.apache.isis.core.runtime.system.session.IsisSessionFactory$1.call(IsisSessionFactory.java:319)
              at org.apache.isis.core.runtime.system.session.IsisSessionFactory.doInSession(IsisSessionFactory.java:353)
              ... 48 more
      2017-04-28 16:25:08,322 [ThreadPoolSupport    localhost-startStop-1 INFO ]  join'ing 6 tasks: waited 0 milliseconds
      2017-04-28 16:25:08,322 [WicketFilter         localhost-startStop-1 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.lang.RuntimeException: An error occurred while executing code in a temporary session
        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:139)
        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:284)
              at domainapp.webapp.A1FulfilllmentApplication.init(A1FulfilllmentApplication.java:75)
              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:271)
              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:4572)
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5215)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
              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$DeployWar.run(HostConfig.java:1823)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.RuntimeException: An error occurred while executing code in a temporary session
              at org.apache.isis.core.runtime.system.session.IsisSessionFactory.doInSession(IsisSessionFactory.java:355)
              at org.apache.isis.core.runtime.system.session.IsisSessionFactory.doInSession(IsisSessionFactory.java:319)
              at org.apache.isis.core.runtime.system.session.IsisSessionFactory.doInSession(IsisSessionFactory.java:306)
              at org.apache.isis.core.runtime.system.session.IsisSessionFactoryBuilder.buildSessionFactory(IsisSessionFactoryBuilder.java:201)
              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)
              ... 22 more
      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.metamodel.specloader.validator.MetaModelValidatorVisiting.validate(MetaModelValidatorVisiting.java:46)
              at org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorComposite.validate(MetaModelValidatorComposite.java:60)
              at org.apache.isis.core.metamodel.specloader.SpecificationLoader.validate(SpecificationLoader.java:261)
              at org.apache.isis.core.metamodel.specloader.SpecificationLoader.validateAndAssert(SpecificationLoader.java:251)
              at org.apache.isis.core.runtime.system.session.IsisSessionFactoryBuilder$1.run(IsisSessionFactoryBuilder.java:206)
              at org.apache.isis.core.runtime.system.session.IsisSessionFactory$1.call(IsisSessionFactory.java:322)
              at org.apache.isis.core.runtime.system.session.IsisSessionFactory$1.call(IsisSessionFactory.java:319)
              at org.apache.isis.core.runtime.system.session.IsisSessionFactory.doInSession(IsisSessionFactory.java:353)
              ... 48 more
      

      On another environment I receive it sometimes. I haven't found any difference for these environments.

      Both environments have configured JNDI datasource via Tomcat JDBC Pool.

      Thanks & Regards Timothy

      Attachments

        Issue Links

          Activity

            People

              danhaywood Daniel Keir Haywood
              Timothy Timothy Simecsek
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: