ConcurrentModificationException from getting features
zlytomek Aug 11, 2017 7:02 AMHi guys
I need a little help here.
We have a J2EE application running on JBoss AS 7.1.1 with JBossWS Native Stack 4.0.2.GA(due to backward compatibility problems). The application connects to an apache cxf web service running on tomcat using a Jax-WS client.
Recently we started getting ConcurrentModificationException from calling the service on our production environment (strack trace at the bottom).
The javax.xml.ws.Service object itself is cached in a proxy class like that:
if (service == null) {
try {
service = Service.create(wsdlURL, serviceName);
} catch (Exception e) {
.......
}
}
return service;
We are using MTOM feature when getting the port like that:
Service service = serviceProxy.getService();
if (service != null) {
T client = service.getPort(clazz, new javax.xml.ws.soap.MTOMFeature( ));
}
return client;
Any clues what could the problem? Is it possible that using features makes Service not thread safe?
I'd appreciate any info regarding the matter.
Cheers
Tom
This is the stacktrace:
Caused by: java.util.ConcurrentModificationException: null
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:839) ~[na:1.7.0_71]
at java.util.HashMap$KeyIterator.next(HashMap.java:874) ~[na:1.7.0_71]
at org.jboss.ws.metadata.umdm.FeatureSet.getFeature(FeatureSet.java:53) ~[jbossws-native-core.jar!/:4.0.2.GA]
at org.jboss.ws.metadata.umdm.EndpointMetaData.getFeature(EndpointMetaData.java:385) ~[jbossws-native-core.jar!/:4.0.2.GA]
at org.jboss.ws.metadata.umdm.FeatureAwareClientEndpointMetaDataAdapter.getFeature(FeatureAwareClientEndpointMetaDataAdapter.java:77) ~[jbossws-native-core.jar!/:4.0.2.GA]
at org.jboss.ws.core.soap.SOAPBodyElementDoc.isValidationEnabled(SOAPBodyElementDoc.java:150) ~[jbossws-native-core.jar!/:4.0.2.GA]
at org.jboss.ws.core.soap.SOAPBodyElementDoc.transitionTo(SOAPBodyElementDoc.java:84) ~[jbossws-native-core.jar!/:4.0.2.GA]
at org.jboss.ws.core.soap.SOAPContentElement.writeElement(SOAPContentElement.java:587) ~[jbossws-native-core.jar!/:4.0.2.GA]
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElementImpl.java:924) ~[jbossws-native-core.jar!/:4.0.2.GA]
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.java:909) ~[jbossws-native-core.jar!/:4.0.2.GA]
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElementImpl.java:924) ~[jbossws-native-core.jar!/:4.0.2.GA]
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.java:909) ~[jbossws-native-core.jar!/:4.0.2.GA]
at org.jboss.ws.core.soap.SOAPElementWriter.writeElementInternal(SOAPElementWriter.java:150) ~[jbossws-native-core.jar!/:4.0.2.GA]
at org.jboss.ws.core.soap.SOAPElementWriter.writeElement(SOAPElementWriter.java:131) ~[jbossws-native-core.jar!/:4.0.2.GA]
at org.jboss.ws.core.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:429) ~[jbossws-native-core.jar!/:4.0.2.GA]
at org.jboss.ws.core.soap.SOAPMessageMarshaller.write(SOAPMessageMarshaller.java:60) ~[jbossws-native-core.jar!/:4.0.2.GA]
at org.jboss.ws.core.client.transport.NettyClient.writeRequest(NettyClient.java:322) ~[jbossws-native-core.jar!/:4.0.2.GA]
at org.jboss.ws.core.client.transport.NettyClient.invokeInternal(NettyClient.java:191) ~[jbossws-native-core.jar!/:4.0.2.GA]
... 278 common frames omitted