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
It also offers you events to listen to. These events might be breakpoints, or exceptions. So "attaching a debugger" means registering your debugger as a listener to these events and register it to be able to interact with your running program.
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 Netbeans, go to: Services tab >> Servers >> Apache Tomcat >> Click Properties >> Startup tab >> Debugger Transport: Choose (Socket Port) instead of shared memory.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With