tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <>
Subject Re: Tomcat as a service question
Date Tue, 02 Oct 2012 07:56:45 GMT
2012/10/2 J.V. <>:
> I am attempting to create a windows service using apache commons-daemon to
> create a service from a Java program I have written (a server).
> I know that tomcat uses this lib and successfully, but I am having a number
> of problem completing the task.  I have posted on commons-daemon but no
> response, I believe that project is dead or not supported well.
> I am asking for some help here or to be pointed to the tomcat code that
> creates and starts tomcat as a service as an example.

Which code? Java? C?

There is no such code that "starts tomcat as a service". It all
belongs to commons-daemon.

You may want to look at "bin/service.bat" (see source distributive or
"Windows" variants of zip binary distributive). That is the script
that installs the service.

Note that tomcatN.exe, tomcatNw.exe are renamed copies of prunsrv.exe,
prunmgr.exe. You may want to rename your ones in the same way. See
commons-daemon docs for details.

> I can install and uninstall the service just OK, but I cannot start it
> either from the command line or through the service manager.
> The error I am getting is:
>   "The data area passed to a system call is too small."
> There are no messages in any log file anywhere,

No messages at all? Even with debug logging being enabled?

a) The log files are not writeable
b) The process does not start at all

> so I have nothing to go on.
> I have checked all my parameters, and I have nothing too small, nothing too
> large and nothing with special characters.
> If there are any ideas, please let me know, Ideally I would like to get this
> service installed and appear when I do:
>     $net start            <= displays all services running

What version of Windows and what version of commons-daemon are you using?

Best regards,
Konstantin Kolinko

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message