ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)

The error message is as follows:

FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: transport error 202: handshake failed - connection prematurally closed
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:750]

solution:

Add the following line to the /etc/hosts file
127.0.0.1 localhost localhost

in case of such a problem, please follow the following steps to check:
1. Set host:127.0.0.1 localhost; 2. Set the debug port of MyEclipse to see if it is consistent with the debug port of tomcat; 3. Check to see if any other running process occupies the debug port; 4. Configure the firewall to allow javaw.exe to access the network.

Read More: