Error, 'UnsatisfiedLinkError' on DynatraceOutgoingHttpCloudEvents after adding vFunction Runtime Agent to a Java Application with the Dynatrace OneAgent also added
Overview of the Issue
This issue occurs in the following circumstances:
- An organization uses the Dynatrace OneAgent to profile their Java Application
- The organization has the Dynatrace OneAgent configured with the Java Business Events feature to log outgoing HTTP Calls enabled
- The organization adds the vFunction Agent to the Java Application
- Unexpectedly, the Java Application fails to load with the following error
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
Caused by: java.lang.UnsatisfiedLinkError: com.dynatrace.agent.cloudevents.CloudEventsNative.createConfig(Ljava/lang/String;)J
at com.dynatrace.agent.cloudevents.CloudEventsNative.createConfig(Native Method)
at com.dynatrace.agent.cloudevents.CloudEvents.createConfig(CloudEvents.java:46)
at com.dynatrace.agent.introspection.cloudevents.outgoing.OutgoingHttpCloudEvents.createOkHttp(OutgoingHttpCloudEvents.java:28)
at com.dynatrace.agent.introspection.cloudevents.outgoing.OutgoingHttpCloudEvents.<init>(OutgoingHttpCloudEvents.java:20)
at com.dynatrace.agent.Agent.getOutgoingHttpCloudEvents(Agent.java:636)
at com.dynatrace.agent.introspection.cloudevents.outgoing.apachehttp.ApacheHttpCloudEventsIntrospection.<clinit>(ApacheHttpCloudEventsIntrospection.java:42)
at com.dynatrace.agent.introspection.cloudevents.outgoing.apachehttp.ApacheHttpCloudEventsIntrospectionWrapper.<clinit>(ApacheHttpCloudEventsIntrospectionWrapper.java:21)
at vfrtshadow.vfclient.org.apache.http.impl.DefaultBHttpClientConnection.sendRequestEntity(DefaultBHttpClientConnection.java:155)
at vfrtshadow.vfclient.org.apache.http.impl.conn.CPoolProxy.sendRequestEntity(CPoolProxy.java:152)
at vfrtshadow.vfclient.org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:238)
at vfrtshadow.vfclient.org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
at vfrtshadow.vfclient.org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
at vfrtshadow.vfclient.org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at vfrtshadow.vfclient.org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at vfrtshadow.vfclient.org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at vfrtshadow.vfclient.org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at vfrtshadow.vfclient.org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at com.vfunction.vfclient.AuthClient.fetchToken(AuthClient.java:80)
at com.vfunction.vfclient.AuthClient.getClientJWT(AuthClient.java:122)
at com.vfunction.vfclient.AuthClient.getTokenLogic(AuthClient.java:168)
at com.vfunction.vfclient.AuthClient.getToken(AuthClient.java:178)
at com.vfunction.vfclient.VFClient.sendRequestHelper(VFClient.java:298)
at com.vfunction.vfclient.VFClient.sendRequest(VFClient.java:320)
at com.vfunction.vfclient.VFClient.createController(VFClient.java:95)
at com.vfunction.runtime.agent.client.PollingClient.createNewController(PollingClient.java:475)
at com.vfunction.runtime.agent.client.PollingClient.init(PollingClient.java:189)
at com.vfunction.runtime.agent.client.PollingClient.run(PollingClient.java:80)
at com.vfunction.runtime.agent.VfunctionRuntimeAgent.premain(VfunctionRuntimeAgent.java:130)
... 6 more
FATAL ERROR in native method: processing of -javaagent failed
Steps to Resolve the Issue
Take one of the two approaches to resolve this issue:
- Turn off the Dynatrace OneAgent Java Business Events feature to capture Outgoing HTTP traffic
- Disable the vFunction Packages from instrumentation to allow the vFunction Agent to connect to the vFunction Server as expected. The packages that should be excluded from instrumentation are:
com.vfunction.
vfrtshadow.