After enabling the agent I get java.lang.ClassCastException: com.oracle.common.net.InetSocketAddress32 cannot be cast to java.net.InetSocketAddress

Document ID : KB000045292
Last Modified Date : 14/02/2018
Show Technical Document Details

Problem:

After enabling the agent, the below ERROR is reported in the agent log and sometimes a java core is created

[ERROR] [IntroscopeAgent.Agent] Exception finishing method tracer for com.oracle.common.internal.net.MultiplexedSocketProvider$MultiplexedServerSocketChannel.accept
[ERROR] [IntroscopeAgent.Agent]

java.lang.ClassCastException: com.oracle.common.net.InetSocketAddress32 cannot be cast to java.net.InetSocketAddress
                at com.wily.introscope.agent.trace.io.clamp.ChannelOnFinishClampManager.ITracer_finishTrace(ChannelOnFinishClampManager.java:45)
                at com.wily.introscope.agent.trace.InvocationData.IMethodTracer_finishTrace(InvocationData.java:1490)
                at com.oracle.common.internal.net.WrapperSocketChannel.finishConnect(WrapperSocketChannel.java:111)
                at com.oracle.common.internal.net.MultiplexedSocketProvider$MultiplexedSocketChannel.finishConnect(MultiplexedSocketProvider.java:1457)
                at com.oracle.common.internal.net.MultiplexedSocketProvider$MultiplexedSocketChannel.connect(MultiplexedSocketProvider.java:1445)
                at com.oracle.common.internal.net.socketbus.AbstractSocketBus$Connection.connect(AbstractSocketBus.java:1050)
                at com.oracle.common.internal.net.socketbus.AbstractSocketBus$Connection.access$100(AbstractSocketBus.java:932)
                at com.oracle.common.internal.net.socketbus.AbstractSocketBus.connect(AbstractSocketBus.java:239)
                at com.tangosol.coherence.component.net.MessageHandler.connect(MessageHandler.CDB:15)
                at com.tangosol.coherence.component.net.MessageHandler.connectAll(MessageHandler.CDB:24)
                at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onServiceState(Grid.CDB:38)
                at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.setServiceState(Service.CDB:8)
                at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.setServiceState(Grid.CDB:21)
                at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid$NotifyStartup.onReceived(Grid.CDB:3)
                at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:38)
                at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:23)
                at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:51)
                at java.lang.Thread.run(Thread.java:745)
...

Configuration:
-Weblogic 12.1.3
-Linux RedHat 5.8 64 bit
-Java HotSpot 1.7.0_80
-Introscope Agent 10.1, MOM 10.1

Cause:

The exceptiosn is due to the use of a special socket implementation (com.oracle.common.net.InetSocketAddress32) that didn’t extend from the standard socket class (java.net.InetSocketAddress), it is from the Coherence API.

Workaround:

1. Stop the appserver

2. Disable the below tracers in the AGENT_HOME/core/config/toggles-typical or full pbd as below:

#TurnOn: NIOSocketTracing
#TurnOn: NIOSocketSummaryTracing
#TurnOn: NIOSelectorTracing

3. Start the appserver