Re: Tomcat stops with error after calling setclasspath.bat
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\binrem Licensed to the Apache Software Foundation (ASF) under one or more C:\CAH\tomcat\binrem contributor license agreements. See the NOTICE file distributed with C:\CAH\tomcat\binrem this work for additional information regarding copyright ownership. C:\CAH\tomcat\binrem The ASF licenses this file to You under the Apache License, Version 2.0 C:\CAH\tomcat\binrem (the License); you may not use this file except in compliance with C:\CAH\tomcat\binrem the License. You may obtain a copy of the License at C:\CAH\tomcat\binrem C:\CAH\tomcat\binrem http://www.apache.org/licenses/LICENSE-2.0 C:\CAH\tomcat\binrem C:\CAH\tomcat\binrem Unless required by applicable law or agreed to in writing, software C:\CAH\tomcat\binrem distributed under the License is distributed on an AS IS BASIS, C:\CAH\tomcat\binrem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. C:\CAH\tomcat\binrem See the License for the specific language governing permissions and C:\CAH\tomcat\binrem limitations under the License. C:\CAH\tomcat\binif Windows_NT == Windows_NT setlocal C:\CAH\tomcat\binrem --- C:\CAH\tomcat\binrem Start/Stop Script for the CATALINA Server C:\CAH\tomcat\binrem C:\CAH\tomcat\binrem Environment Variable Prequisites C:\CAH\tomcat\binrem C:\CAH\tomcat\binrem CATALINA_HOME May point at your Catalina build directory. C:\CAH\tomcat\binrem C:\CAH\tomcat\binrem CATALINA_BASE (Optional) Base directory for resolving dynamic portions C:\CAH\tomcat\binrem of a Catalina installation. If not present, resolves to C:\CAH\tomcat\binrem the same
Re: Tomcat stops with error after calling setclasspath.bat
Okay, apparently Tomcat doesn't like my setenv.bat I just copied over a virgin install of Tomcat, and after setting JRE_HOME, it started right up. Then I moved my setenv.bat over and it gave me the same problem. I'm not sure why it doesn't like my setting the JRE_HOME in the setenv.bat The contents of my setenv.bat are as follows. set JAVA_HOME= set JRE_HOME=..\..\jre set JAVA_OPTS=-Xms64m -Xmx256m Tomcat doesn't seem to have a problem with the sets, as I did them before calling startup, and it worked fine. It's just when they're placed in the setenv.bat file. The only thing I can think of is that the setclasspath.bat file can't see the JRE_HOME setting, but I can't see where it throws an error about it. On Wed, Oct 1, 2008 at 9:47 AM, Bai Shen [EMAIL PROTECTED] wrote: 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]
RE: Tomcat stops with error after calling setclasspath.bat
From: Bai Shen [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat stops with error after calling setclasspath.bat set JRE_HOME=..\..\jre Make the above an absolute path, including drive letter. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat stops with error after calling setclasspath.bat
No effect. On Wed, Oct 1, 2008 at 10:19 AM, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Bai Shen [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat stops with error after calling setclasspath.bat set JRE_HOME=..\..\jre Make the above an absolute path, including drive letter. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat stops with error after calling setclasspath.bat
From: Bai Shen [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat stops with error after calling setclasspath.bat No effect. Are you editing your .bat files in UNIX format, by any chance? The Windows shell might not like missing carriage returns. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat stops with error after calling setclasspath.bat
Nope, doing it all in Windows using notepad. And I've narrowed down the problem. 2k/2k3 doesn't like the following line. set JAVA_HOME= If I don't have a JAVA_HOME variable set, everything works fine. However, I can't guarantee that the JAVA_HOME variable won't be set on every machine. So I need some way to unset it if it's not set. Also, is there a way to differentiate between XP/2k/2k3? They all return OS=Windows_NT. For the time being, I'd like to put in an if statement on that set so it only runs in XP. On Wed, Oct 1, 2008 at 11:27 AM, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Bai Shen [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat stops with error after calling setclasspath.bat No effect. Are you editing your .bat files in UNIX format, by any chance? The Windows shell might not like missing carriage returns. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat stops with error after calling setclasspath.bat
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]
Re: Tomcat stops with error after calling setclasspath.bat
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]
Re: Tomcat stops with error after calling setclasspath.bat
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. Bai Shen
Re: Tomcat stops with error after calling setclasspath.bat
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]