An error has occurred while processing the shared archive file. Tool agent requires sharing to be disabled

Viewed 376

I am trying to enable to datadog tracing for lambda function. I have followed the steps mentioned here https://docs.datadoghq.com/serverless/installation/java/?tab=maven. After adding the layer and the environment variable I am getting below error. Can anyone please suggest how to fix this....

Picked up JAVA_TOOL_OPTIONS: -javaagent:"/opt/java/lib/dd-java-agent.jar" An error has occurred while processing the shared archive file. Tool agent requires sharing to be disabled. Error occurred during initialization of VM Unable to use shared archive

1 Answers

try changing the JAVA_TOOL_OPTIONS: -javaagent:"/opt/java/lib/dd-java-agent.jar" env var to JAVA_TOOL_OPTIONS: -javaagent:"/opt/java/lib/dd-java-agent.jar" -Xshare:"off" and see if that helps.

Related