javaee / metro-jax-ws

https://javaee.github.io/metro-jax-ws/
Other
132 stars 68 forks source link

ConcurrentModificationException in HandlerConfigurator #1172

Open glassfishrobot opened 9 years ago

glassfishrobot commented 9 years ago
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429)
at java.util.HashMap$KeyIterator.next(HashMap.java:1453)
at com.sun.xml.ws.client.HandlerConfigurator$AnnotationConfigurator.logGetChain(HandlerConfigurator.java:186)
at com.sun.xml.ws.client.HandlerConfigurator$AnnotationConfigurator.configureHandlers(HandlerConfigurator.java:149)
at com.sun.xml.ws.client.PortInfo.createBinding(PortInfo.java:162)
at com.sun.xml.ws.client.SEIPortInfo.createBinding(SEIPortInfo.java:89)
at com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:809)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:452)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:420)
at javax.xml.ws.Service.getPort(Service.java:175)
at xxx.Service.getNsSisQueryPort(NsSisQueryService.java:82)
at xxx.NsSisQueryClientAsync.getPort(NsSisQueryClientAsync.java:66)

Environment

Oracle JDK8, OpenJDK8

Affected Versions

[2.2.10]

glassfishrobot commented 9 years ago

Reported by dmatej

glassfishrobot commented 9 years ago

dmatej said: javax.xml.ws.Service should be thread safe, but Port is not thread safe. HandlerConfigurator uses it's own map and if I understand well, it configures all ports obtained via Service.getPort. If I have more threads calling getPort, they may meet on the hashmap - and there is the problem. I think the ConcurrentHashMap could resolve the issue ...

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA JAX_WS-1172