AnsweredAssumed Answered

ConcurrentModificationException

Question asked by dirko on Nov 13, 2008
Hello,

I have a multi-threaded bulk load routine using webservices. Once and a while (in fact very rarely), i obtain the below exception on the line

UpdateResult[] result = repositoryService.update(cml);

has anyone else encountered this (looks like a bug to me).

(before someone asks: i don't have a detailed/useful alfresco log for this event).
cheers,
dirk

2008-11-08 21:15:52,WARN,eu.xenit.alfresco.ra.RemoteRepositoryAccess,pool-4-thread-5,458,RemoteRepositoryAccess,storeFile
Stacktrace:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString:
faultActor:
faultNode:
faultDetail:
       {http://www.alfresco.org/ws/service/repository/1.0}RepositoryFault:<ns1:errorCode>0</ns1:errorCode><ns1:message>java.util.ConcurrentModificationException</ns1:message>
       {http://xml.apache.org/axis/}exceptionName:org.alfresco.repo.webservice.repository.RepositoryFault
       {http://xml.apache.org/axis/}stackTrace:
       at org.alfresco.repo.webservice.repository.RepositoryWebService.update(RepositoryWebService.java:341)
       at sun.reflect.GeneratedMethodAccessor769.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
       at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
       at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
       at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
       at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
       at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
       at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
       at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
       at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
       at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
       at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
       at java.lang.Thread.run(Thread.java:595)

       {http://xml.apache.org/axis/}hostname:spbeapp70023


       at sun.reflect.GeneratedConstructorAccessor35.newInstance(Unknown Source)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
       at java.lang.Class.newInstance0(Class.java:355)
       at java.lang.Class.newInstance(Class.java:308)
       at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:104)
       at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:90)
       at org.alfresco.webservice.repository.RepositoryFault.getDeserializer(RepositoryFault.java:146)
       at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:154)
       at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:84)
       at org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:464)
       at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:547)
       at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)
       at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
       at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
       at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
       at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
       at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
       at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
       at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
       at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
       at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
       at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
       at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
       at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
       at org.apache.axis.client.Call.invoke(Call.java:2767)
       at org.apache.axis.client.Call.invoke(Call.java:2443)
       at org.apache.axis.client.Call.invoke(Call.java:2366)
       at org.apache.axis.client.Call.invoke(Call.java:1812)
       at org.alfresco.webservice.repository.RepositoryServiceSoapBindingStub.update(RepositoryServiceSoapBindingStub.java:986)
       at eu.xenit.alfresco.ra.RemoteRepositoryAccess.storeFile(RemoteRepositoryAccess.java:449)
       at eu.xenit.vivium.poller.DocDumper.run(DocDumper.java:151)
       at eu.xenit.vivium.poller.DocDumper.run(DocDumper.java:132)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
       at java.lang.Thread.run(Thread.java:619)

Outcomes