Re: Tomcat as a service question

2012-10-02 Thread Konstantin Kolinko
2012/10/2 J.V. jvsr...@gmail.com:
 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat as a service question

2012-10-02 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

J.V.,

On 10/1/12 7:58 PM, J.V. wrote:
 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).

Then you need to ask the commons-daemon folks (see below).

 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.

commons-daemon is certainly not dead. You have posted several messages
in the past week and every one of them has been answered (with the
notable exception of Diego Rivera responding with an irritated plea to
other list members to ignore you). I've read your messages from that
list. They all have one problem: you are asking for help but not
giving any information. Asking for any examples for how to do X is
just as good as executing a Google search, except you have to wait for
someone else to do it for you. Do your own Google research.

When you have a specific question, ask on the Apache commons list.

The commons list isn't there to do your work for you, teach you how to
program Java, etc.

commons-daemon includes a service shim for Microsoft Windows: you can
use it to execute just about anything. You (and Tomcat) just happen to
be using it to launch Java Virtual Machine processes. The
commons-daemon list isn't a place to demand answers to questions about
Java. Your tone comes off as ignorant, impatient, angry, and petulant
(cf. Is this project dead?). Everyone on ASF mailing lists are
volunteers and will be happy to help on their own schedule. When you
post, give as much detail as possible, explain what you have tried so
far and where you are getting stuck. Post all error messages if you
have them. Details, details details. Writing a post that just says I
can't get your crappy software to work isn't likely to get you a
decent response.

My advice: check your attitude at the door, *ask* for help instead of
demanding it, and be patient: sometimes it takes a few days for
someone to read a post and reply to it.

Remember: all volunteers.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBrKE4ACgkQ9CaO5/Lv0PBkHwCeN5V+snYg12uKsw21McM3atyg
+dEAnRtN4UwPEdiVl4sLbdHQLXRwb1mc
=Mpet
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat as a service question

2012-10-01 Thread 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.


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, 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

Thanks


J.V.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org