Can Not Start Tomcat

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Can Not Start Tomcat

Postby johandre » 16. November 2007 11:40

Hello,

I installed XAMPP on my Vista Ultimate 64-bit version home desktop and will be using it as a test platform. To avoid UAC issues in Vista, I installed XAMPP under my c:\ root.

Once I confirmed I had the XAMPP install working properly with Apache, PHP and mySQL, I then installed the Tomcat addon.

My issue is I can not get Tomcat to run. My preference is to have it run as a Windows service when I start my machine. I have tried executing the startup.bat file, but nothing seems to happen. I have tried researching this problem every way I can think of, but I am out of ideas. I earlier had Tomcat installed by itself on my system, and had absolutely no issues getting Tomcat to run.

I am pretty much new to working with all of this. Assistance would be much appreciated.
johandre
 
Posts: 3
Joined: 16. November 2007 11:11
Location: USA and Sweden

Postby Izzy » 16. November 2007 11:57

...My preference is to have it run as a Windows service when I start my machine. I have tried executing the startup.bat file, but nothing seems to happen. ...

To install Tomcat as a service and have it start when Windows starts you need to run:
xampp\tomcat\bin\tomcat_service_install.bat

Then in the Windows Services Manager (I don't have Vista so it may be called something else - it is located under Control Panel>Administrative Tools>Services in XP) you need to find and highlight the entry Apache Tomcat Tomcat5 near the top of the list of services.

Then click on Start the service.

Now change the entry for Apache Tomcat Tomcat5 from Manual to Automatic by right clicking on the entry and selecting Properties>Startup type and selecting Automatic from the drop menu.

Click Apply and then OK.

Close the Services window and your done.

To uninstall the Tomcat service you need to execute:
xampp\tomcat\bin\tomcat_service_uninstall.bat

The xampp\readme-addon-tomcat.txt file explains this but unfortunately not very well and the location still points to the old location and file name and has not been updated to include the new xampp\tomcat\bin directory location and file names.
As Service (NT): Please use the .\xampp\tomcat\tomcat_installservice.bat.
For uninstall this service => .\xampp\tomcat\tomcat_uninstallservice.bat.
Attentention: For Tomcat as service the start mode is "manuell" per default.
Please select your prefered start mode in your system "service" manager.



===========================================
1. The new DeskTopXampp Launch Control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Build Rich AJAX Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby johandre » 16. November 2007 14:00

Hi Izzy,

Thank you for the fast reply. Here is the message I get when I try to run tomcat_service_install.bat.

_____________________________

Installing Tomcat as an Service
'service.bat' is not recognized as an internal or external command,
operable program or batch file.
Now we Start Tomcat6 :)
The service name is invalid.

More help is available by typing NET HELPMSG 2185.

Press any key to continue . . .
______________________________

John
johandre
 
Posts: 3
Joined: 16. November 2007 11:11
Location: USA and Sweden

Postby Izzy » 16. November 2007 15:31

John, do you still have your standalone Tomcat installed?

To read that message go to:
Start->Run...
Type cmd.exe
Then type cd\

This will bring you to the C:\> command prompt

Now follow this and you should see the message:
C:\>cd xampp\tomcat\bin
C:\xampp\tomcat\bin>NET HELPMSG 2185

The service name is invalid.

EXPLANATION

You tried to start a service that is not configured on this system.

ACTION

Check the spelling of the service name or check the configuration information for the service using the Services option
from Server Manager.
C:\xampp\tomcat\bin>


Now type the following to try and start Tomcat again - this is what I see.
C:\xampp\tomcat\bin>tomcat_service_install.bat
Installing Tomcat as an Service
Installing the service 'Tomcat5' ...
Using CATALINA_HOME: C:\xampp\tomcat
Using CATALINA_BASE: C:\xampp\tomcat
Using JAVA_HOME:
Using JVM: auto
The service 'Tomcat5' has been installed.
C:\xampp\tomcat\bin>

Don't forget I have XP so you will have to find the equivalent in Vista.

If you again get this error:
'service.bat' is not recognized as an internal or external command,
operable program or batch file


Try this:
Go to
My Computer->right click->Properties->Advanced->Environment Variables->User variables
and locate “PATH”.
Click on Edit and add ;C:\xampp\tomcat to the end of the list.
Click OK, OK

Now try again to run the bat file - you may have to restart your machine but try the bat file first.

You can double click on the bat file in the bin directory or use the command prompt like above which ever you prefer.

EDIT
Just found this on the net related to Vista - the English is ....
vista is special that way, don't double click the bat file. Right click then select Run As Administer, and it'll open.

your probably wondering why? cuz your account is an admin, thats cuz vista doesn't trust you (or wants to make things harder).

/EDIT


No guarantee that this will work as I have not had to deal with this error as I have always added paths that I believe may give issues.
Here is what my User variable path looks like:
C:\xampp\tomcat;C:\Program Files\Java\Sun\SDK\AppServer\bin;C:\Program Files\Java\Sun\AppServer\bin;C:\Program Files\OpenVPN\bin


And here is my System variables that you can add and edit in the same way:
C:\xampp\tomcat;C:\xampp\apache\bin\imagemagick;C:\xampp\OpenSSH\bin;C:xampp\perl;C:\xampp\perl\bin;C:\Program Files\Java\Sun\AppServer\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\spool\DRIVERS\W32X86\3;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\Program Files\OpenVPN\bin;C:\Program Files\QuickTime\QTSystem;C:\Program Files\Symantec\pcAnywhere

So you see to save me having issues I include the paths I think may need to be defined - I have not had issues at all with these paths.



===========================================
1. The new DeskTopXampp Launch Control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Build Rich AJAX Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby johandre » 16. November 2007 16:29

Hi Izzy,

My issue is resolved! For clarification, I had already removed my stand-alone install of Tomcat before installing XAMPP. So this was not an issue.

I think what solved my problem was possibly related to properly dealing with Vista's User Account Controls (UAC). After reviewing your latest reply, I opened the Command Prompt by Right Clicking on this option in Vista and choosing 'Run as Administrator'. From the Command Prompt, I changed to my c:\xampp\tomcat\bin location and then ran the .bat file exactly as you instructed. I then went to my Services panel in Administrative Tools within Control Panel. From there I found the Tomcat server was now visible, and I did a manual start. I then changed the setting from Manual to Automatic within the Services panel. It was not necessary for me to change the PATH in my Environment Variables. I then restarted my machine to confirm Tomcat was now running as an automatic service, which it was.

Thanks very much for the great help, and have a nice weekend!

Regards,
John
johandre
 
Posts: 3
Joined: 16. November 2007 11:11
Location: USA and Sweden


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 39 guests