[ 
https://issues.apache.org/jira/browse/AXIS-2909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17189084#comment-17189084
 ] 

Vasant Shirol commented on AXIS-2909:
-------------------------------------

[~veithen], [~robertlazarski]

My previous comment about Concurrent modification exception occurs at the time 
of processing response (deserialization), which is different than what is 
mentioned in the current ticket description. Below is the stack trace:
{code:java}
AxisFaultAxisFault faultCode: 
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode:  
faultString: java.util.ConcurrentModificationException faultActor:  faultNode:  
faultDetail:  {http://xml.apache.org/axis/}hostname:127.0.0.1
java.util.ConcurrentModificationException at 
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) 
at 
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) 
at 
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
 at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
 at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
 at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2973)
 at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
 at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
 at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
 at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
 at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
 at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) 
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
 at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:648)
 at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:332)
 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 
com.alcatel.hdm.nbi.notification.service.NotificationEventServiceSoapBindingStub.processDeviceActivationResult(NotificationEventServiceSoapBindingStub.java:1001)
 at 
com.alcatel.hdm.nbi.notification.plugin.ReferenceWebservicesPlugin.sendNotification(ReferenceWebservicesPlugin.java:122)
 at 
motive.hdm.nbi.notification.plugin.NotificationTask.run(NotificationTask.java:22)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at 
java.util.concurrent.FutureTask.run(FutureTask.java:262) at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
at java.lang.Thread.run(Thread.java:745) {code}
I could reproduce this in both JDK-1.7 and JDK-1.8

> ConcurrentModificationException when running under Java 1.8.0_20 or later
> -------------------------------------------------------------------------
>
>                 Key: AXIS-2909
>                 URL: https://issues.apache.org/jira/browse/AXIS-2909
>             Project: Axis
>          Issue Type: Bug
>          Components: Serialization/Deserialization
>    Affects Versions: 1.4
>         Environment: java full version "1.8.0_20-b26"
>            Reporter: Kim Albertsson
>            Assignee: Andreas Veithen
>            Priority: Critical
>             Fix For: 1.4.1
>
>         Attachments: axis-concurrent-mod.stack-trace, diff.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Java 8u20 introduced a change in how Collections.sort is implemented. See 
> http://bugs.java.com/view_bug.do?bug_id=8032636 and 
> http://bugs.java.com/view_bug.do?bug_id=8030848.
> The sorting is now deferred to the specific list implementation which can 
> operate directly on the underlying data structure without making a defensive 
> copy beforehand. This can cause a java.util.ConcurrentModificationException 
> to occur. 
> The error can be reproduced by compiling axis-1.4.1-SNAPSHOT using java 
> 1.8.0_20 or later and running the maven test suite (mvn test). The error does 
> not manifest every single run, but I have never had to run the tests more 
> than 3 times to reproduce. The test that fails is 
> test.concurrency.TestApplicationScope.
> The issue originates in 
> org.apache.axis.description.JavaServiceDesc.getOperationsByQName where an 
> unsynchronized call to Collections.sort is made. Synchronizing over the 
> sorted array resolves the issue.
> A working patch that has been tested in the test suite is appended in 
> diff.txt.
> The stack trace from the axis test-suite is appended below. Do note however 
> that this stack trace does not show the actual error (The original error is 
> caught and rethrown). To get the stack trace where the Collections.sort call 
> is made you can run the specific test and attach the jdb configured to catch 
> all java.util.ConcurrentModificationExceptions.
> The stack trace from my jdb session is appended as 
> axis-concurrent-mod.stack-trace. It was generated from an apache tomcat 
> instance running a webservice relying on axis.
> AxisFault
>  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>  faultSubcode: 
>  faultString: java.util.ConcurrentModificationException
>  faultActor: 
>  faultNode: 
>  faultDetail: 
>         
> {http://xml.apache.org/axis/}stackTrace:java.util.ConcurrentModificationException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
> Method)
>         at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>         at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
>         at java.lang.Class.newInstance(Class.java:442)
>         at 
> org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:104)
>         at 
> org.apache.axis.encoding.ser.BeanDeserializerFactory.getGeneralPurpose(BeanDeserializerFactory.java:89)
>         at 
> org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:89)
>         at 
> org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:484)
>         at 
> org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:567)
>         at 
> org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)
>         at 
> org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1052)
>         at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown 
> Source)
>         at 
> org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(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.axis.encoding.DeserializationContext.parse(DeserializationContext.java:241)
>         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:2782)
>         at org.apache.axis.client.Call.invoke(Call.java:2765)
>         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:2391)
>         at 
> test.concurrency.TestApplicationScope$TestRunnable.run(TestApplicationScope.java:80)
>         at java.lang.Thread.run(Thread.java:745)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org
For additional commands, e-mail: java-dev-h...@axis.apache.org

Reply via email to