On Thu, Feb 6, 2014 at 11:42 AM, Jeffrey Janner <jeffrey.jan...@polydyne.com > wrote:
> > -----Original Message----- > > From: André Warnier [mailto:a...@ice-sa.com] > > Sent: Thursday, February 06, 2014 10:33 AM > > To: Tomcat Users List > > Subject: Re: unable to start Tomcat through the Windows Services panel > > > > Hi. > > > > javier_esp...@hna.honda.com wrote: > > > OK, this is what I see in the Event Viewer under General tab "The > > > tomcat7 service terminated with service-specific error Incorrect > > > function.." > > > > > > > Let's start from the beginning. > > > > If you don't get logfiles in the Tomcat/logs directory, then chances > > are that Windows does not even begin to run Tomcat, and that there is > > an error right at the start, when it tries to run it. > > > > So first read this : http://wiki.apache.org/tomcat/FAQ/Windows#Q11 > > > > That will explain /what/ you are actually running, when you (try to) > > run Tomcat as a Service in Windows, and why it is different from > > running Tomcat in a command window. > > Go ahead, read it, we'll wait right here. > > > > ... some time later : > > > > Now you know > > - that tomcat7.exe is a Windows executable program > > - it is the program which the Windows Service Manager tries to start, > > when you start the > > Tomcat7 Service > > - but tomcat7.exe is not really Tomcat; it is a "wrapper" program that > > runs the Java JVM which in turn runs Tomcat. > > > > And to start the Java JVM, and pass to this java JVM the appropriate > > parameters, tomcat7.exe reads these parameters from the Windows > > Registry somewhere. > > > > And to be nice, the Tomcat developers have even provided a specialised > > GUI editor, that allows you to view, set or modify these Tomcat > > Registry parameters that are used by tomcat7.exe. > > And that is the program tomcat7w.exe. So go ahead now, double-click on > > tomcat7w.exe, and look at the information it shows in the various tabs. > > That is probably where something is wrong. > > > > Or else what is wrong, is that the version of tomcat7.exe that you have > > installed, does not match the version of Windows that you are running. > > For example, tomcat7.exe is a 32-bit program, but your Windows PC runs > > a 64-bit version of Windows. Or vice-versa. > > > > Or that in the Service definition of the Tomcat7 Service, the path to > > tomcat7.exe is incorrect. > > You see that path in the first tab of the GUI. > > > > André - > Good points. I'd been following this thread out of curiosity and was just > beginning to think that it was obviously a service configuration error. Agreed, and I was following this thread for the same reason. > I don't have the entire thread handy, and haven't looked at MarkMail, but > I don't remember anyone asking the OP exactly *how* he installed the > service. I had the same thought. > One would assume he used the bat file that is designed to do this, since > he mentions running tomcat from the console using startup.bat (a clear > giveaway that he's not using the fine Windows installer package that > someone spent a lot of time crafting). > Honestly, I forgot all the specific details of how/when I installed tomcat/tomee as a Windows service, but I found it quite intuitive...using the .bat file approach via Windows Command Prompt. The .bat file informed me of the proper 'usage', and I easily installed tomcat/tomee as a Windows Service, via command line (or .bat file), accordingly. And I do use the tomcat7w.exe to modify java options, etc... I never have to open Windows 'Services' to start/stop tomcat/tomee.