Manually Changing Glassfish domain.xml for Debug Error

蹲街弑〆低调 提交于 2020-01-01 09:33:34

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!