Adobe AEM instrumented with JavaAgent keeps disconnecting from the Introscope EM
Symptoms:
From Webview, agent keeps connecting and disconnecting.
The Agent log shows Agent is connecting/disconnecting every 30s, the connection always broke shortly after connection due to below Exception:
[DEBUG] [IntroscopeAgent.IncomingMessageDeliveryTask] Unrecoverable exception while reading from Socket Transport connected with Socket[addr=/<ip_address>,port=5001,localport=<port>]
java.lang.UnsupportedOperationException: Deserialization not allowed for class com.wily.introscope.spec.agent.beans.autotracing.AgentMetricThresholdTrigger (on <date>)
at org.kantega.notsoserial.DefaultNotSoSerial.preventDeserialization(DefaultNotSoSerial.java:256)
at org.kantega.notsoserial.DefaultNotSoSerial.onBeforeResolveClass(DefaultNotSoSerial.java:248)
at org.kantega.notsoserial.ObjectInputStreamClassVisitor.onBeforeResolveClass(ObjectInputStreamClassVisitor.java:48)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1868)
...
APM Java Agent
The problem is is related to a Deserialization Firewall from Adobe AEM. Firewall is blocking the deserialization of wily agent classes.
https://helpx.adobe.com/experience-manager/kb/deserialization-not-allowed-error.html
Add our classes (com.wily.) to the so called white-list section on AEM
Here are some reference discussing the issue and solution:
https://helpx.adobe.com/experience-manager/kb/deserialization-not-allowed-error.html
https://stackoverflow.com/questions/53328686/fop-aem-deserialization-not-allowed-for-class-org-apache-fop-fonts-fontcache