Seeing a Hashmap error after enabling the SOA Performance Management Agent Extension.

book

Article ID: 4223

calendar_today

Updated On:

Products

APP PERF MANAGEMENT CA Application Performance Management Agent (APM / Wily / Introscope) CUSTOMER EXPERIENCE MANAGER INTROSCOPE

Issue/Introduction

After enabling the SOA Performance Management Agent Extension, we see the below exception in the log:

 Caused by: java.lang.ClassCastException: java.util.HashMap cannot be cast to com.sun.xml.ws.transport.Headers 
    at com.sun.xml.ws.client.RequestContext.fill(RequestContext.java:363) 
   at com.sun.xml.ws.client.Stub.configureRequestPacket(Stub.java:412) 
   at com.sun.xml.ws.client.Stub.process(Stub.java:375) 
   at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:189) 
   at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:119) 
   at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:102) 
   at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:172)

Cause

The ClassCastException is due to a SOA Performance compatibility issue with the newer JAX-WS versions that expect to use com.sun.xml.ws.transport.Headers instead of java.util.HashMap. Starting from APM 9.7, the below property is available to allow using com.sun.xml.ws.transport.Headers instead of java.util.HashMap and to mitigate the ClassCastException.  This change does not have any side effect in the Cross Process Transaction Tracing or Cross-JVM.

Environment

All supported Introscope releases after APM 9.7.

Resolution

1. Stop the Appserver/JVM.

2. Open the APM Agent property file : <Agent Home>/core/config/IntroscopeAgent.profile

3. Uncomment the below property to prevent the exception

    # SOA property for 2.2.6 or later versions of JAXWS Jar 

    # JAXWS jar has changed some methods in 2.2.6 and later versions 

    # Uncomment this property if JAXWS version is 2.2.6 or higher 

    com.wily.introscope.agent.soa.JAXWSHeadersClassName=com.sun.xml.ws.transport.Headers 

 4. Save and restart the Agent/Appserver,