質問

I'm developing plugin for JMeter and I want to connect to jmeter-server at runtime from Intellij IDEA. I've added to jmeter.bat the following string:

set JVM_ARGS=-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=1099, suspend=n

But when I try to connect, I receive the following error:

Listening for transport dt_socket at address: 1099
java.lang.NoClassDefFoundError: suspend=n
Caused by: java.lang.ClassNotFoundException: suspend=n
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: suspend=n.  Program will exit.
Exception in thread "main" errorlevel=1

I've started jmeter and jmeter-server on the same machine, but specified port for jmeter-server. Can you explain me, what am I doing wrong?

I tried to remove extra space in JVM_ARGS, as I was told, but still having error:

    Found ApacheJMeter_core.jar
Listening for transport dt_socket at address: 1099
Created remote object: UnicastServerRef [liveRef: [endpoint:[192.168.56.1:50900](local),objID:[-6928e8c:13b637ed53e:-7fff, 6493737834091623438]]]
Problem creating registry: java.rmi.server.ExportException: Port already in use: 1099; nested exception is: 
    java.net.BindException: Address already in use: JVM_Bind
Continuing...
Server failed to start: java.rmi.RemoteException: Cannot start. See server log file.; nested exception is: 
    java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: 
    java.io.EOFException
An error occurred: Cannot start. See server log file.; nested exception is: 
    java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: 
    java.io.EOFException
Debugger failed to attach: timeout during handshake

Am I missing something?

役に立ちましたか?

解決

There's an extra space before the suspend parameter which causes the JVM to interpret it as the first non-option paramter (i.e. the main class name).

Try replacing the line above with:

set JVM_ARGS=-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=1099,suspend=n
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top