You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Pfingstl Gernot <ge...@stmk.gv.at> on 2003/06/29 14:00:47 UTC

Tomcat, Eclipse, Debug, JPDA

I tried to debug my webapplication on my (local)tomcat with eclipse and JPDA. Both (JDK and Eclipse) seems to allow JPDA, but I always got an "Failed to connect to remote VM. Connection refused" error from eclipse.

My Environment: Win2000, JDK 1.3.1 (Sun), Tomcat 4.1.18, Eclipse 2.1 and 2.0

I did following steps:
My startup.bat looks like:
	set JPDA_TRANSPORT=dt_socket
	set JPDA_ADDRESS=localhost:8665
	set JAVA_OPTS=-classic -Djava.compiler=NONE -Xbootclasspath:"c:\programme\jdk1.3.1\lib\tools.jar;c:\programme\jdk1.3.1\jre\lib\rt.jar"
	set CATALINA_BASE=C:\programme\tomcat\test
	set CATALINA_HOME=C:\programme\tomcat\jakarta-tomcat-4.1.18
	%CATALINA_HOME%\bin\catalina jpda run %1 %2 %3 %4 %5 %6 %7 %8 %9

Calling startup.sh produces following start command:
C:\Programme\tomcat\test\bin>"c:\programme\jdk1.3.1\bin\java" -classic -Djava.compiler=NONE -Xbootclasspath:"c:\programme\jdk1.3.1\lib\tools.jar;c:\programme\jdk1.3.1\jre\lib\rt.jar"  -Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:8665,server=y,suspend=n  -Djava.endorsed.dirs="C:\programme\tomcat\jakarta-tomcat-4.1.18\bin;C:\programme\tomcat\jakarta-tomcat-4.1.18\common\endorsed" -classpath "c:\programme\jdk1.3.1\lib\tools.jar;C:\programme\tomcat\jakarta-tomcat-4.1.18\bin\bootstrap.jar" -Dcatalina.base="C:\programme\tomcat\test" -Dcatalina.home=
"C:\programme\tomcat\jakarta-tomcat-4.1.18" -Djava.io.tmpdir="C:\programme\tomcat\test\temp" org.apache.catalina.startup.Bootstrap  start

And following output on the console:
Agent password=ke4gs
Starting service Tomcat-Standalone
Apache Tomcat/4.1.18

It seems correct to me, and there's always a agent password generated.

On eclipse side I entered in Debug - Remote Java Application the project name, the connection type "Standard (Socket Attach)" and "localhost" and "8665" for host and port and clicking to "debug" shows me the above error screen. I will be never asked for a password?!

What I am doing wrong?

Can I set the password in the tomcat commandline, so that there's not every time I restart tomcat I get a new password?


Thanks, Gernot

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat, Eclipse, Debug, JPDA

Posted by Christian Traber <ch...@traber-net.de>.
Pfingstl Gernot wrote:

>I tried to debug my webapplication on my (local)tomcat with eclipse and JPDA. Both (JDK and Eclipse) seems to allow JPDA, but I always got an "Failed to connect to remote VM. Connection refused" error from eclipse.
>
>  
>
Try the tomcat plugin for eclipse: 
http://www.sysdeo.com/eclipse/tomcatPlugin.html

Regards,
Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org