Cannot run project from IntelliJ IDEA because of jdwp error

前端 未结 6 1817
抹茶落季
抹茶落季 2021-02-07 05:55

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         


        
相关标签:
6条回答
  • 2021-02-07 06:24

    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

    0 讨论(0)
  • 2021-02-07 06:24
    1. 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="">
      

    2. 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.

    0 讨论(0)
  • 2021-02-07 06:26

    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

    0 讨论(0)
  • 2021-02-07 06:32

    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.

    0 讨论(0)
  • 2021-02-07 06:34

    I guess you already are debugging the server app? In this case it's not possible to connect another instance of debugger.

    0 讨论(0)
  • 2021-02-07 06:36

    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.

    0 讨论(0)
提交回复
热议问题