Question

Cannot run project from IntelliJ IDEA because of jdwp error

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 command line for duplicate jdwp options.
Disconnected from server
Error occurred during initialization of VM
agent library failed to init: jdwp

When I click the run button it works. What is the matter?

 21  29460  21
1 Jan 1970

Solution

 46

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.

2012-08-31

Solution

 7

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

2011-05-13