Error starting tomcat in remote debugging mode

Tomcat does not start in debug mode. Getting below magazines.

C:\ApacheSoft\apache-tomcat-7.0.67\bin>catalina.bat jpda start Using CATALINA_BASE: "C:\ApacheSoft\apache-tomcat-7.0.67" Using CATALINA_HOME: "C:\ApacheSoft\apache-tomcat-7.0.67" Using CATALINA_TMPDIR: "C:\ApacheSoft\apache-tomcat-7.0.67\temp" Using JRE_HOME: "C:\Program Files\Java\jdk1.7.0_79" Using CLASSPATH: "C:\ApacheSoft\apache-tomcat-7.0.67\bin\bootstrap.jar;C:\ApacheSoft\apache-tomcat-7.0.67\bin\tomcat-juli.jar" =transport=dt_socket was unexpected at this time. 
+5
source share
3 answers

Let me guess, you read the link entitled "HOW TO REMOVE THE STATEMENT OF A DEBUG OPERATING ON A TOMATCO FROM INTELLA IDEAS" on blog.trifork.com.

The instructions say this for Windows in the setenv.bat file:

 set JPDA_OPTS="-agentlib:jdwp=transport=dt_socket, address=1043, server=y, suspend=n" 

Yes, that will not work. catalina.bat adds its own quotation marks, so it tries to do this:

 if not ""-agentlib:jdwp=transport=dt_socket, address=1043, server=y, suspend=n"" == "" goto gotJpdaOpts 

Better to plan this:

 set JPDA_OPTS=-agentlib:jdwp=transport=dt_socket,address=1043,server=y,suspend=n 

I know this is almost a year ago, but I came across this and ultimately had to remove the "@echo off" from Tomcat batch files and pursue it myself. Hopefully this would vote for it to save someone else from this grief.

+10
source

The char space in C:\Program Files\Java\jdk1.7.0_79 is causing the problem. Replacing it with a short name can solve the problem.

Run the command dir c:\PROGRA~1\Java\jdk1.7.0_79 and check the list of files to verify the correctness of PROGRA~1 . If not, try PROGRA~2 and so on ...

Then change the environment variable JAVA_HOME or JRE_HOME to try again.

0
source

There is another possibility that you can configure both different ways to enable JPDA in jvm while starting tomcat in remote debugging mode.

There are several ways in windows to enable JPDA in jvm. 1. One way:

open startup.bat.

add lines below

 set JPDA_ADDRESS=8001 set JPDA_TRANSPORT=dt_socket call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS% 

2. The second method:
create the setenv.bat file in the CATALINA_HOME / bin directory. and add the following line:

 set JPDA_OPTS=-agentlib:jdwp=transport=dt_socket, address=1043, server=y, suspend=n 

Of course, these are other ways. I have the same problem with you, but then I found that I was configured in this way, both of them would lead to a failure to open the JPDA port without any error details. Then I selected only method 1, the port was successfully opened. Hope this helps other newbies in this.

0
source

Source: https://habr.com/ru/post/1242629/


All Articles