Help with Tomcat startup

Hello,

I downloaded Tomcat 4.1.34 and installed it successfully. But when I try to startup tomcat by clicking startup.bat, I see a window coming up and vanishing immediately. I have no clue why this happens. I tried many times but its the same issue. I checked for the JAVA_HOME and CATALINA_HOME variables setup correctly.

Please help,

Thanks

[369 byte] By [p_1434a] at [2007-11-26 19:11:41]
# 1
ive had this problem before.something is not set correctly.execute the bat from the command line and figure out what line is the last line executed in the bat file. go from there.
mkoryaka at 2007-7-9 21:09:15 > top of Java-index,Java Essentials,Java Programming...
# 2
I tried doing that too, I only see the environment values in the command line and cant see anything in the popped up window which vanishes even before my eye can catch the content.Please help
p_1434a at 2007-7-9 21:09:15 > top of Java-index,Java Essentials,Java Programming...
# 3
If a .bat file flashes and disappears like that without doing anything, you should run it from the command line like mkoryak said.Also, why did you download Tomcat 4.1 and not 6.0, or at least 5.5?
Djaunla at 2007-7-9 21:09:15 > top of Java-index,Java Essentials,Java Programming...
# 4

> I tried doing that too, I only see the environment

> values in the command line and cant see anything in

> the popped up window which vanishes even before my

> eye can catch the content.

>

> Please help

The window does not vanish when you run it from the command line. Go to Start > Run, type "cmd", and press enter. Then, navigate to your $CATALINA_HOME/bin directory, and type "startup".

Djaunla at 2007-7-9 21:09:15 > top of Java-index,Java Essentials,Java Programming...
# 5

when I run it from cmd, this is what I see..

C:\Tomcat\bin>startup

Using CATALINA_BASE:C:\Program Files\Apache Software Foundation\Tomcat 4.1

Using CATALINA_HOME:C:\Program Files\Apache Software Foundation\Tomcat 4.1

Using CATALINA_TMPDIR: C:\Program Files\Apache Software Foundation\Tomcat 4.1\te

mp

Using JAVA_HOME:C:\j2sdk1.4.2_10

C:\Tomcat\bin>

a second window flahes and then closes.

p_1434a at 2007-7-9 21:09:15 > top of Java-index,Java Essentials,Java Programming...
# 6
Does downloading a later version help?
p_1434a at 2007-7-9 21:09:15 > top of Java-index,Java Essentials,Java Programming...
# 7
Crazy Windows machines. Is your server running or not? You never really said one way or the other.
Djaunla at 2007-7-9 21:09:15 > top of Java-index,Java Essentials,Java Programming...
# 8
> Does downloading a later version help?I had a bunch of problems with Tomcat 4.0.5 and Tomcat 5.5.9, so I upgraded to the newest release, Tomcat 6.0.9, and everything worked.
Djaunla at 2007-7-9 21:09:15 > top of Java-index,Java Essentials,Java Programming...
# 9
okdo thisedit the bat fileand between every lineputpausethen run the file again and see how far you get, and what line you are at. i suspect it calls another bat file somewhere there, like maybe startcatalina.bat or something like that
mkoryaka at 2007-7-9 21:09:15 > top of Java-index,Java Essentials,Java Programming...
# 10
In my experience spaces in directory names cause nothing but problems with tomcat.
YoGeea at 2007-7-9 21:09:15 > top of Java-index,Java Essentials,Java Programming...
# 11
I inserted the "pause" and below is the code where the things go wrongscall "%EXECUTABLE%" start %CMD_LINE_ARGS%not sure what this is
p_1434a at 2007-7-9 21:09:15 > top of Java-index,Java Essentials,Java Programming...
# 12
ok before that line enter this:echo %EXECUTABLE%echo %CMD_LINE_ARGS%this will tell you what it calls and what command line args are.
mkoryaka at 2007-7-9 21:09:15 > top of Java-index,Java Essentials,Java Programming...
# 13

