java.util.ConcurrentModificationException - Axis 1 Webservices Extension

Description

We migrated some webservices from Coldfusion to Lucee and we sometimes face a error that some webservices throw java.util.ConcurrentModificationException.

Lucee: 5.3.9.160
Java: 11.0.16.1
OS: Ubuntu 20.04
Axis 1 Webservices: 1.4.0.37-SNAPSHOT

For me it look like its due a old org.apache.axis version.
Error thrown due org.apache.axis.description.JavaServiceDesc.getOperationsByQName(JavaServiceDesc.java:527)
which seem to be fixed in this commit: https://github.com/apache/axis-axis1-java/commit/d75ee4619c042ded4d3ee1f7b08e379f83572575

So it should be fixed, if we can update to a newer version. But im not sure if there will be a release available… Maybe we need to cherry-pick this.

 

Stacktrace:

"ERROR","http-nio-8888-exec-128","09/01/2022","07:40:00","Axis1","AxisFault:;; nested exception is: java.util.ConcurrentModificationException;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 java.base/java.util.ArrayList.sort(ArrayList.java:1752) at java.base/java.util.Collections.sort(Collections.java:179) at org.apache.axis.description.JavaServiceDesc.getOperationsByQName(JavaServiceDesc.java:527) at org.apache.axis.MessageContext.getPossibleOperationsByQName(MessageContext.java:243) at org.apache.axis.message.BodyBuilder.onStartChild(BodyBuilder.java:132) at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:510) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2710) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824) at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216) at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635) at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:324) 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.server.AxisServer.initSOAPConstants(AxisServer.java:345) at org.apache.axis.server.AxisServer.invoke(AxisServer.java:279) at org.lucee.extension.axis.server.Axis1Server.doPost(Axis1Server.java:330) at org.lucee.extension.axis.server.Axis1Server.doPost(Axis1Server.java:221) at jdk.internal.reflect.GeneratedMethodAccessor569.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at lucee.runtime.net.rpc.ref.WSServerReflector.doPost(WSServerReflector.java:46) at lucee.runtime.ComponentPageImpl.callWebservice(ComponentPageImpl.java:990) at lucee.runtime.ComponentPageImpl.call(ComponentPageImpl.java:184) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1046) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:938) at lucee.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:65) at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:45) at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2482) at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2468) at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2439) at lucee.runtime.engine.Request.exe(Request.java:45) at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1198) at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1144) at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97) at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:840)

Environment

None

Activity

Show:

22 May 2024 at 08:10

Hi, can you explain what part you mean? And what is it replaced by?

Michael Offner 21 May 2024 at 20:00

this part of the project is deprecated and only get security fixes, sorry.

David Raschper 6 July 2023 at 12:57

Ah got it! 👍
But the problem is now that it uses axis-axis-1.4 and there does not seem to be an update available (https://mvnrepository.com/artifact/axis/axis ). Also https://mvnrepository.com/artifact/org.apache.axis/axis does not have a newer version.
Not really sure how to handle that, since https://github.com/apache/axis-axis1-java also have no release.

Currently the only way would to build axis with this fixes yourself and create a new repo for this. (Kinda what i did now).

As I undestand is upgrading to Axis2 not that easy, due its a complete rewrite and dont seem compatible. Will Axis only used for cfinvoke with webservice attribute and the cfc?wsdl ?
ACF seem to support both versions https://coldfusion.adobe.com/2017/10/axis-2-and-axis-1-compatibility-issues-in-coldfusion/ , not sure if they will do drop axis1.


Zac Spitzer 6 July 2023 at 11:54

the org axis bundle is found here https://github.com/lucee/osgi-bundle-axis it’s just some build scripts

David Raschper 6 July 2023 at 10:04

After some more time spent, i was able to build the extension. slightly smiling face
I had to take the source from https://archive.apache.org/dist/ws/axis/1_4/ and than cherry picked the concurrency-fixes.

First i wanted to build the Axis-RT-Code https://github.com/apache/axis-axis1-java/tree/master/axis-rt-core , but it seem that there need to be more work done. When using that library in the axis extension, there are coming some noclassdeffounderror-exceptions and other errors.

If anyone else have problems with this bug, feel free to use the fixed extension.
I would like to create a pull-request or help with this issue, but i still dont understand where and how you build this library (org.lucee.axis-1.4.0.0006L.jar).

 

Library:https://github.com/Xcreen/axis
Extension: https://github.com/Xcreen/axis/releases/download/1.4.1/org.lucee.axis.extension-1.4.0.40-SNAPSHOT.lex

Fixed

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 1 September 2022 at 08:11
Updated 22 May 2024 at 08:10
Resolved 21 May 2024 at 20:00

Flag notifications