6

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

Shivkumar Mallesappa
  • 2,875
  • 7
  • 41
  • 68

4 Answers4

11

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.

Diceble
  • 733
  • 1
  • 7
  • 27
  • Yeah Java process was running behind the scene. After killing it in TaskManager I could run my server without any issue. – nandeesh Jan 29 '19 at 10:13
4

In Netbeans, go to: Services tab >> Servers >> Apache Tomcat >> Click Properties >> Startup tab >> Debugger Transport: Choose (Socket Port) instead of shared memory.

TiyebM
  • 2,684
  • 3
  • 40
  • 66
3

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
BohdanZ
  • 243
  • 2
  • 12
1

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.

hello_earth
  • 1,442
  • 1
  • 25
  • 39
  • just to add that sysinternals' Process Explorer would be a nice tool to determine which one of all the running java.exe processes is the one that runs tomcat – hello_earth Aug 11 '20 at 09:35