Page 1 of 1

Tomcat as a server: path to cmd.exe does not exist

PostPosted: 12. June 2013 15:31
by MirandaNS
Hello all,

New to Apache, Tomcat, XAMPP and this board, apologies if I'm asking something that obvious to everybody but me ;-) I can start and stop Tomcat in the control panel without any problems, but I'd like to run it as a service. When I click the "run as service" button, I get the following error message: "C:\Windows\Sysnative\cmd.exe, The specified path doesn't exist." That error message makes a lot of sense, the correct path is C:\Windows\System32\cmd.exe. Does anybody know how I can tell XAMPP where to find cmd.exe?

Thanks!

Re: Tomcat as a server: path to cmd.exe does not exist

PostPosted: 12. June 2013 23:17
by hackattack142
Hello,

This is strange. If you can start Tomcat via the XAMPP Control Panel both service and non-service functions use the same exact check for 'cmd'. Could you post the entire XAMPP Control Panel log window here to give me a bit more context.

Re: Tomcat as a server: path to cmd.exe does not exist

PostPosted: 13. June 2013 13:37
by MirandaNS
Hi,

Thanks for helping!
Here's the entire content of the Control Panel log window since this morning. I've checked the Tomcat logs. Nothing got written to them when I tried to start tomcat as a service, the last entry in the Catalina log file happened when I stopped Tomcat in the control panel.

09:35:28 [main] Initializing Control Panel
09:35:28 [main] Windows Version: Windows 7 Professional SP1 64-bit
09:35:28 [main] XAMPP Version: 1.8.1
09:35:28 [main] Control Panel Version: 3.1.0 3.1.0 [ Compiled: September 20th 2012 ]
09:35:28 [main] You are not running with administrator rights! This will work for
09:35:28 [main] most application stuff but whenever you do something with services
09:35:28 [main] there will be a security dialogue or things will break! So think
09:35:28 [main] about running this application with administrator rights!
09:35:28 [main] XAMPP Installation Directory: "c:\xampp\"
09:35:28 [main] Checking for prerequisites
09:35:28 [main] All prerequisites found
09:35:28 [main] Initializing Modules
09:35:28 [Apache] Apache Service detected with wrong path
09:35:28 [Apache] Change XAMPP Apache settings or
09:35:28 [Apache] Uninstall/disable the other service manually first
09:35:28 [Apache] Found Path: ERROR: Not Able To Open Service Manager
09:35:28 [Apache] Expected Path: "c:\xampp\apache\bin\httpd.exe" -k runservice
09:35:28 [Apache] Problem detected!
09:35:28 [Apache] Port 80 in use by "httpd.exe"!
09:35:28 [Apache] Apache WILL NOT start without the configured ports free!
09:35:28 [Apache] You need to uninstall/disable/reconfigure the blocking application
09:35:28 [Apache] or reconfigure Apache to listen on a different port
09:35:28 [Apache] Problem detected!
09:35:28 [Apache] Port 443 in use by "httpd.exe"!
09:35:28 [Apache] Apache WILL NOT start without the configured ports free!
09:35:28 [Apache] You need to uninstall/disable/reconfigure the blocking application
09:35:28 [Apache] or reconfigure Apache to listen on a different port
09:35:28 [mysql] MySQL Service detected with wrong path
09:35:28 [mysql] Change XAMPP MySQL settings or
09:35:28 [mysql] Uninstall/disable the other service manually first
09:35:28 [mysql] Found Path: ERROR: Not Able To Open Service Manager
09:35:28 [mysql] Expected Path: c:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysql
09:35:28 [mysql] Problem detected!
09:35:28 [mysql] Port 3306 in use by "mysqld.exe"!
09:35:28 [mysql] MySQL WILL NOT start without the configured ports free!
09:35:28 [mysql] You need to uninstall/disable/reconfigure the blocking application
09:35:28 [mysql] or reconfigure MySQL to listen on a different port
09:35:28 [main] Starting Check-Timer
09:35:28 [main] Control Panel Ready
09:35:32 [Tomcat] Attempting to start Tomcat app...
09:35:35 [Tomcat] Status change detected: running
13:23:45 [Tomcat] Attempting to stop Tomcat
13:23:47 [Tomcat] Status change detected: stopped
13:24:19 [Tomcat] Installing service...
13:24:33 [Tomcat] Tomcat Service Install stopped with errors, return code: 3
13:24:33 [Tomcat] Make sure you have Java JDK or JRE installed and the required ports are free
13:24:33 [Tomcat] Check the "/xampp/tomcat/logs" folder for more information
13:24:33 [Tomcat] Service was NOT (un)installed!

Re: Tomcat as a server: path to cmd.exe does not exist

PostPosted: 13. June 2013 23:00
by hackattack142
Hello,

"C:\Windows\Sysnative\cmd.exe" is a valid virtual alias on 64-bit systems which is why the initial filecheck I run passes.

You should try running the control panel with Admin privileges (right-click cp executable -> run as Admin). You cannot install/uninstall Windows Services without Admin privileges.

If you want to run the Tomcat service, you will also have issues if you do not have 32-bit Java (JRE/JDK) installed or manually install the 64-bit version of Tomcat.

Re: Tomcat as a server: path to cmd.exe does not exist

PostPosted: 25. June 2013 11:50
by MirandaNS
Apologies for the slow reply & thanks again for helping.

I've local admin rights on my machine, so it's likely Java that's causing the problem. I think I'll stick to manually starting and stopping Tomcat for now, until I feel up to doing a manual install of the 64-bit version of Tomcat ;-)

Re: Tomcat as a server: path to cmd.exe does not exist

PostPosted: 25. June 2013 12:07
by Altrea
Hi MirandaNS,

MirandaNS wrote:I've local admin rights on my machine, so it's likely Java that's causing the problem.

local Admin rights are not enough. The new Windows User Account Control (UAC) restricts access to sensitive areas like Services, System Files or Program Files Folder even for local Administrators.
Please try out the recommandation of hackattack142 (the programmer of the XAMPP control panel) to start the control panel with enhanced administration rights.

best wishes,
Altrea

Re: Tomcat as a server: path to cmd.exe does not exist

PostPosted: 11. July 2013 10:40
by jomenes
Hi,
after uploading my database i get this error, what might be generating the error?
Warning: require_once(D:\xampp\htdocs\sprogrammes.go.ke/includes/version.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\sprogrammes\includes\serikali.php on line 61

Fatal error: require_once() [function.require]: Failed opening required 'D:\xampp\htdocs\sprogrammes.go.ke/includes/version.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\sprogrammes\includes\serikali.php on line 61