简体   繁体   中英

Debugging is not working in Netbeans Tomcat

I am getting the following error when I am trying to Debug my project in Netbeans 8 IDE , I am using Apache Tomcat 8.

FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: transport error 202: failed to create shared memory listener: Cannot create a file when that file already exists
ERROR: JDWP Transport dt_shmem failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750

I am not able to understand the problem.

Can somebody please explain me the problem, cause of the problem and solution.

Thanks

I had the same problem and was indeed caused by what hello_earth mentioned. Probably when you open you taskmanager you will see that multiple java se processes are running. Kill them both and then it works again.

Somewhere, the port has been occupied, you have to check where. (Sometimes it could be skype). Also, you can try to override the default value to some else parameter in local.properties file.

tomcat.debugjavaoptions=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8005,suspend=n

in my case this happened after killing / or trying to force kill a hanged tomcat instance which was started from the Netbeans. either it was not completely killed (some left open file?), or somehow was spawned again by Netbeans after i killed it. killing tomcat and restarting netbeans solved the issue for me.

在Netbeans中,转到:服务选项卡>>服务器>> Apache Tomcat >>单击属性>>启动选项卡>>调试器传输:选择(套接字端口)而不是共享内存。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM