0

I am using Google Stackdriver Debugger for my application. My JVM argument for including the agent looks like this :

JAVA_OPTS=-agentpath:/opt/cdbg/cdbg_java_agent.so=--cdbg_extra_class_path=/opt/tomcat/webapps/myapp/WEB-INF/classfiles
            \ -Dcom.google.cdbg.module=app_name
            \ -Dcom.google.cdbg.version=app_version 
            \ -Dcom.google.cdbg.auth.serviceaccount.enable=true
            \ -Dcom.google.cdbg.auth.serviceaccount.jsonfile=/opt/cdbg/gcp-svc.json"

But it doesn't work and the log files show the error : E0219 18:52:12.505424 31772 jni_logger.cc:61] Invalid application class path.

I have another "classpath" (/opt/tomcat/webapps/myapp/classfiles) which only has an XML file named logback.xml and is the supposed path according to the documentation, but I am not sure if it is correct. I followed this link to set that variable.

This is the source code of the debugger where it specifies the condition for raising an exception.

What is the classpath supposed to be? I also tried specifying a directory which included all the *.jar files but it didn't work as well.

Jarvis
  • 8,494
  • 3
  • 27
  • 58
  • Looking at (https://cloud.google.com/debugger/docs/setup/java#web_servers) and the Git link, your configuration files seem up to spec minus one thing that I can’t quite understand. Could be nothing but the current classpath seems to have directory redacted from what you have set in your extra_class_path= . If you change this to have identical directory names, does it still give you an invalid application class path error? – Ashik Mahbub Feb 20 '19 at 17:08
  • May I know what you mean by *identical directory names*? @AshikMahbub – Jarvis Feb 21 '19 at 03:12
  • I just re-read my message. Sorry for the fuzzy language used there. Did you have any progress with this issue since it was posted? Just wanted to clarify my comment. Your JVM argument has -- JAVA_OPTS=-[...]=--cdbg_extra_class_path=/opt/tomcat/webapps/myapp/WEB-INF/classfiles And where your classpath is /opt/tomcat/webapps/myapp/classfiles missing /WEB-INF/ Is that intentional? Second, the GIT doc lists -agentpath:/opt/cdbg/cdbg_java_agent.so=--cdbg_extra_class_path=/opt/tomcat/webapps/myapp/WEB-INF/classes And you have your myapp/classfiles [instead of classes] – Ashik Mahbub Feb 21 '19 at 21:50

0 Answers0