> when I run it from cmd, this is what I see..

>

> C:\Tomcat\bin>startup

> Using CATALINA_BASE:C:\Program Files\Apache

> Software Foundation\Tomcat 4.1

> Using CATALINA_HOME:C:\Program Files\Apache

> Software Foundation\Tomcat 4.1

> Using CATALINA_TMPDIR: C:\Program Files\Apache

> Software Foundation\Tomcat 4.1\te

> mp

> Using JAVA_HOME:C:\j2sdk1.4.2_10

> C:\Tomcat\bin>

>

>

> a second window flahes and then closes.

Why are you running from C:\Tomcat\bin when the install is under program files?

ChristopherAngela at 2007-7-9 21:09:15 > top of Java-index,Java Essentials,Java Programming...
# 14
> Why are you running from C:\Tomcat\bin when the> install is under program files?Because he installed it in C:\Tomcat?
Djaunla at 2007-7-9 21:09:15 > top of Java-index,Java Essentials,Java Programming...
# 15

This is where I get the problem, during this code execution I see a window flashing:

C:\Tomcat\bin>pause

Press any key to continue . . .

C:\Tomcat\bin>rem Execute Java with the applicable properties

C:\Tomcat\bin>if not "" == "" goto doJpda

C:\Tomcat\bin>if not "" == "" goto doSecurity

C:\Tomcat\bin>start "Tomcat" "C:\j2sdk1.4.2_10\bin\java"-Dsun.io.useCanonCach

es=false -Djava.endorsed.dirs="C:\Tomcat\common\endorsed" -classpath "C:\j2sdk1

.4.2_10\lib\tools.jar;C:\Tomcat\bin\bootstrap.jar" -Dcatalina.base="C:\Tomcat" -

Dcatalina.home="C:\Tomcat" -Djava.io.tmpdir="C:\Tomcat\temp" org.apache.catalina

.startup.Bootstrap start

C:\Tomcat\bin>goto end

C:\Tomcat\bin>pause

hello_javaa at 2007-7-9 21:09:17 > top of Java-index,Java Essentials,Java Programming...
# 16
I installed Tomcat in C:\Tomcat;I am running it from C:\Tomcat\bin> startup
hello_javaa at 2007-7-9 21:09:17 > top of Java-index,Java Essentials,Java Programming...
# 17
In that case it is picking up a different installation under program files:Using CATALINA_BASE: C:\Program Files\Apache Software Foundation\Tomcat 4.1Using CATALINA_HOME: C:\Program Files\Apache Software Foundation\Tomcat 4.1
ChristopherAngela at 2007-7-9 21:09:17 > top of Java-index,Java Essentials,Java Programming...
# 18
No, actually I pasted a wrong code. Please look at the above posting which says that its picking up from c:\tomcat\bin location
hello_javaa at 2007-7-9 21:09:17 > top of Java-index,Java Essentials,Java Programming...
# 19
Ah- I seeI had a similar problem when I mapped a drive to the folder in which tomcat sits.so tomcat was in C:\apache\tomcat and I mapped T to C:\apachewhen I tried startup in T:\tomcat\bin it failed but worked when I was in C:\apache\tomcat\bin
ChristopherAngela at 2007-7-9 21:09:17 > top of Java-index,Java Essentials,Java Programming...
# 20

Thanks everyone for your replies.

I got the issue resolved. I replaced the "start" keyword with "run" in startup.bat file. That way the error got printed in my command prompt window and I got that corrected. It was a port issue where the 8080 port was already in use.

Thanks again for your time

hello_javaa at 2007-7-9 21:09:17 > top of Java-index,Java Essentials,Java Programming...
# 21
Which version of Tomcat did you download?Was it the .zip binary or was it the Windows Installer package?With the .exe you do not need to use the startup.bat.As it is installed as a windows service and starts up in the background each time windows boots up.
dobsuna at 2007-7-9 21:09:17 > top of Java-index,Java Essentials,Java Programming...