|
View:
New views
14 Messages
—
Rating Filter:
Alert me
|
|
|
Can't start tomcat 5.5.26 service on windowsHi,
I'm installing tomcat in kind of a strange way (I'll explain why in a postscript), and I'm having trouble getting the service to start and stop consistently. I'd appreciate any advice on how to get this working, or a better procedure that meets the constraints under which I must work. Here is how I'm doing it. 1) Reboot. 2) Install tomcat to the default location. It shows up in the services panel as a manual service, not running. C:\>apache-tomcat-5.5.26.exe /S At this point, I can start the service using the windows services panel. However, when I try to stop it the same way, I get this dialog: Could not stop the Apache tomcat Service on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashion. There is no event in the Windows Event Viewer (under System or anywhere else) matching this error. The end of jakarta_service_20080310.log looks like this: [2008-03-10 15:06:07] [info] Starting service... [2008-03-10 15:06:09] [info] Service started in 1298 ms. [2008-03-10 15:06:12] [info] Stopping service... Despite the error, the service appears to be stopped, and I can start it again from the services panel. 3) Copy msvcr71.dll (7.10.3052.4) from C:\WINDOWS\system32 to C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin 4) I previously extracted some of the .bat files startup.bat shutdown.bat catalina.bat setclasspath.bat from a zipped copy of tomcat 5.5.26 and saved them away. Copy those four .bat files into C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin Note: steps 3 and 4 do not help the problems described in step 2. 5) Stop the service (an unnecessary step) and delete the service. C:\>"C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\tomcat5.exe" //SS//Tomcat5 C:\>"C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\tomcat5.exe" //DS//Tomcat5 6) Reinstall the service with the options I want. C:\>"C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\tomcat5.exe" //IS//Tomcat5 --DisplayName="Apache Tomcat 5.5" --Install="C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\tomcat5.exe" --Description="Apache Tomcat 5.5.26 Server - http://tomcat.apache.org/" --Jvm=auto --Startup auto --StartMode=jvm --StopMode=jvm --StartClass=org.apache.catalina.startup.BootStrap --StartParams=start --StopClass=org.apache.catalina.startup.BootStrap --StopParams=stop --JvmOptions=-Xrs;-Xms256m;-Xmx512m;-Djava.awt.headless=true --LogPath="C:\Program Files\Apache Software Foundation\Tomcat 5.5\logs --StdOutput="C:\Program Files\Apache Software Foundation\Tomcat 5.5\logs\stdout.log" --StdError="C:\Program Files\Apache Software Foundation\Tomcat 5.5\logs\stderr.log" The problem is that after this sequence of steps is finished, the service is present in the services control panel, and appears to have all the options I want, but it is not started. I cannot start the service. If I try to start it from the services panel, I get this error: Windows could not start the Apache Tomcat 5.5 on Local Computer. for more information, review the System Event Log. The System Event Log has this event, ID = 7024 The Apache Tomcat 5.5 service terminated with service-specific error 0 (0x0). For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. The tomcat logs are basically empty - nothing of use. Why am I doing this strange procedure? -------------------------------------- We can't count on unzip utilities being available on the customers' servers since we have to support very old versionsof windows (e.g. Windows 2000), so I need to use the Windows installer. My management is against installing our own unzip utility, and they also require silent installation. I plan to wrap all these calls in a C++ executable and call it from our installer. That way, when customers install our product, Tomcat is installed and configured along with it. We cannot ask our customers to configure tomcat themselves. I devised this procedure from following this list and from http://tomcat.apache.org/tomcat-5.5-doc/windows-service-howto.html We have done something roughly similar for Tomcat 4.1.x in the past, but we are upgrading to tomcat 5.5.26 now, and the installer command line options that used to work no longer do. Settings and Configuration -------------------------- I am using Tomcat 5.5.26, downloaded from tomcat.apache.org, and I am running on Windows XP SP2. I am using JDK 1.5.0_12. My environment has: CATALINA_HOME=C:\Program Files\Apache Software Foundation\Tomcat 5.5 JAVA_HOME=C:\Program Files\Java\jre1.5.0_12 C:\>set ALLUSERSPROFILE=C:\Documents and Settings\All Users ANT_HOME=c:\ant APPDATA=C:\Documents and Settings\echawkes\Application Data CATALINA_HOME=C:\Program Files\Apache Software Foundation\Tomcat 5.5 CLASSPATH=.;C:\Program Files\Java\jre1.5.0_12\lib\ext\QTJava.zip CLIENTNAME=Console CommonProgramFiles=C:\Program Files\Common Files COMPUTERNAME=EHAWKES-9439 ComSpec=C:\WINDOWS\system32\cmd.exe FP_NO_HOST_CHECK=NO INCLUDE=C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\include\ JAVA_HOME=C:\Program Files\Java\jre1.5.0_12 LIB=C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Lib\ LOGONSERVER=\\SVL0DC04 MMCommonAppDataRoot=C:\Documents and Settings\All Users\Application Data\Avaya M odular Messaging MM_MSXML_APARTMENT=1 NUMBER_OF_PROCESSORS=2 OS=Windows_NT Path=C:\Program Files\Avaya Modular Messaging\Common;C:\Program Files\Avaya Modu lar Messaging\Common;C:\Program Files\Common Files\Avaya Modular Messaging;C:\Pe rl\bin\;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\ Wbem;C:\ bin;c:\ant;c:\ant\bin;C:\Program Files\Perforce;C:\Program Files\SonicWallES;"C: \Program Files\MailFrontier";C:\Program Files\ATI Technologies\ATI.ACE\;C:\Progr am Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\QuickTime\QTSystem \ PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH PROCESSOR_ARCHITECTURE=x86 PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 3, GenuineIntel PROCESSOR_LEVEL=15 PROCESSOR_REVISION=0403 ProgramFiles=C:\Program Files PROMPT=$P$G QTJAVA=C:\Program Files\Java\jre1.5.0_12\lib\ext\QTJava.zip SESSIONNAME=Console SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\DOCUME~1\echawkes\LOCALS~1\Temp TMP=C:\DOCUME~1\echawkes\LOCALS~1\Temp UMCommon=C:\Program Files\Avaya Modular Messaging\Common USERDNSDOMAIN=SV.US.SONICWALL.COM USERDOMAIN=SV USERNAME=echawkes USERPROFILE=C:\Documents and Settings\echawkes VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\ VSCOMNTOOLS="C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\" windir=C:\WINDOWS __COMPAT_LAYER=EnableNXShowUI Thanks, Eric --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
RE: Can't start tomcat 5.5.26 service on windowsHi,
I tried something simpler: a plain unzip install. It still doesn't work, and my web searches haven't been fruitful. This is so simple, I have either missed something quite obvious, or I have really screwed up my dev environment. I've been working on this for quite a long time. Any help would be appreciated. 1) I uninstalled tomcat, cleaned my registry, and rebooted. 2) I extracted tomcat (from .tar.gz) into C:\Program Files\Apache Software Foundation\Tomcat 5.5 3) I copied msvcr71.dll to C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin It's also in my c:\windows\system32 directory, which is in my path environment variable. 4) I executed this from a DOS prompt: C:\>"C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\tomcat5.exe" //IS//Tomcat5 --Jvm=auto --Startup auto --StartMode=jvm --StopMode=jvm --StartClass=org.apache.catalina.startup.BootStrap --StartParams=start --StopClass=org.apache.catalina.startup.BootStrap --StopParams=stop Same problem. The service shows up in the Windows Services panel as Tomcat5, and it is Automatic, but it is not started. The status field is blank. I can't start the tomcat service from the windows services panel. When I try, I get this error dialog: Windows could not start the Tomcat5 on Local Computer. For more information, review the System Event Log..... The Windows Event Log (System) has an error of Event=7024 with this description: The Tomcat5 service terminated with service-specific error 0 (0x0). For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. I can't start the service this way, either: C:\Program Files\SonicWallES>net start Tomcat5 The Tomcat5 service is starting. The Tomcat5 service could not be started. A service specific error occurred: 0. More help is available by typing NET HELPMSG 3547. C:\Program Files\SonicWallES>NET HELPMSG 3547 A service specific error occurred: ***. EXPLANATION A service-specific error occurred. ACTION Refer to the Help or documentation for that service to determine the problem. The logs directory is completely empty, probably because I didn't set those parameters this time. C:\Program Files\Apache Software Foundation\Tomcat 5.5\logs One note: I _thought_ I had this working, but I'm not sure. I just upgraded to Visual Studio 2008 (which has new DLLs for msvcr, etc.), and I'm wondering if that could be related. Thanks, Eric -----Original Message----- From: Eric Hawkes Sent: Monday, March 10, 2008 3:25 PM To: 'Tomcat Users List' Cc: Eric Hawkes Subject: Can't start tomcat 5.5.26 service on windows Hi, I'm installing tomcat in kind of a strange way (I'll explain why in a postscript), and I'm having trouble getting the service to start and stop consistently. I'd appreciate any advice on how to get this working, or a better procedure that meets the constraints under which I must work. Here is how I'm doing it. 1) Reboot. 2) Install tomcat to the default location. It shows up in the services panel as a manual service, not running. C:\>apache-tomcat-5.5.26.exe /S At this point, I can start the service using the windows services panel. However, when I try to stop it the same way, I get this dialog: Could not stop the Apache tomcat Service on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashion. There is no event in the Windows Event Viewer (under System or anywhere else) matching this error. The end of jakarta_service_20080310.log looks like this: [2008-03-10 15:06:07] [info] Starting service... [2008-03-10 15:06:09] [info] Service started in 1298 ms. [2008-03-10 15:06:12] [info] Stopping service... Despite the error, the service appears to be stopped, and I can start it again from the services panel. 3) Copy msvcr71.dll (7.10.3052.4) from C:\WINDOWS\system32 to C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin 4) I previously extracted some of the .bat files startup.bat shutdown.bat catalina.bat setclasspath.bat from a zipped copy of tomcat 5.5.26 and saved them away. Copy those four .bat files into C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin Note: steps 3 and 4 do not help the problems described in step 2. 5) Stop the service (an unnecessary step) and delete the service. C:\>"C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\tomcat5.exe" //SS//Tomcat5 C:\>"C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\tomcat5.exe" //DS//Tomcat5 6) Reinstall the service with the options I want. C:\>"C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\tomcat5.exe" //IS//Tomcat5 --DisplayName="Apache Tomcat 5.5" --Install="C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\tomcat5.exe" --Description="Apache Tomcat 5.5.26 Server - http://tomcat.apache.org/" --Jvm=auto --Startup auto --StartMode=jvm --StopMode=jvm --StartClass=org.apache.catalina.startup.BootStrap --StartParams=start --StopClass=org.apache.catalina.startup.BootStrap --StopParams=stop --JvmOptions=-Xrs;-Xms256m;-Xmx512m;-Djava.awt.headless=true --LogPath="C:\Program Files\Apache Software Foundation\Tomcat 5.5\logs --StdOutput="C:\Program Files\Apache Software Foundation\Tomcat 5.5\logs\stdout.log" --StdError="C:\Program Files\Apache Software Foundation\Tomcat 5.5\logs\stderr.log" The problem is that after this sequence of steps is finished, the service is present in the services control panel, and appears to have all the options I want, but it is not started. I cannot start the service. If I try to start it from the services panel, I get this error: Windows could not start the Apache Tomcat 5.5 on Local Computer. for more information, review the System Event Log. The System Event Log has this event, ID = 7024 The Apache Tomcat 5.5 service terminated with service-specific error 0 (0x0). For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. The tomcat logs are basically empty - nothing of use. Why am I doing this strange procedure? -------------------------------------- We can't count on unzip utilities being available on the customers' servers since we have to support very old versionsof windows (e.g. Windows 2000), so I need to use the Windows installer. My management is against installing our own unzip utility, and they also require silent installation. I plan to wrap all these calls in a C++ executable and call it from our installer. That way, when customers install our product, Tomcat is installed and configured along with it. We cannot ask our customers to configure tomcat themselves. I devised this procedure from following this list and from http://tomcat.apache.org/tomcat-5.5-doc/windows-service-howto.html We have done something roughly similar for Tomcat 4.1.x in the past, but we are upgrading to tomcat 5.5.26 now, and the installer command line options that used to work no longer do. Settings and Configuration -------------------------- I am using Tomcat 5.5.26, downloaded from tomcat.apache.org, and I am running on Windows XP SP2. I am using JDK 1.5.0_12. My environment has: CATALINA_HOME=C:\Program Files\Apache Software Foundation\Tomcat 5.5 JAVA_HOME=C:\Program Files\Java\jre1.5.0_12 C:\>set ALLUSERSPROFILE=C:\Documents and Settings\All Users ANT_HOME=c:\ant APPDATA=C:\Documents and Settings\echawkes\Application Data CATALINA_HOME=C:\Program Files\Apache Software Foundation\Tomcat 5.5 CLASSPATH=.;C:\Program Files\Java\jre1.5.0_12\lib\ext\QTJava.zip CLIENTNAME=Console CommonProgramFiles=C:\Program Files\Common Files COMPUTERNAME=EHAWKES-9439 ComSpec=C:\WINDOWS\system32\cmd.exe FP_NO_HOST_CHECK=NO INCLUDE=C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\include\ JAVA_HOME=C:\Program Files\Java\jre1.5.0_12 LIB=C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Lib\ LOGONSERVER=\\SVL0DC04 MMCommonAppDataRoot=C:\Documents and Settings\All Users\Application Data\Avaya M odular Messaging MM_MSXML_APARTMENT=1 NUMBER_OF_PROCESSORS=2 OS=Windows_NT Path=C:\Program Files\Avaya Modular Messaging\Common;C:\Program Files\Avaya Modu lar Messaging\Common;C:\Program Files\Common Files\Avaya Modular Messaging;C:\Pe rl\bin\;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\ Wbem;C:\ bin;c:\ant;c:\ant\bin;C:\Program Files\Perforce;C:\Program Files\SonicWallES;"C: \Program Files\MailFrontier";C:\Program Files\ATI Technologies\ATI.ACE\;C:\Progr am Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\QuickTime\QTSystem \ PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH PROCESSOR_ARCHITECTURE=x86 PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 3, GenuineIntel PROCESSOR_LEVEL=15 PROCESSOR_REVISION=0403 ProgramFiles=C:\Program Files PROMPT=$P$G QTJAVA=C:\Program Files\Java\jre1.5.0_12\lib\ext\QTJava.zip SESSIONNAME=Console SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\DOCUME~1\echawkes\LOCALS~1\Temp TMP=C:\DOCUME~1\echawkes\LOCALS~1\Temp UMCommon=C:\Program Files\Avaya Modular Messaging\Common USERDNSDOMAIN=SV.US.SONICWALL.COM USERDOMAIN=SV USERNAME=echawkes USERPROFILE=C:\Documents and Settings\echawkes VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\ VSCOMNTOOLS="C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\" windir=C:\WINDOWS __COMPAT_LAYER=EnableNXShowUI Thanks, Eric --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
RE: Can't start tomcat 5.5.26 service on windows> From: Eric Hawkes [mailto:ehawkes@...]
> Subject: RE: Can't start tomcat 5.5.26 service on windows > > I tried something simpler: a plain unzip install. It still > doesn't work, and my web searches haven't been fruitful. What happens if you enter the parameters via the tomcat5w.exe GUI? (I realize that doesn't fit your delivery requirements, but I suggest this just to see if you can get the service working at all.) You should probably go through a deinstall and reinstall of the .zip just to clean things up, then run the service.bat script to set up the service. - 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@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
RE: Can't start tomcat 5.5.26 service on windowsHi,
Thank you for the debugging tip. Running service.bat worked: C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin>service.bat install Installing the service 'Tomcat5' ... Using CATALINA_HOME: C:\Program Files\Apache Software Foundation\Tomcat 5.5 Using CATALINA_BASE: C:\Program Files\Apache Software Foundation\Tomcat 5.5 Using JAVA_HOME: C:\Program Files\Java\jre1.5.0_12 Using JVM: auto The service 'Tomcat5' has been installed. I can start and stop the service from the windows control panel and I can hit the default tomcat page on http://localhost:8080/ Does this suggest a cause to my earlier problems? (I'll try the GUI next.) Thanks, Eric -----Original Message----- From: Caldarale, Charles R [mailto:Chuck.Caldarale@...] Sent: Monday, March 10, 2008 7:19 PM To: Tomcat Users List Subject: RE: Can't start tomcat 5.5.26 service on windows > From: Eric Hawkes [mailto:ehawkes@...] > Subject: RE: Can't start tomcat 5.5.26 service on windows > > I tried something simpler: a plain unzip install. It still > doesn't work, and my web searches haven't been fruitful. What happens if you enter the parameters via the tomcat5w.exe GUI? (I realize that doesn't fit your delivery requirements, but I suggest this just to see if you can get the service working at all.) You should probably go through a deinstall and reinstall of the .zip just to clean things up, then run the service.bat script to set up the service. - 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@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
RE: Can't start tomcat 5.5.26 service on windows> From: Eric Hawkes [mailto:ehawkes@...]
> Subject: RE: Can't start tomcat 5.5.26 service on windows > > Does this suggest a cause to my earlier problems? Probably means you don't have the parameters quite right for the tomcat5.exe program. Look at what the service.bat script generates, and look here for the tomcat5.exe doc: http://commons.apache.org/daemon/procrun.html I haven't used the procrun-based .exe directly very much, mostly just the GUI. - 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@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
RE: Can't start tomcat 5.5.26 service on windowsHi,
The GUI has proved useful for debugging, but didn't solve the problem. It appears to read/write the registry, so settings made from the command line are picked up in the GUI tool, and vice versa. Our Java setup is slightly non-standard. I'm not sure how non-standard: perhaps somebody can tell me if this situation is rare. We install the JRE, and then we copy the server jvm.dll (taken from an SDK install) to C:\Program Files\Java\jre1.5.0_12\bin\server\jvm.dll We do not delete the client jvm DLL, nor do we change the registry settings for Java. We simply point tomcat to the server jvm.dll. The jvm may be related to my problems. When I use the standard tomcat install service.bat install the client VM is the default, and the tomcat service behaves nicely. When I proceed from that point (with a working service), and use tomcat5w.exe to change the JVM path to point to the server VM DLL, behavior is inconsistent. Sometimes I can start and stop the tomcat service, and sometimes I can't. When I change it back to client (by checking the "Use default" check box), it starts working again. However, installing using tomcat5.exe but without setting the Jvm parameter has not helped: I still cannot start the service after installing like this: C:\>"C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\tomcat5.exe" //IS//Tomcat5 --DisplayName="Apache Tomcat 5.5" --Install="C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\tomcat5.exe" --Startup=auto --StartMode=jvm --StopMode=jvm --StartClass=org.apache.catalina.startup.BootStrap --StartParams=start --StopClass=org.apache.catalina.startup.BootStrap --StopParams=stop Using --Jvm=auto doesn't help either. So, client vm or not, I still cannot install from the command line using tomcat5.exe. > From: Caldarale, Charles R [mailto:Chuck.Caldarale@...] > Look at what the service.bat script generates I found something interesting in service.bat rem Set the server jvm from JAVA_HOME set PR_JVM=%JAVA_HOME%\jre\bin\server\jvm.dll if exist "%PR_JVM%" goto foundJvm rem Set the client jvm from JAVA_HOME set PR_JVM=%JAVA_HOME%\jre\bin\client\jvm.dll if exist "%PR_JVM%" goto foundJvm rem Check for JRockit JVM: Bugzilla 39674 set PR_JVM=%JAVA_HOME%\jre\bin\jrockit\jvm.dll if exist "%PR_JVM%" goto foundJvm set PR_JVM=auto My JAVA_HOME is C:\Program Files\Java\jre1.5.0_12 and my jvm DLL files are in C:\Program Files\Java\jre1.5.0_12\bin\server C:\Program Files\Java\jre1.5.0_12\bin\client In other words, service.bat is looking in %JAVA_HOME%\jre\bin\server\jvm.dll for a DLL that is actually located one level up in %JAVA_HOME%\bin\server\jvm.dll which is why service.bat echoes Using JVM: auto and is probably why this method of installing the service works when nothing else does. Note: tomcat5w shows the correct path to the client jvm.dll when I install this way. When I change the installation to use the server vm, things stop working again. Thanks, Eric -----Original Message----- From: Caldarale, Charles R [mailto:Chuck.Caldarale@...] Sent: Monday, March 10, 2008 7:33 PM To: Tomcat Users List Subject: RE: Can't start tomcat 5.5.26 service on windows > From: Eric Hawkes [mailto:ehawkes@...] > Subject: RE: Can't start tomcat 5.5.26 service on windows > > Does this suggest a cause to my earlier problems? Probably means you don't have the parameters quite right for the tomcat5.exe program. Look at what the service.bat script generates, and look here for the tomcat5.exe doc: http://commons.apache.org/daemon/procrun.html I haven't used the procrun-based .exe directly very much, mostly just the GUI. - 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@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Can't start tomcat 5.5.26 service on windowsEric Hawkes wrote:
> Hi, > > The GUI has proved useful for debugging, but didn't solve the problem. > It appears to read/write the registry, so settings made from the command > > line are picked up in the GUI tool, and vice versa. > > > Our Java setup is slightly non-standard. I'm not sure how non-standard: > > perhaps somebody can tell me if this situation is rare. We install the > JRE, and then we copy the server jvm.dll (taken from an SDK install) to > C:\Program Files\Java\jre1.5.0_12\bin\server\jvm.dll Rare. > We do not delete the client jvm DLL, nor do we change the > registry settings for Java. We simply point tomcat to the > server jvm.dll. Why? Not an attempt to "use the server jvm", surely? (Traditionally done using a switch, e.g. "java -server <etc...>".) > The jvm may be related to my problems. Maybe... > When I use the standard tomcat install > service.bat install > the client VM is the default, > and the tomcat service behaves nicely. > > When I proceed from that point (with a working service), and use > tomcat5w.exe to change the JVM path to point to the server VM DLL, > behavior is inconsistent. Surprise! > Sometimes I can start and stop the tomcat service, and sometimes I can't. A logger says what? > When I change it back to client (by checking the "Use default" check box), > it starts working again. > > However, installing using tomcat5.exe but without setting the > Jvm parameter has not helped: I still cannot start the service > after installing like this: > > C:\>"C:\Program Files\Apache Software Foundation\Tomcat > 5.5\bin\tomcat5.exe" //IS//Tomcat5 > --DisplayName="Apache Tomcat 5.5" > --Install="C:\Program Files\Apache Software Foundation\Tomcat > 5.5\bin\tomcat5.exe" > --Startup=auto --StartMode=jvm --StopMode=jvm > --StartClass=org.apache.catalina.startup.BootStrap --StartParams=start > --StopClass=org.apache.catalina.startup.BootStrap --StopParams=stop > > Using --Jvm=auto doesn't help either. > > So, client vm or not, I still cannot install from the > command line using tomcat5.exe. Can I have a quick refresher, are you trying to install the windows service, or start the windows service? I assume the end result is that you want to run the server VM or make some other customisations to the environment? p >> From: Caldarale, Charles R [mailto:Chuck.Caldarale@...] >> Look at what the service.bat script generates > > I found something interesting in service.bat > > rem Set the server jvm from JAVA_HOME > set PR_JVM=%JAVA_HOME%\jre\bin\server\jvm.dll > if exist "%PR_JVM%" goto foundJvm > rem Set the client jvm from JAVA_HOME > set PR_JVM=%JAVA_HOME%\jre\bin\client\jvm.dll > if exist "%PR_JVM%" goto foundJvm > rem Check for JRockit JVM: Bugzilla 39674 > set PR_JVM=%JAVA_HOME%\jre\bin\jrockit\jvm.dll > if exist "%PR_JVM%" goto foundJvm > set PR_JVM=auto > > My JAVA_HOME is C:\Program Files\Java\jre1.5.0_12 > and my jvm DLL files are in > C:\Program Files\Java\jre1.5.0_12\bin\server > C:\Program Files\Java\jre1.5.0_12\bin\client > > In other words, service.bat is looking in > %JAVA_HOME%\jre\bin\server\jvm.dll > for a DLL that is actually located one level up in > %JAVA_HOME%\bin\server\jvm.dll > > which is why service.bat echoes > Using JVM: auto > and is probably why this method of installing the service works > when nothing else does. > > Note: tomcat5w shows the correct path to the client jvm.dll > when I install this way. > > When I change the installation to use the server vm, things > stop working again. > > > Thanks, > > Eric > > > > -----Original Message----- > From: Caldarale, Charles R [mailto:Chuck.Caldarale@...] > Sent: Monday, March 10, 2008 7:33 PM > To: Tomcat Users List > Subject: RE: Can't start tomcat 5.5.26 service on windows > >> From: Eric Hawkes [mailto:ehawkes@...] >> Subject: RE: Can't start tomcat 5.5.26 service on windows >> >> Does this suggest a cause to my earlier problems? > > Probably means you don't have the parameters quite right for the > tomcat5.exe program. Look at what the service.bat script generates, and > look here for the tomcat5.exe doc: > http://commons.apache.org/daemon/procrun.html > > I haven't used the procrun-based .exe directly very much, mostly just > the GUI. > > - 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@... > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@... > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
RE: Can't start tomcat 5.5.26 service on windows> From: Eric Hawkes [mailto:ehawkes@...]
> Subject: RE: Can't start tomcat 5.5.26 service on windows > > We install the JRE, and then we copy the server jvm.dll > (taken from an SDK install) to > C:\Program Files\Java\jre1.5.0_12\bin\server\jvm.dll Does the server jvm.dll you're copying come from the exact same build and platform (32- vs 64-bit) as the JRE? You would think that would be sufficient, but if you do a detailed comparison of the files in a public JRE against those in a JDK's private JRE you'll see lots of differences, including the contents of various *.jar files. (For example, rt.jar from the JDK is 4 MB larger than the one in the JRE.) I don't know why the two sets of jars should be different, but they are, and it may be pertinent. Can you launch the server mode with "java -server -version"? (Note that the -server option here applies only to the launcher, it's not done that way when running as a service.) What happens when you set JAVA_OPTS=-server and start Tomcat with startup.bat? > We simply point tomcat to the server jvm.dll. Verify it's done properly by changing it in the GUI and see the effect it has on the registry settings for Tomcat. > My JAVA_HOME is C:\Program Files\Java\jre1.5.0_12 You should set JAVA_HOME only for a JDK. The non-service scripts expect JRE_HOME for a JRE-only setup, but the service.bat script ignores that (possibly because a Windows JRE doesn't include the server mode or more likely because someone forgot to update this script when the JRE_HOME check was added to the other scripts). - 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@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
RE: Can't start tomcat 5.5.26 service on windowsHi,
Thank you for the comments. I have two overall goals at this point: 1) I must be able to install tomcat 5.5.26 programmatically and silently as a service using tomcat5.exe 2) I must be able to start and stop the tomcat service programmatically, i.e. net start tomcat5 net stop tomcat5 as well as from the microsoft windows serices panel. I've attempted to simplify my problem again by using a very standard install and environment. I uninstalled java and tomcat, cleaned my registry, and rebooted. I then installed JDK1.5.0_12 using the GUI installer. This installed both the JDK and the JRE in the default locations C:\Program Files\Java I then unzipped tomcat 5.5.26 into C:\Program Files\Apache Software Foundation\Tomcat 5.5 and copied msvcr71.dll from c:\windows\system32 to C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin I attempted to install the service this way. It installed, but it cannot be started from the windows services panel. C:\>"C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\tomcat5.exe" //IS//Tomcat5 --DisplayName="Apache Tomcat 5.5" --Install="C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\tomcat5.exe" --Description="Apache Tomcat 5.5.26 Server - http://tomcat.apache.org/" --Jvm=auto --Startup=auto --StartMode=jvm --StopMode=jvm --StartClass=org.apache.catalina.startup.BootStrap --StartParams=start --StopClass=org.apache.catalina.startup.BootStrap --StopParams=stop --JvmOptions=-Xrs;-Xms256m;-Xmx512m;-Djava.awt.headless=true --LogPath="C:\Program Files\Apache Software Foundation\Tomcat 5.5\logs --StdOutput="C:\Program Files\Apache Software Foundation\Tomcat 5.5\logs\stdout.log" --StdError="C:\Program Files\Apache Software Foundation\Tomcat 5.5\logs\stderr.log" --LogLevel=Debug Errors ------ Pretty much the same errors I've had all along. I must be closing in. If I try to start tomcat from the services panel, I get this error: Windows could not start the Apache Tomcat 5.5 on Local Computer. for more information, review the System Event Log. The System Event Log has this event, ID = 7024 The Apache Tomcat 5.5 service terminated with service-specific error 0 (0x0). For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. tomcat5w -------- Running tomcat5w.exe shows the settings are as I intended them to be according to my command line options. I notice that the startup and shutdown tabs have empty working path and method fields. The JVM in use is the default (client) DLL. The Java Classpath field in the Java tab is also empty. The Logon tab shows the Local System account selected, and the service is not allowed to interact with the desktop. Logging ------- > A logger says what? An excellent question. Now that I have set my log level to debug, the jakarta_service log says this: [2008-03-11 14:32:16] [1334 prunsrv.c] [debug] Procrun log initialized [2008-03-11 14:32:16] [info] Procrun (2.0.3.0) started [2008-03-11 14:32:16] [532 prunsrv.c] [debug] Installing service... [2008-03-11 14:32:16] [info] Service Tomcat5 name Apache Tomcat 5.5 [2008-03-11 14:32:16] [584 prunsrv.c] [debug] Setting service description Apache Tomcat 5.5.26 Server - http://tomcat.apache.org/ [2008-03-11 14:32:16] [info] Service Tomcat5 installed [2008-03-11 14:32:16] [info] Procrun finished. [2008-03-11 14:32:37] [1334 prunsrv.c] [debug] Procrun log initialized [2008-03-11 14:32:37] [info] Procrun (2.0.3.0) started [2008-03-11 14:32:37] [info] Running Service... [2008-03-11 14:32:37] [1158 prunsrv.c] [debug] Inside ServiceMain... [2008-03-11 14:32:37] [info] Starting service... [2008-03-11 14:32:37] [385 javajni.c] [debug] Jvm Option[0] -Xrs [2008-03-11 14:32:37] [385 javajni.c] [debug] Jvm Option[1] -Xms256m [2008-03-11 14:32:37] [385 javajni.c] [debug] Jvm Option[2] -Xmx512m [2008-03-11 14:32:37] [385 javajni.c] [debug] Jvm Option[3] -Djava.awt.headless=true [2008-03-11 14:32:37] [385 javajni.c] [debug] Jvm Option[4] -Djava.class.path= [2008-03-11 14:32:37] [385 javajni.c] [debug] Jvm Option[5] vfprintf [2008-03-11 14:32:37] [443 javajni.c] [error] FindClass org/apache/catalina/startup/BootStrap failed [2008-03-11 14:32:37] [997 prunsrv.c] [error] Failed loading main org/apache/catalina/startup/BootStrap class [2008-03-11 14:32:37] [1260 prunsrv.c] [error] ServiceStart returned 3 [2008-03-11 14:32:37] [info] Run service finished. [2008-03-11 14:32:37] [info] Procrun finished. Perhaps the cause of the problem is now evident to an experienced user? I did some web searching on the bootstrap failure message, but I didn't find the answer. Questions --------- Should I be setting my classpath to include Bootstrap.jar, or have C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin in my PATH? Environment ----------- I'm running on Windows XP SP2, x86 hardware. I have the correct version of Java for my hardware and OS. I got Java from Sun's download site, and tomcat from Apache's download site. C:\Program Files\SonicWallES>set ALLUSERSPROFILE=C:\Documents and Settings\All Users ANT_HOME=c:\ant APPDATA=C:\Documents and Settings\echawkes\Application Data CATALINA_HOME=C:\Program Files\Apache Software Foundation\Tomcat 5.5 CLASSPATH=.;C:\Program Files\Java\jre1.5.0_12\lib\ext\QTJava.zip CLIENTNAME=Console CommonProgramFiles=C:\Program Files\Common Files COMPUTERNAME=EHAWKES-9439 ComSpec=C:\WINDOWS\system32\cmd.exe FP_NO_HOST_CHECK=NO HOMEDRIVE=C: HOMEPATH=\Documents and Settings\echawkes HOMESHARE=\\whistler\users\echawkes INCLUDE=C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\include\ JAVA_HOME=C:\Program Files\Java\jdk1.5.0_12 LIB=C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Lib\ LOGONSERVER=\\SVL0DC03 MMCommonAppDataRoot=C:\Documents and Settings\All Users\Application Data\Avaya M odular Messaging MM_MSXML_APARTMENT=1 NUMBER_OF_PROCESSORS=2 OS=Windows_NT Path=C:\Program Files\Avaya Modular Messaging\Common;C:\Program Files\Avaya Modular Messaging\Common;C:\Program Files\Common Files\Avaya Modular Messaging;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System3 2\Wbem;C:\bin;c:\ant;c:\ant\bin;C:\Program Files\Perforce;C:\Program Files\SonicWallES;"C:\Program Files\MailFrontier";C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\QuickTime\QTSystem\ PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH PROCESSOR_ARCHITECTURE=x86 PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 3, GenuineIntel PROCESSOR_LEVEL=15 PROCESSOR_REVISION=0403 ProgramFiles=C:\Program Files PROMPT=$P$G QTJAVA=C:\Program Files\Java\jre1.5.0_12\lib\ext\QTJava.zip SESSIONNAME=Console SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\DOCUME~1\echawkes\LOCALS~1\Temp TMP=C:\DOCUME~1\echawkes\LOCALS~1\Temp UMCommon=C:\Program Files\Avaya Modular Messaging\Common USERDNSDOMAIN=SV.US.SONICWALL.COM USERDOMAIN=SV USERNAME=echawkes USERPROFILE=C:\Documents and Settings\echawkes VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\ VSCOMNTOOLS="C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\" windir=C:\WINDOWS __COMPAT_LAYER=EnableNXShowUI Thanks, Eric -----Original Message----- From: Pid [mailto:p@...] Sent: Tuesday, March 11, 2008 1:11 AM To: Tomcat Users List Subject: Re: Can't start tomcat 5.5.26 service on windows Eric Hawkes wrote: > Hi, > > The GUI has proved useful for debugging, but didn't solve the problem. > It appears to read/write the registry, so settings made from the command > > line are picked up in the GUI tool, and vice versa. > > > Our Java setup is slightly non-standard. I'm not sure how non-standard: > > perhaps somebody can tell me if this situation is rare. We install the > JRE, and then we copy the server jvm.dll (taken from an SDK install) to > C:\Program Files\Java\jre1.5.0_12\bin\server\jvm.dll Rare. > We do not delete the client jvm DLL, nor do we change the > registry settings for Java. We simply point tomcat to the > server jvm.dll. Why? Not an attempt to "use the server jvm", surely? (Traditionally done using a switch, e.g. "java -server <etc...>".) > The jvm may be related to my problems. Maybe... > When I use the standard tomcat install > service.bat install > the client VM is the default, > and the tomcat service behaves nicely. > > When I proceed from that point (with a working service), and use > tomcat5w.exe to change the JVM path to point to the server VM DLL, > behavior is inconsistent. Surprise! > Sometimes I can start and stop the tomcat service, and sometimes I can't. A logger says what? > When I change it back to client (by checking the "Use default" check box), > it starts working again. > > However, installing using tomcat5.exe but without setting the > Jvm parameter has not helped: I still cannot start the service > after installing like this: > > C:\>"C:\Program Files\Apache Software Foundation\Tomcat > 5.5\bin\tomcat5.exe" //IS//Tomcat5 > --DisplayName="Apache Tomcat 5.5" > --Install="C:\Program Files\Apache Software Foundation\Tomcat > 5.5\bin\tomcat5.exe" > --Startup=auto --StartMode=jvm --StopMode=jvm > --StartClass=org.apache.catalina.startup.BootStrap --StartParams=start > --StopClass=org.apache.catalina.startup.BootStrap --StopParams=stop > > Using --Jvm=auto doesn't help either. > > So, client vm or not, I still cannot install from the > command line using tomcat5.exe. Can I have a quick refresher, are you trying to install the windows service, or start the windows service? I assume the end result is that you want to run the server VM or make some other customisations to the environment? p >> From: Caldarale, Charles R [mailto:Chuck.Caldarale@...] >> Look at what the service.bat script generates > > I found something interesting in service.bat > > rem Set the server jvm from JAVA_HOME > set PR_JVM=%JAVA_HOME%\jre\bin\server\jvm.dll > if exist "%PR_JVM%" goto foundJvm > rem Set the client jvm from JAVA_HOME > set PR_JVM=%JAVA_HOME%\jre\bin\client\jvm.dll > if exist "%PR_JVM%" goto foundJvm > rem Check for JRockit JVM: Bugzilla 39674 > set PR_JVM=%JAVA_HOME%\jre\bin\jrockit\jvm.dll > if exist "%PR_JVM%" goto foundJvm > set PR_JVM=auto > > My JAVA_HOME is C:\Program Files\Java\jre1.5.0_12 > and my jvm DLL files are in > C:\Program Files\Java\jre1.5.0_12\bin\server > C:\Program Files\Java\jre1.5.0_12\bin\client > > In other words, service.bat is looking in > %JAVA_HOME%\jre\bin\server\jvm.dll > for a DLL that is actually located one level up in > %JAVA_HOME%\bin\server\jvm.dll > > which is why service.bat echoes > Using JVM: auto > and is probably why this method of installing the service works > when nothing else does. > > Note: tomcat5w shows the correct path to the client jvm.dll > when I install this way. > > When I change the installation to use the server vm, things > stop working again. > > > Thanks, > > Eric > > > > -----Original Message----- > From: Caldarale, Charles R [mailto:Chuck.Caldarale@...] > Sent: Monday, March 10, 2008 7:33 PM > To: Tomcat Users List > Subject: RE: Can't start tomcat 5.5.26 service on windows > >> From: Eric Hawkes [mailto:ehawkes@...] >> Subject: RE: Can't start tomcat 5.5.26 service on windows >> >> Does this suggest a cause to my earlier problems? > > Probably means you don't have the parameters quite right for the > tomcat5.exe program. Look at what the service.bat script generates, > look here for the tomcat5.exe doc: > http://commons.apache.org/daemon/procrun.html > > I haven't used the procrun-based .exe directly very much, mostly just > the GUI. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE > MATERIAL and is thus for use only by the intended recipient. If you > received this in error, please contact the sender and delete the > and its attachments from all computers. > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@... > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@... > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
RE: Can't start tomcat 5.5.26 service on windows> From: Eric Hawkes [mailto:ehawkes@...]
> Subject: RE: Can't start tomcat 5.5.26 service on windows > > The Java Classpath field in the Java tab is also empty. Which is the cause of the current problem. It should be this: C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\bootstrap.jar I would recommend installing Tomcat (and the JVM) in directory paths without spaces; Microsoft made a real blunder when putting spaces in frequently used directory names, and Apache isn't helping. > The Logon tab shows the Local System account selected Make sure the Local System account has access rights to all necessary files; it normally does, but... > [2008-03-11 14:32:37] [385 javajni.c] [debug] Jvm Option[1] -Xms256m > [2008-03-11 14:32:37] [385 javajni.c] [debug] Jvm Option[2] -Xmx512m Set -Xms and -Xmx to the same value; doing otherwise can make the heap act like a yoyo. > [2008-03-11 14:32:37] [385 javajni.c] [debug] Jvm Option[4] > -Djava.class.path= There's the bad one. > Should I be setting my classpath to include Bootstrap.jar, Yes, but not the CLASSPATH variable. > or have C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin > in my PATH? No, the PATH is irrelevant for services (as is CLASSPATH). > CLASSPATH=.;C:\Program Files\Java\jre1.5.0_12\lib\ext\QTJava.zip <soapbox> The CLASSPATH environment variable is an abomination, and should have been gotten rid of long ago. It's incredibly annoying that QuickTime installation keeps trying to use it when there is a well documented means of providing JRE extensions, and Apple should be using that. I'd strongly suggest deleting the variable from your environment; it will mess you up, sooner or later. </soapbox> - 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@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Can't start tomcat 5.5.26 service on windowsCharles Caldarale wrote:
> I would recommend installing Tomcat (and the JVM) in directory paths > without spaces; Microsoft made a real blunder when putting spaces in > frequently used directory names, and Apache isn't helping. I agree. MS could have done something as dirt simple as c:\Software which is exactly what I do for my JVM, NetBeans, and Tomcat installs. --David --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
RE: Can't start tomcat 5.5.26 service on windowsHi,
I tried the things you suggested, and they helped, but I'm afraid I'm still having problems. Tomcat does install as a service, but cannot be started. stderr.log shows a java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina Further explanation below. I found a couple of other odd things, also explained below. I installed the service from a DOS cmd window, like this: C:\tomcat\bin\tomcat5.exe //IS//Tomcat5 \ --DisplayName="Apache Tomcat 5.5" --Install=C:\tomcat\bin\tomcat5.exe \ --Jvm=auto --Startup=auto --StartMode=jvm --StopMode=jvm \ --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start \ --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop \ --LogPath=C:\tomcat\logs --LogLevel=Debug \ --StdOutput=C:\tomcat\logs\stdout.log --StdError=C:\tomcat\logs\stderr.log \ --Classpath=C:\tomcat\bin\bootstrap.jar Running tomcat5w verifies that the parameters have been set as I intended. One note: the Java tab has the "Use default" check box checked, and the JVM path says: C:\Program Files\Java\jre1.5.0_12\bin\client\jvm.dll I kind of expected that tomcat5 would use the JDK preferentially. Attempting to start the service from the windows services panel causes this error dialog: The Apache Tomcat 5.5 service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service. The jakarta_service log says: [2008-03-12 16:21:47] [1334 prunsrv.c] [debug] Procrun log initialized [2008-03-12 16:21:47] [info] Procrun (2.0.3.0) started [2008-03-12 16:21:47] [532 prunsrv.c] [debug] Installing service... [2008-03-12 16:21:47] [info] Service Tomcat5 name Apache Tomcat 5.5 [2008-03-12 16:21:47] [info] Service Tomcat5 installed [2008-03-12 16:21:47] [info] Procrun finished. [2008-03-12 16:22:08] [1334 prunsrv.c] [debug] Procrun log initialized [2008-03-12 16:22:08] [info] Procrun (2.0.3.0) started [2008-03-12 16:22:08] [info] Running Service... [2008-03-12 16:22:08] [1158 prunsrv.c] [debug] Inside ServiceMain... [2008-03-12 16:22:08] [info] Starting service... [2008-03-12 16:22:08] [385 javajni.c] [debug] Jvm Option[0] -Djava.class.path=C:\tomcat\bin\bootstrap.jar [2008-03-12 16:22:08] [385 javajni.c] [debug] Jvm Option[1] vfprintf [2008-03-12 16:22:08] [471 javajni.c] [debug] argv[0] = start [2008-03-12 16:22:08] [508 javajni.c] [debug] Java Worker thread finished [2008-03-12 16:22:09] [1007 prunsrv.c] [debug] Java started org/apache/catalina/startup/Bootstrap [2008-03-12 16:22:09] [info] Service started in 1140 ms. [2008-03-12 16:22:09] [1250 prunsrv.c] [debug] Waiting worker to finish... [2008-03-12 16:22:09] [1255 prunsrv.c] [debug] Worker finished. [2008-03-12 16:22:09] [info] Run service finished. [2008-03-12 16:22:09] [info] Procrun finished. The stderr log says: java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:222) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:410) I used WinRAR to look inside bootstrap.jar, and in fact, there is no org.apache.catalina.startup.Catalina class. These files are present in org.apache.catalina.startup Bootstrap.class catalina.properties CatalinaProperties.class ClassLoaderFactory.class Tool.class I did some web searching on the exception, but did not find anything very helpful. > I would recommend installing Tomcat (and the JVM) in directory paths > without spaces; Okay: I have installed tomcat (via unzipping it) into c:\tomcat I also copied msvcr71.dll from C:\WINDOWS\system32 to c:\tomcat\bin CATALINA_HOME=C:\tomcat > The CLASSPATH environment variable is an abomination Okay: I have removed it completely. > You should set JAVA_HOME only for a JDK. Thanks. I now have the JDK installed, and I changed JAVA_HOME JAVA_HOME=C:\Program Files\Java\jdk1.5.0_12 > Can you launch the server mode with "java -server -version"? I found a surprise: C:\tomcat>java -server -version Error: no `server' JVM at `C:\Program Files\Java\jre1.5.0_12\bin\server\jvm.dll'. That's true, but I was expecting java -version to look for the JDK, not the JRE because I installed the JDK and I have JAVA_HOME=C:\Program Files\Java\jdk1.5.0_12 C:\tomcat>which java C:\WINDOWS\system32/java.exe C:\tomcat>C:\WINDOWS\system32\java -version java version "1.5.0_12" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04) Java HotSpot(TM) Client VM (build 1.5.0_12-b04, mixed mode, sharing) Another surprise. I didn't know java was copied to the C:\WINDOWS\system32 directory. This is early in my PATH, so I guess it isn't too strange. Using the following parameters in my install command: --Jvm="C:\Program Files\Java\jdk1.5.0_12\jre\bin\server\jvm.dll" --JvmOptions=-server gave me a slightly different error: [2008-03-12 16:13:14] [1334 prunsrv.c] [debug] Procrun log initialized [2008-03-12 16:13:14] [info] Procrun (2.0.3.0) started [2008-03-12 16:13:14] [532 prunsrv.c] [debug] Installing service... [2008-03-12 16:13:14] [info] Service Tomcat5 name Apache Tomcat 5.5 [2008-03-12 16:13:14] [info] Service Tomcat5 installed [2008-03-12 16:13:14] [info] Procrun finished. [2008-03-12 16:13:21] [1334 prunsrv.c] [debug] Procrun log initialized [2008-03-12 16:13:21] [info] Procrun (2.0.3.0) started [2008-03-12 16:13:21] [info] Running Service... [2008-03-12 16:13:21] [1158 prunsrv.c] [debug] Inside ServiceMain... [2008-03-12 16:13:21] [info] Starting service... [2008-03-12 16:13:21] [385 javajni.c] [debug] Jvm Option[0] -server [2008-03-12 16:13:21] [385 javajni.c] [debug] Jvm Option[1] -Djava.class.path=C:\tomcat\bin\bootstrap.jar [2008-03-12 16:13:21] [385 javajni.c] [debug] Jvm Option[2] vfprintf [2008-03-12 16:13:21] [395 javajni.c] [error] CreateJavaVM Failed [2008-03-12 16:13:21] [992 prunsrv.c] [error] Failed initializing java C:\tomcat\bin\bootstrap.jar [2008-03-12 16:13:21] [1260 prunsrv.c] [error] ServiceStart returned 2 [2008-03-12 16:13:21] [info] Run service finished. [2008-03-12 16:13:21] [info] Procrun finished. Environment ----------- I'm running on Windows XP SP2, x86 hardware. I have the correct version of Java for my hardware and OS. I got JDK 1.5.0_12 from Sun's download site, and tomcat 5.5.26 from Apache's download site. C:\tomcat>set ALLUSERSPROFILE=C:\Documents and Settings\All Users ANT_HOME=c:\ant APPDATA=C:\Documents and Settings\echawkes\Application Data CATALINA_HOME=C:\tomcat CLIENTNAME=Console CommonProgramFiles=C:\Program Files\Common Files COMPUTERNAME=EHAWKES-9439 ComSpec=C:\WINDOWS\system32\cmd.exe FP_NO_HOST_CHECK=NO HOMEDRIVE=C: HOMEPATH=\Documents and Settings\echawkes HOMESHARE=\\whistler\users INCLUDE=C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\include\ JAVA_HOME=C:\Program Files\Java\jdk1.5.0_12 LIB=C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Lib\ LOGONSERVER=\\SVL0DC04 MMCommonAppDataRoot=C:\Documents and Settings\All Users\Application Data\Avaya M odular Messaging MM_MSXML_APARTMENT=1 NUMBER_OF_PROCESSORS=2 OS=Windows_NT Path=C:\Program Files\Avaya Modular Messaging\Common;C:\Program Files\Avaya Modu lar Messaging\Common;C:\Program Files\Common Files\Avaya Modular Messaging;C:\Pe rl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\bin;c :\ant;c: \ant\bin;C:\Program Files\Perforce;C:\Program Files\SonicWallES;"C:\Program File s\MailFrontier";C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\Micr osoft SQL Server\90\Tools\binn\;C:\Program Files\QuickTime\QTSystem\ PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH PROCESSOR_ARCHITECTURE=x86 PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 3, GenuineIntel PROCESSOR_LEVEL=15 PROCESSOR_REVISION=0403 ProgramFiles=C:\Program Files PROMPT=$P$G QTJAVA=C:\Program Files\Java\jre1.5.0_12\lib\ext\QTJava.zip SESSIONNAME=RDP-Tcp#2 SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\DOCUME~1\echawkes\LOCALS~1\Temp TMP=C:\DOCUME~1\echawkes\LOCALS~1\Temp UMCommon=C:\Program Files\Avaya Modular Messaging\Common USERDNSDOMAIN=SV.US.SONICWALL.COM USERDOMAIN=SV USERNAME=echawkes USERPROFILE=C:\Documents and Settings\echawkes VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\ VSCOMNTOOLS="C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\" windir=C:\WINDOWS Thanks, Eric -----Original Message----- From: Caldarale, Charles R [mailto:Chuck.Caldarale@...] Sent: Tuesday, March 11, 2008 7:10 AM To: Tomcat Users List Subject: RE: Can't start tomcat 5.5.26 service on windows > From: Eric Hawkes [mailto:ehawkes@...] > Subject: RE: Can't start tomcat 5.5.26 service on windows > > We install the JRE, and then we copy the server jvm.dll > (taken from an SDK install) to > C:\Program Files\Java\jre1.5.0_12\bin\server\jvm.dll Does the server jvm.dll you're copying come from the exact same build and platform (32- vs 64-bit) as the JRE? You would think that would be sufficient, but if you do a detailed comparison of the files in a public JRE against those in a JDK's private JRE you'll see lots of differences, including the contents of various *.jar files. (For example, rt.jar from the JDK is 4 MB larger than the one in the JRE.) I don't know why the two sets of jars should be different, but they are, and it may be pertinent. Can you launch the server mode with "java -server -version"? (Note that the -server option here applies only to the launcher, it's not done that way when running as a service.) What happens when you set JAVA_OPTS=-server and start Tomcat with startup.bat? > We simply point tomcat to the server jvm.dll. Verify it's done properly by changing it in the GUI and see the effect it has on the registry settings for Tomcat. > My JAVA_HOME is C:\Program Files\Java\jre1.5.0_12 You should set JAVA_HOME only for a JDK. The non-service scripts expect JRE_HOME for a JRE-only setup, but the service.bat script ignores that (possibly because a Windows JRE doesn't include the server mode or more likely because someone forgot to update this script when the JRE_HOME check was added to the other scripts). - 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@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
RE: Can't start tomcat 5.5.26 service on windowsHi,
This looks solved. I noticed that when I use service.bat install it adds the following java options: -Dcatalina.base=C:\tomcat -Dcatalina.home=C:\tomcat -Djava.endorsed.dirs=C:\tomcat\common\endorsed -Djava.io.tmpdir=C:\tomcat\temp -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=C:\tomcat\conf\logging.properties When I add them to my command line install, the service can be started and stopped from the command line as well as from the windows services panel. (The service does needs to be started after it is installed - it doesn't start by itself, but that's perfectly fine.) I futher found that I could specify -Dserver in the JvmOptions and use --Jvm="C:\Program Files\Java\jdk1.5.0_12\jre\bin\server\jvm.dll" and it still installs, starts, and stops as I hoped and prayed it would. I learned quite a bit from this exchange, so I'll proceed from here. Thanks for all the help, Eric -----Original Message----- From: Eric Hawkes Sent: Wednesday, March 12, 2008 5:30 PM To: 'Tomcat Users List' Cc: Eric Hawkes Subject: RE: Can't start tomcat 5.5.26 service on windows Hi, I tried the things you suggested, and they helped, but I'm afraid I'm still having problems. Tomcat does install as a service, but cannot be started. stderr.log shows a java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina Further explanation below. I found a couple of other odd things, also explained below. I installed the service from a DOS cmd window, like this: C:\tomcat\bin\tomcat5.exe //IS//Tomcat5 \ --DisplayName="Apache Tomcat 5.5" --Install=C:\tomcat\bin\tomcat5.exe \ --Jvm=auto --Startup=auto --StartMode=jvm --StopMode=jvm \ --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start \ --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop \ --LogPath=C:\tomcat\logs --LogLevel=Debug \ --StdOutput=C:\tomcat\logs\stdout.log --StdError=C:\tomcat\logs\stderr.log \ --Classpath=C:\tomcat\bin\bootstrap.jar Running tomcat5w verifies that the parameters have been set as I intended. One note: the Java tab has the "Use default" check box checked, and the JVM path says: C:\Program Files\Java\jre1.5.0_12\bin\client\jvm.dll I kind of expected that tomcat5 would use the JDK preferentially. Attempting to start the service from the windows services panel causes this error dialog: The Apache Tomcat 5.5 service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service. The jakarta_service log says: [2008-03-12 16:21:47] [1334 prunsrv.c] [debug] Procrun log initialized [2008-03-12 16:21:47] [info] Procrun (2.0.3.0) started [2008-03-12 16:21:47] [532 prunsrv.c] [debug] Installing service... [2008-03-12 16:21:47] [info] Service Tomcat5 name Apache Tomcat 5.5 [2008-03-12 16:21:47] [info] Service Tomcat5 installed [2008-03-12 16:21:47] [info] Procrun finished. [2008-03-12 16:22:08] [1334 prunsrv.c] [debug] Procrun log initialized [2008-03-12 16:22:08] [info] Procrun (2.0.3.0) started [2008-03-12 16:22:08] [info] Running Service... [2008-03-12 16:22:08] [1158 prunsrv.c] [debug] Inside ServiceMain... [2008-03-12 16:22:08] [info] Starting service... [2008-03-12 16:22:08] [385 javajni.c] [debug] Jvm Option[0] -Djava.class.path=C:\tomcat\bin\bootstrap.jar [2008-03-12 16:22:08] [385 javajni.c] [debug] Jvm Option[1] vfprintf [2008-03-12 16:22:08] [471 javajni.c] [debug] argv[0] = start [2008-03-12 16:22:08] [508 javajni.c] [debug] Java Worker thread finished [2008-03-12 16:22:09] [1007 prunsrv.c] [debug] Java started org/apache/catalina/startup/Bootstrap [2008-03-12 16:22:09] [info] Service started in 1140 ms. [2008-03-12 16:22:09] [1250 prunsrv.c] [debug] Waiting worker to finish... [2008-03-12 16:22:09] [1255 prunsrv.c] [debug] Worker finished. [2008-03-12 16:22:09] [info] Run service finished. [2008-03-12 16:22:09] [info] Procrun finished. The stderr log says: java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:222) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:410) I used WinRAR to look inside bootstrap.jar, and in fact, there is no org.apache.catalina.startup.Catalina class. These files are present in org.apache.catalina.startup Bootstrap.class catalina.properties CatalinaProperties.class ClassLoaderFactory.class Tool.class I did some web searching on the exception, but did not find anything very helpful. > I would recommend installing Tomcat (and the JVM) in directory paths > without spaces; Okay: I have installed tomcat (via unzipping it) into c:\tomcat I also copied msvcr71.dll from C:\WINDOWS\system32 to c:\tomcat\bin CATALINA_HOME=C:\tomcat > The CLASSPATH environment variable is an abomination Okay: I have removed it completely. > You should set JAVA_HOME only for a JDK. Thanks. I now have the JDK installed, and I changed JAVA_HOME JAVA_HOME=C:\Program Files\Java\jdk1.5.0_12 > Can you launch the server mode with "java -server -version"? I found a surprise: C:\tomcat>java -server -version Error: no `server' JVM at `C:\Program Files\Java\jre1.5.0_12\bin\server\jvm.dll'. That's true, but I was expecting java -version to look for the JDK, not the JRE because I installed the JDK and I have JAVA_HOME=C:\Program Files\Java\jdk1.5.0_12 C:\tomcat>which java C:\WINDOWS\system32/java.exe C:\tomcat>C:\WINDOWS\system32\java -version java version "1.5.0_12" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04) Java HotSpot(TM) Client VM (build 1.5.0_12-b04, mixed mode, sharing) Another surprise. I didn't know java was copied to the C:\WINDOWS\system32 directory. This is early in my PATH, so I guess it isn't too strange. Using the following parameters in my install command: --Jvm="C:\Program Files\Java\jdk1.5.0_12\jre\bin\server\jvm.dll" --JvmOptions=-server gave me a slightly different error: [2008-03-12 16:13:14] [1334 prunsrv.c] [debug] Procrun log initialized [2008-03-12 16:13:14] [info] Procrun (2.0.3.0) started [2008-03-12 16:13:14] [532 prunsrv.c] [debug] Installing service... [2008-03-12 16:13:14] [info] Service Tomcat5 name Apache Tomcat 5.5 [2008-03-12 16:13:14] [info] Service Tomcat5 installed [2008-03-12 16:13:14] [info] Procrun finished. [2008-03-12 16:13:21] [1334 prunsrv.c] [debug] Procrun log initialized [2008-03-12 16:13:21] [info] Procrun (2.0.3.0) started [2008-03-12 16:13:21] [info] Running Service... [2008-03-12 16:13:21] [1158 prunsrv.c] [debug] Inside ServiceMain... [2008-03-12 16:13:21] [info] Starting service... [2008-03-12 16:13:21] [385 javajni.c] [debug] Jvm Option[0] -server [2008-03-12 16:13:21] [385 javajni.c] [debug] Jvm Option[1] -Djava.class.path=C:\tomcat\bin\bootstrap.jar [2008-03-12 16:13:21] [385 javajni.c] [debug] Jvm Option[2] vfprintf [2008-03-12 16:13:21] [395 javajni.c] [error] CreateJavaVM Failed [2008-03-12 16:13:21] [992 prunsrv.c] [error] Failed initializing java C:\tomcat\bin\bootstrap.jar [2008-03-12 16:13:21] [1260 prunsrv.c] [error] ServiceStart returned 2 [2008-03-12 16:13:21] [info] Run service finished. [2008-03-12 16:13:21] [info] Procrun finished. Environment ----------- I'm running on Windows XP SP2, x86 hardware. I have the correct version of Java for my hardware and OS. I got JDK 1.5.0_12 from Sun's download site, and tomcat 5.5.26 from Apache's download site. C:\tomcat>set ALLUSERSPROFILE=C:\Documents and Settings\All Users ANT_HOME=c:\ant APPDATA=C:\Documents and Settings\echawkes\Application Data CATALINA_HOME=C:\tomcat CLIENTNAME=Console CommonProgramFiles=C:\Program Files\Common Files COMPUTERNAME=EHAWKES-9439 ComSpec=C:\WINDOWS\system32\cmd.exe FP_NO_HOST_CHECK=NO HOMEDRIVE=C: HOMEPATH=\Documents and Settings\echawkes HOMESHARE=\\whistler\users INCLUDE=C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\include\ JAVA_HOME=C:\Program Files\Java\jdk1.5.0_12 LIB=C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Lib\ LOGONSERVER=\\SVL0DC04 MMCommonAppDataRoot=C:\Documents and Settings\All Users\Application Data\Avaya M odular Messaging MM_MSXML_APARTMENT=1 NUMBER_OF_PROCESSORS=2 OS=Windows_NT Path=C:\Program Files\Avaya Modular Messaging\Common;C:\Program Files\Avaya Modu lar Messaging\Common;C:\Program Files\Common Files\Avaya Modular Messaging;C:\Pe rl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\bin;c :\ant;c: \ant\bin;C:\Program Files\Perforce;C:\Program Files\SonicWallES;"C:\Program File s\MailFrontier";C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\Micr osoft SQL Server\90\Tools\binn\;C:\Program Files\QuickTime\QTSystem\ PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH PROCESSOR_ARCHITECTURE=x86 PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 3, GenuineIntel PROCESSOR_LEVEL=15 PROCESSOR_REVISION=0403 ProgramFiles=C:\Program Files PROMPT=$P$G QTJAVA=C:\Program Files\Java\jre1.5.0_12\lib\ext\QTJava.zip SESSIONNAME=RDP-Tcp#2 SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\DOCUME~1\echawkes\LOCALS~1\Temp TMP=C:\DOCUME~1\echawkes\LOCALS~1\Temp UMCommon=C:\Program Files\Avaya Modular Messaging\Common USERDNSDOMAIN=SV.US.SONICWALL.COM USERDOMAIN=SV USERNAME=echawkes USERPROFILE=C:\Documents and Settings\echawkes VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\ VSCOMNTOOLS="C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\" windir=C:\WINDOWS Thanks, Eric -----Original Message----- From: Caldarale, Charles R [mailto:Chuck.Caldarale@...] Sent: Tuesday, March 11, 2008 7:10 AM To: Tomcat Users List Subject: RE: Can't start tomcat 5.5.26 service on windows > From: Eric Hawkes [mailto:ehawkes@...] > Subject: RE: Can't start tomcat 5.5.26 service on windows > > We install the JRE, and then we copy the server jvm.dll > (taken from an SDK install) to > C:\Program Files\Java\jre1.5.0_12\bin\server\jvm.dll Does the server jvm.dll you're copying come from the exact same build and platform (32- vs 64-bit) as the JRE? You would think that would be sufficient, but if you do a detailed comparison of the files in a public JRE against those in a JDK's private JRE you'll see lots of differences, including the contents of various *.jar files. (For example, rt.jar from the JDK is 4 MB larger than the one in the JRE.) I don't know why the two sets of jars should be different, but they are, and it may be pertinent. Can you launch the server mode with "java -server -version"? (Note that the -server option here applies only to the launcher, it's not done that way when running as a service.) What happens when you set JAVA_OPTS=-server and start Tomcat with startup.bat? > We simply point tomcat to the server jvm.dll. Verify it's done properly by changing it in the GUI and see the effect it has on the registry settings for Tomcat. > My JAVA_HOME is C:\Program Files\Java\jre1.5.0_12 You should set JAVA_HOME only for a JDK. The non-service scripts expect JRE_HOME for a JRE-only setup, but the service.bat script ignores that (possibly because a Windows JRE doesn't include the server mode or more likely because someone forgot to update this script when the JRE_HOME check was added to the other scripts). - 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@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
RE: Can't start tomcat 5.5.26 service on windows> From: Eric Hawkes [mailto:ehawkes@...]
> Subject: RE: Can't start tomcat 5.5.26 service on windows > > One note: the Java tab has the "Use default" check box checked, and > the JVM path says: > C:\Program Files\Java\jre1.5.0_12\bin\client\jvm.dll > I kind of expected that tomcat5 would use the JDK preferentially. The "Use default" means to use whatever the Windows registry points to, which is normally the public JRE. A Sun JDK installation does not change this. > The stderr log says: > java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina That's in server/lib/catalina.jar; you apparently have discovered your missing parameters. > I now have the JDK installed, and I changed JAVA_HOME > JAVA_HOME=C:\Program Files\Java\jdk1.5.0_12 Note that environment variables are only meaningful to the programs or scripts that actually look for them; the service itself doesn't use it, nor does the tomcat5.exe service program. The service.bat script does use it, as do the startup.bat and shutdown.bat scripts. > That's true, but I was expecting java -version to look for > the JDK, not the JRE because I installed the JDK and I have > JAVA_HOME=C:\Program Files\Java\jdk1.5.0_12 JAVA_HOME is not used by the java.exe launcher, which is placed into C:\WINDOWS\system32 by the installation of a public JRE (included with a JDK). If you want "java" to use the launcher in the JDK, you'll need to put the JDK bin directory in your PATH, prior to the entry for system32. > Using the following parameters in my install command: > --Jvm="C:\Program Files\Java\jdk1.5.0_12\jre\bin\server\jvm.dll" > --JvmOptions=-server Take out the -server; that's only used by the standard launcher (java.exe), not by the service launcher. The prior line is the important one. > C:\tomcat>set > CATALINA_HOME=C:\tomcat The above variable need not be set globally; the standard service.bat and startup.bat scripts set it locally, which is all that's needed. It's not used at all by the actual service. - 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@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |