axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kim Albertsson (JIRA)" <>
Subject [jira] [Updated] (AXIS-2909) ConcurrentModificationException when running under Java 1.8.0_20 or later
Date Mon, 11 May 2015 08:11:59 GMT


Kim Albertsson updated AXIS-2909:
    Priority: Minor  (was: Major)

> ConcurrentModificationException when running under Java 1.8.0_20 or later
> -------------------------------------------------------------------------
>                 Key: AXIS-2909
>                 URL:
>             Project: Axis
>          Issue Type: Bug
>          Components: Serialization/Deserialization
>    Affects Versions: 1.4
>         Environment: java full version "1.8.0_20-b26"
>            Reporter: Kim Albertsson
>            Priority: Minor
>             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
> 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: {}Server.userException
>  faultSubcode: 
>  faultString: java.util.ConcurrentModificationException
>  faultActor: 
>  faultNode: 
>  faultDetail: 
>         {}stackTrace:java.util.ConcurrentModificationException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
>         at java.lang.reflect.Constructor.newInstance(
>         at java.lang.Class.newInstance(
>         at org.apache.axis.encoding.ser.BeanDeserializer.&lt;init&gt;(
>         at org.apache.axis.encoding.ser.BeanDeserializerFactory.getGeneralPurpose(
>         at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(
>         at org.apache.axis.encoding.DeserializationContext.getDeserializer(
>         at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(
>         at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(
>         at org.apache.axis.encoding.DeserializationContext.startElement(
>         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
>         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>         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(
>         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(
>         at org.apache.axis.Message.getSOAPEnvelope(
>         at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(
>         at org.apache.axis.client.AxisClient.invoke(
>         at org.apache.axis.client.Call.invokeEngine(
>         at org.apache.axis.client.Call.invoke(
>         at org.apache.axis.client.Call.invoke(
>         at org.apache.axis.client.Call.invoke(
>         at org.apache.axis.client.Call.invoke(
>         at test.concurrency.TestApplicationScope$
>         at

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message