问题
I have this line of code at domain.xml:
<java-config classpath-suffix="" debug-enabled="false" debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=n,suspend=y,address=9009" env-classpath-ignored="true" java-home="${com.sun.aas.javaRoot}" javac-options="-g" rmic-options="-iiop -poa -alwaysgenerate -keepgenerated -g" system-classpath="">
If I start the domain there is no error. However I want to get debug feature so I changed this part like this:
debug-enabled="true"
When I want to start the domain it gives error:
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]
What may be the problem?
回答1:
Change
-Xrunjdwp:transport=dt_socket,server=n,suspend=y,address=9009
to
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009
回答2:
Within Glassfish 3.0.1 there are many domain.xml files. You must be sure to modify the one corresponding to your domain like:
<GLASSFISH_HOME>/domains/domain1/config/domain.xml
来源:https://stackoverflow.com/questions/5140168/manually-changing-glassfish-domain-xml-for-debug-error