I have a project in IntelliJ IDEA I want to run locally. When I click its debug button it says:
ERROR: Cannot load this JVM TI agent twice, check your java comma
Thanks for the tips, it helped me work out the problem too. Mine was due to having set DEBUG_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
In my catalina.bat
check server.xml if you have jvmEntries get rid of that entry from server.xml
<!-- <jvmEntries xmi:id="JavaVirtualMachine_1" classpath="" bootClasspath="" verboseModeClass="false" verboseModeGarbageCollection="false" verboseModeJNI="false" runHProf="false" hprofArguments="" debugMode="false" debugArgs="-Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7777" genericJvmArguments="">
Open admin console (http://localhost:9060/ibm/console/login.do)
Application servers > server1 > Debugging service
un-check Enable service at server startup if checked restart server.
I had the same problem in my case -Xrunjdwp
was set twice: one in the IDEA debug configuration and again in the system variables in CATAALINA_OPTS
.
once I removed it from system variables (inside the IDEA it is read only) problem was fixed
This is probably too late to help you, but maybe it will help somebody else. The answer is based on a support forum posting by Aleksei Sosnovski.
This can happen when your JAVA_OPTS
contains two -Xrunjdwp
arguments. E.g., one of these arguments might come from the server start script invoked by IntelliJ to start the container, and another may be added by IntelliJ itself. You can check by looking at JAVA_OPTS
in the log when launching the container without debug. If you see an -Xrunjdwp
argument, just find where it is set in the container startup script, and remove it.
I guess you already are debugging the server app? In this case it's not possible to connect another instance of debugger.
Most likely the problem happens because you have specified the debugging options in the "VM parameters" field of your run configuration. Everything will work if you remove them.