Hey Gary,

Do you want to try switching it to ConcurrentHashMap?

thanks,
dims

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 calls).
 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-0.0.0.0-8080-Processor107,5,main]
at java.util.HashMap.onEntry(HashMap.java:214)
at java.util.HashMap.transfer(HashMap.java:686)
at java.util.HashMap.resize(HashMap.java:676)
at java.util.HashMap.addEntry(HashMap.java:1049)
at java.util.HashMap.put(HashMap.java:561)
at 
org.apache.axis.description.TypeDesc.getFieldNameForElement(TypeDesc.java:355)
at 
org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:209)
at 
org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:963)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
at 
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
at 
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:184)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
at 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323)
at org.apache.axis.transport.http.AxisServlet.doPostOrGet(AxisServlet.java:954)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:816)

Reply via email to