Ah-hah! I found the problem! Apparently, if you try to unset an environment variable that's not set, 2k and 2k3 return an error. I added a line setting JAVA_HOME in the setenv file and then when I set JAVA_HOME to nothing, I don't get the error. So now I just need to have it check if JAVA_HOME is actually set before calling set JAVA_HOME=
Well, that's some good news. I wonder why it's different than the way XP works. Thanks to everyone who responded. On Wed, Oct 1, 2008 at 12:12 PM, Konstantin Kolinko <[EMAIL PROTECTED]>wrote: > 2008/10/1 Bai Shen <[EMAIL PROTECTED]>: > > I'm using 6.0.18, which unless they just put out a new version is the > > latest. > > > > I've already turned the echo on. If you look at my first post, I > commented > > what happened in the batch files. I can't see anything that would throw > an > > error. > > > > I've enclosed the results of my running catalina start without the echo > off > > statements. > > > > On Tue, Sep 30, 2008 at 8:56 PM, Konstantin Kolinko < > [EMAIL PROTECTED]> > > wrote: > >> > >> 2008/9/30 Bai Shen <[EMAIL PROTECTED]>: > >> > Okay, if I keep this up I'll be able to fit both feet in my mouth. > >> > > >> > Apparently setclasspath.bat does see the variables set in setenv.bat > It > >> > was > >> > my troubleshooting method that was faulty. > >> > > >> > Basically, the problem boils down to the fact that right after > >> > setclasspath.bat is call, there's the following line in catalina.bat > >> > > >> > if errorlevel 1 goto end > >> > > >> > That's the last line I see before everthing stops. I had assumed there > >> > was a > >> > problem with the setclasspath.bat file, but the last line from that is > >> > goto > >> > end, which AFAIK, skips over the exit /b 1 > >> > > >> > So for some reason, on Windows 2000 and 2003 Server only, Tomcat won't > >> > start. I get no error at all. I had to remove the echo off > statements > >> > to > >> > see that it was stopping after setclasspath.bat > >> > > >> > Hopefully this will be the last of me sticking my foot in my mouth. :) > >> > > >> > On Tue, Sep 30, 2008 at 1:37 PM, Bai Shen <[EMAIL PROTECTED]> > >> > wrote: > >> > > >> >> Okay, I feel silly now. I jus realized that XP returns Windows_NT > from > >> >> the > >> >> OS variable. And my Tomcat install works fine in XP. So it's > >> >> apparently > >> >> something besides the setlocal. Which leaves me back at square one. > >> >> :( > >> >> > >> >> Any suggestions? > >> >> > >> >> > >> >> On Tue, Sep 30, 2008 at 1:10 PM, Bai Shen <[EMAIL PROTECTED]> > >> >> wrote: > >> >> > >> >>> I use setenv.bat to point tomcat to my JRE and set some other > options. > >> >>> However, when running on an OS that returns Windows_NT from the OS > >> >>> environment variable, Tomcat sets all of the batch files to > setlocal. > >> >>> Therefore, when setclasspath.bat is run, it doesn't see any of the > >> >>> variables > >> >>> that were set by setenv.bat Now I know I could set them globally > for > >> >>> the > >> >>> machine or user, but I'd rather not do that. I also don't want to > >> >>> edit the > >> >>> tomcat bat files to turn off the setlocal commands. > >> >>> > >> >>> Speaking of which, does anyone know what the reasoning behind the > >> >>> setlocal > >> >>> is in the first place? > >> >>> > >> >>> Any advice would be appreciated. TIA. > >> >>> > >> >> > >> > > >> > >> You should mention what tomcat version you are trying to use. > >> > >> If it is not the latest one, try *.bat files from the latest version. > >> > >> I reckon that I once stumbled into misbehaving bat files, that > >> were also complaining about some wrong goto. I fixed them in couple > >> of minutes by adding some blank lines or removing trailing spaces -- > >> I do not remember how exactly, and what were those files, and I do > >> not see any remnants lying around. > >> > >> I suggest you to set "echo on" in all those bat files and > >> capture their output in a file. Maybe there are some oddities > >> there, like too many quotes, backslashes, expanded variables. > >> > >> > >> Best regards, > >> Konstantin Kolinko > >> > > I was able to reproduce your issue. Thanks to the log that you attached. > > Solution: add > exit /b 0 > to the end of either your setenv.bat or to the end of setclasspath.bat > > As you already found, the cause is your "set JAVA_HOME=". > > It makes errorlevel=1, and the errorlevel value does not change during > all those further lines of execution, including going in and out of > setclasspath.bat. > > Confirmation: add > echo %errorlevel% > before and after that set JAVA_HOME= line > > Best regards, > Konstantin Kolinko > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >