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

ConcurrentModificationException under load

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3
    • 2.2.12, 2.3.1
    • Core
    • None

    Description

      Here is the config:

      • JAXB 2.2.1.1
      • CXF 2.3.0
      • JBOSS 5.1.0
      • SPRING 3.2

      The client is configured as follows:
      <bean id="fcrsFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean" >
      <property name="address"><value>${fcrs.url}</value></property>
      <property name="serviceClass"><value>com.tascet.wsdl.fcrs.v1.FacialRecognitionService</value></property>
      <property name="serviceName"><value>FacialRecognitionService</value></property>
      <property name="endpointName"><value>FacialRecognitionServicePort</value></property>
      </bean>

      <bean id="fcrs" class="com.tascet.wsdl.fprs.v1.FingerprintRecognitionService" factory-bean="fcrsFactory" factory-method="create" scope="prototype" />

      The server is configured as follows:
      <jaxws:endpoint id="fcrs"
      implementor="#fcrsImpl"
      endpointName="s:FacialRecognitionServicePort"
      serviceName="s:FacialRecognitionService"
      address="/FacialRecognitionService"
      wsdlLocation="/WEB-INF/wsdl/FCRS.wsdl"
      xmlns:s="http://wsdl.tascet.com/fcrs/v1">

      <jaxws:properties>
      <entry key="mtom-enabled" value="true"/>
      </jaxws:properties>

      <jaxws:schemaLocations>
      <jaxws:schemaLocation>/WEB-INF/schemas/Automation_FCRS.xsd</jaxws:schemaLocation>
      <jaxws:schemaLocation>/WEB-INF/schemas/Automation_Ping.xsd</jaxws:schemaLocation>
      <jaxws:schemaLocation>/WEB-INF/schemas/Message_FCRS.xsd</jaxws:schemaLocation>
      </jaxws:schemaLocations>
      </jaxws:endpoint>

      Under moderate load with 5 concurrent users the following exception starts showing up sporadically:

      org.drools.runtime.rule.ConsequenceException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fcrs' defined in class path resource [com/tascet/incore/fcrs/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public java.lang.Object org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create()] threw exception; nested exception is java.util.ConcurrentModificationException
      at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:23)
      at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:943)
      at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:885)
      at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1086)
      at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:660)
      at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:637)
      at org.drools.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:252)
      at com.tascet.incore.main.FusionManager.execute(FusionManager.java:110)
      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:597)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      at com.tascet.common.aop.async.AsyncInvokeMethodInterceptor$1.run(AsyncInvokeMethodInterceptor.java:37)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fcrs' defined in class path resource [com/tascet/incore/fcrs/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public java.lang.Object org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create()] threw exception; nested exception is java.util.ConcurrentModificationException
      at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:568)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:973)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:879)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
      at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1045)
      at com.tascet.incore.blip.fcrs.FCManagerImpl.search12F(FCManagerImpl.java:84)
      at com.tascet.incore.blip.fc.FCProcessorImpl.executeFC12FSearch(FCProcessorImpl.java:73)
      at com.tascet.incore.blip.main.StateProcessorImpl.matchFace(StateProcessorImpl.java:85)
      at com.tascet.incore.blip.normal.Rule_9_PRE1_If_FP_1_N_search_returned_1_result_then_do_1_F_FC_Searchif_not_done_already_0.consequence(Rule_9_PRE1If_FP_1_N_search_returned_1_result_then_do_1_F_FC_Searchif_not_done_already__0.java:35)
      at com.tascet.incore.blip.normal.Rule_9_PRE1_If_FP_1_N_search_returned_1_result_then_do_1_F_FC_Searchif_not_done_already_0ConsequenceInvoker.evaluate(Rule_9_PRE1If_FP_1_N_search_returned_1_result_then_do_1_F_FC_Searchif_not_done_already__0ConsequenceInvoker.java:23)
      at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:934)
      ... 17 more
      Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public java.lang.Object org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create()] threw exception; nested exception is java.util.ConcurrentModificationException
      at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:158)
      at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:557)
      ... 30 more
      Caused by: java.util.ConcurrentModificationException
      at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
      at java.util.AbstractList$Itr.next(AbstractList.java:343)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createInputWrappedMessageParts(ReflectionServiceFactoryBean.java:1607)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createOperation(ReflectionServiceFactoryBean.java:934)
      at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.createOperation(JaxWsServiceFactoryBean.java:595)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createInterface(ReflectionServiceFactoryBean.java:907)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:433)
      at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:645)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:505)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:242)
      at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:184)
      at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
      at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
      at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:105)
      at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:124)
      at sun.reflect.GeneratedMethodAccessor345.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:146)
      ... 31 more

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            rockyalam Rocky Alam
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: