axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <>
Subject Re: HELP - ConcurrentModificationException: concurrent access to HashMap -- inside Axis1.x
Date Wed, 29 Jul 2009 22:59:46 GMT
Hey Gary,

Do you want to try switching it to ConcurrentHashMap?


On 07/29/2009 06:27 PM, Gary Yue wrote:
> Hi all,
> I am geting the following exception periodically when axis server tries to deserialize
incoming requests.
> It happens at a relatively low rate (20 times a day out of heavy load traffic, like 5M
>  From the code, it looks like TypeDesc class is not thread-safe, as inside getFieldNameForElement(),
multiple threads executing this method could potentially be accessing the private member fieldElementMap
hashmap at the same time (get() and put()), which results in concurrent modification exception.
So this looks like a threading poblem inside Axis1.x framework.
> Has anyone encounter this same problem? Any advice on how to resolve this?
> I am using Axis1.1 (but i see Axis1.3 also has the exact same code there)
> thanks
> gary
>   st=java.util.ConcurrentModificationException: concurrent access to HashMap attempted
by Thread[http-,5,main]
> at java.util.HashMap.onEntry(
> at java.util.HashMap.transfer(
> at java.util.HashMap.resize(
> at java.util.HashMap.addEntry(
> at java.util.HashMap.put(
> at org.apache.axis.description.TypeDesc.getFieldNameForElement(
> at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(
> at org.apache.axis.encoding.DeserializationContextImpl.startElement(
> at org.apache.axis.message.SAX2EventRecorder.replay(
> at org.apache.axis.message.MessageElement.publishToHandler(
> at org.apache.axis.message.RPCElement.deserialize(
> at org.apache.axis.message.RPCElement.getParams(
> at
> at
> at org.apache.axis.strategies.InvocationStrategy.visit(
> at org.apache.axis.SimpleChain.doVisiting(
> at org.apache.axis.SimpleChain.invoke(
> at org.apache.axis.handlers.soap.SOAPService.invoke(
> at org.apache.axis.server.AxisServer.invoke(
> at org.apache.axis.transport.http.AxisServlet.doPostOrGet(
> at org.apache.axis.transport.http.AxisServlet.doPost(

View raw message