Java high CPU due to concurrent HashMap access in Apache Axis TypeMappingImpl.internalRegister

Solution Verified - Updated

Environment

  • JBoss Enterprise Application Platform (EAP)
  • Apache Axis

Issue

  • We are seeing high CPU due to multiple threads accessing the same HashMap at once in Apache Axis TypeMappingImpl, for example:
Thread: http-0.0.0.0-8080-5 state=runnable
	java.util.HashMap.put
	org.apache.axis.encoding.TypeMappingImpl.internalRegister
	org.apache.axis.encoding.TypeMappingImpl.register
	org.apache.axis.encoding.TypeMappingDelegate.register
	org.apache.axis.client.Call.registerTypeMapping
	org.apache.axis.client.Call.registerTypeMapping

Resolution

  • Await a fix to Apache Axis
  • Red Hat does not support Apache Axis; you can consider migrating to a supported web service stack instead.
  • You could consider adding synchronization lower in the application layer to try to prevent the improper concurrency at the Axis layer.

Root Cause

Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.