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 > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
C:\CAH\tomcat\bin>rem Licensed to the Apache Software Foundation (ASF) under one or more C:\CAH\tomcat\bin>rem contributor license agreements. See the NOTICE file distributed with C:\CAH\tomcat\bin>rem this work for additional information regarding copyright ownership. C:\CAH\tomcat\bin>rem The ASF licenses this file to You under the Apache License, Version 2.0 C:\CAH\tomcat\bin>rem (the "License"); you may not use this file except in compliance with C:\CAH\tomcat\bin>rem the License. You may obtain a copy of the License at C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem http://www.apache.org/licenses/LICENSE-2.0 C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem Unless required by applicable law or agreed to in writing, software C:\CAH\tomcat\bin>rem distributed under the License is distributed on an "AS IS" BASIS, C:\CAH\tomcat\bin>rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. C:\CAH\tomcat\bin>rem See the License for the specific language governing permissions and C:\CAH\tomcat\bin>rem limitations under the License. C:\CAH\tomcat\bin>if "Windows_NT" == "Windows_NT" setlocal C:\CAH\tomcat\bin>rem --------------------------------------------------------------------------- C:\CAH\tomcat\bin>rem Start/Stop Script for the CATALINA Server C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem Environment Variable Prequisites C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem CATALINA_HOME May point at your Catalina "build" directory. C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem CATALINA_BASE (Optional) Base directory for resolving dynamic portions C:\CAH\tomcat\bin>rem of a Catalina installation. If not present, resolves to C:\CAH\tomcat\bin>rem the same directory that CATALINA_HOME points to. C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem CATALINA_OPTS (Optional) Java runtime options used when the "start", C:\CAH\tomcat\bin>rem or "run" command is executed. C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem CATALINA_TMPDIR (Optional) Directory path location of temporary directory C:\CAH\tomcat\bin>rem the JVM should use (java.io.tmpdir). Defaults to C:\CAH\tomcat\bin>rem \temp. C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem JAVA_HOME Must point at your Java Development Kit installation. C:\CAH\tomcat\bin>rem Required to run the with the "debug" argument. C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem JRE_HOME Must point at your Java Runtime installation. C:\CAH\tomcat\bin>rem Defaults to JAVA_HOME if empty. C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem JAVA_OPTS (Optional) Java runtime options used when the "start", C:\CAH\tomcat\bin>rem "stop", or "run" command is executed. C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem JSSE_HOME (Optional) May point at your Java Secure Sockets Extension C:\CAH\tomcat\bin>rem (JSSE) installation, whose JAR files will be added to the C:\CAH\tomcat\bin>rem system class path used to start Tomcat. C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start" C:\CAH\tomcat\bin>rem command is executed. The default is "dt_shmem". C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start" C:\CAH\tomcat\bin>rem command is executed. The default is "jdbconn". C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem JPDA_SUSPEND (Optional) Java runtime options used when the "jpda start" C:\CAH\tomcat\bin>rem command is executed. Specifies whether JVM should suspend C:\CAH\tomcat\bin>rem execution immediately after startup. Default is "n". C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem JPDA_OPTS (Optional) Java runtime options used when the "jpda start" C:\CAH\tomcat\bin>rem command is executed. If used, JPDA_TRANSPORT, JPDA_ADDRESS, C:\CAH\tomcat\bin>rem and JPDA_SUSPEND are ignored. Thus, all required jpda C:\CAH\tomcat\bin>rem options MUST be specified. The default is: C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem -Xdebug -Xrunjdwp:transport=, C:\CAH\tomcat\bin>rem address=,server=y,suspend= C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem $Id: catalina.bat 656834 2008-05-15 21:04:04Z markt $ C:\CAH\tomcat\bin>rem --------------------------------------------------------------------------- C:\CAH\tomcat\bin>rem Guess CATALINA_HOME if not defined C:\CAH\tomcat\bin>set CURRENT_DIR=C:\CAH\tomcat\bin C:\CAH\tomcat\bin>if not "" == "" goto gotHome C:\CAH\tomcat\bin>set CATALINA_HOME=C:\CAH\tomcat\bin C:\CAH\tomcat\bin>if exist "C:\CAH\tomcat\bin\bin\catalina.bat" goto okHome C:\CAH\tomcat\bin>cd .. C:\CAH\tomcat>set CATALINA_HOME=C:\CAH\tomcat C:\CAH\tomcat>cd C:\CAH\tomcat\bin C:\CAH\tomcat\bin>if exist "C:\CAH\tomcat\bin\catalina.bat" goto okHome C:\CAH\tomcat\bin>rem Get standard environment variables C:\CAH\tomcat\bin>if "" == "" goto gotSetenvHome C:\CAH\tomcat\bin>if exist "C:\CAH\tomcat\bin\setenv.bat" call "C:\CAH\tomcat\bin\setenv.bat" C:\CAH\tomcat\bin>set JAVA_HOME= C:\CAH\tomcat\bin>set JRE_HOME=..\..\jre C:\CAH\tomcat\bin>set JAVA_OPTS=-Xms64m -Xmx256m C:\CAH\tomcat\bin>rem Get standard Java environment variables C:\CAH\tomcat\bin>if exist "C:\CAH\tomcat\bin\setclasspath.bat" goto okSetclasspath C:\CAH\tomcat\bin>set BASEDIR=C:\CAH\tomcat C:\CAH\tomcat\bin>call "C:\CAH\tomcat\bin\setclasspath.bat" start C:\CAH\tomcat\bin>rem @echo off C:\CAH\tomcat\bin>rem Licensed to the Apache Software Foundation (ASF) under one or more C:\CAH\tomcat\bin>rem contributor license agreements. See the NOTICE file distributed with C:\CAH\tomcat\bin>rem this work for additional information regarding copyright ownership. C:\CAH\tomcat\bin>rem The ASF licenses this file to You under the Apache License, Version 2.0 C:\CAH\tomcat\bin>rem (the "License"); you may not use this file except in compliance with C:\CAH\tomcat\bin>rem the License. You may obtain a copy of the License at C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem http://www.apache.org/licenses/LICENSE-2.0 C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem Unless required by applicable law or agreed to in writing, software C:\CAH\tomcat\bin>rem distributed under the License is distributed on an "AS IS" BASIS, C:\CAH\tomcat\bin>rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. C:\CAH\tomcat\bin>rem See the License for the specific language governing permissions and C:\CAH\tomcat\bin>rem limitations under the License. C:\CAH\tomcat\bin>rem --------------------------------------------------------------------------- C:\CAH\tomcat\bin>rem Set CLASSPATH and Java options C:\CAH\tomcat\bin>rem C:\CAH\tomcat\bin>rem $Id: setclasspath.bat 562770 2007-08-04 22:13:58Z markt $ C:\CAH\tomcat\bin>rem --------------------------------------------------------------------------- C:\CAH\tomcat\bin>rem Make sure prerequisite environment variables are set C:\CAH\tomcat\bin>if not "" == "" goto gotJdkHome C:\CAH\tomcat\bin>if not "..\..\jre" == "" goto gotJreHome C:\CAH\tomcat\bin>if not exist "..\..\jre\bin\java.exe" goto noJavaHome C:\CAH\tomcat\bin>if not exist "..\..\jre\bin\javaw.exe" goto noJavaHome C:\CAH\tomcat\bin>if not ""start"" == ""debug"" goto okJavaHome C:\CAH\tomcat\bin>if not "C:\CAH\tomcat" == "" goto gotBasedir C:\CAH\tomcat\bin>if exist "C:\CAH\tomcat\bin\setclasspath.bat" goto okBasedir C:\CAH\tomcat\bin>rem Set the default -Djava.endorsed.dirs argument C:\CAH\tomcat\bin>set JAVA_ENDORSED_DIRS=C:\CAH\tomcat\endorsed C:\CAH\tomcat\bin>rem Set standard CLASSPATH C:\CAH\tomcat\bin>rem Note that there are no quotes as we do not want to introduce random C:\CAH\tomcat\bin>rem quotes into the CLASSPATH C:\CAH\tomcat\bin>if not exist "\lib\tools.jar" goto noJavac C:\CAH\tomcat\bin>rem Set standard command for invoking Java. C:\CAH\tomcat\bin>rem Note that NT requires a window name argument when using start. C:\CAH\tomcat\bin>rem Also note the quoting as JAVA_HOME may contain spaces. C:\CAH\tomcat\bin>set _RUNJAVA="..\..\jre\bin\java" C:\CAH\tomcat\bin>set _RUNJAVAW="..\..\jre\bin\javaw" C:\CAH\tomcat\bin>set _RUNJDB="\bin\jdb" C:\CAH\tomcat\bin>set _RUNJAVAC="\bin\javac" C:\CAH\tomcat\bin>goto end C:\CAH\tomcat\bin>if errorlevel 1 goto end
--------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]