your are correct. getting this configured is difficult. i still have not succeeded. i have played with JavaService and all different configurations of classpath and such. i am lost at this point but still trying...
I have the same problem here. I have used JavaService for a long time with version 3.0.x without problem. I cannot make it work with version 3.2.x, always a missing class. I added the necessary stuff to the class path until the command line was too long...
now, what's next?
*bump* Any solutions to this one? I figured out that the faulty classpath affects ALL jars;
For example, I can configure JBoss to send me email on errors. This works fine when I start it by running the run.bat script, but fails miserably when I try to run it as a service. Again, a classpath error.
Seems like using javaservice screws up the classpaths somehow, so that JBoss can't find anything that isn't mentioned when registering it as a service.
Any way to fix this one? Any ideas? At least a few of us are experiencing this, and I've searched everyplace for an answer. This is a show-stopper for me, if I can't run it as a service on windows platform, I can't use it. Which is really terrible because I kinda like it. A lot.
I got it to work with JavaService. You're right, the difficulty is with the classpath. Specifically it is the all the jar files in the lib folder. I modified the scripts a little bit to correct the problem.
If you open the zip folder I'm including you will notice I changed the name of JavaService.exe to Jboss.exe so I can see it running under Jboss in task manager, but it's the same program
Ok I must be bored, but here's another solution. This one allows you to specify a dependancy, so for example MySql will be running whenever JBoss is started. When I went through this originally I didn't notice this thread statesTomcat3.2. I haven't tested it with it. I'm using JBoss 3.2.1 with the built in Jetty. Hopefully this will still work for the Tomcat versions as well.
Install the files in the attached .zip file to %JBOSS_HOME%\bin and execute InstallJBossService.cmd <Startup_type>
Special thanks to Jrutter (see http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= )
Thank you very much for the example script! It was an interesting and effective way to use command line scripting, hadn't thought of that one.
Unfortunately it didn't work for me. I kind of suspected that it is an issue with the integrated Tomcat version anyway, this seems to prove it.
The problem isn't so much jboss\lib dir, which can be fixed like this (I've added them all manually before) - the problem is server lib directory, which also doesn't get included. This is a more serious issue, for I do not wish to add all server lib jars to classpath as well, I think they should be automatically found. At least at server startup I get messages of jboss lib dir and server lib dir which point to proper locations.
First error I get points to java.lang.NoClassDefFoundError: org/jboss/naming/Util - which resides in one of the .jars under the default server which I'm trying to set up.
I did try adding this line here to also include those .jars:
for %%f in ("%JBoss_Home%\server\%2\lib\*.jar") do call "%JBoss_Home%\bin\lcp.bat" %%f
- result being that classpath became obviously too long; I got :
The input line is too long.
was unexpected at this time.
..from the script.
So this remains unsolved. It would be possibility to trash the built-in tomcat and use jetty instead. However, I am familiar with Tomcat and like it very much, and I think this kind of thing really shouldn't be any issue at all. If I just figured out what to do about this..
I have got the same problem and I am a little bit confused. I don't think I should include all the libraries that JBoss needs in the classpath of JavaService. However I tried it but could not succeeded.
Is there anybody here who have successfully run JBoss 3.2.1 + tomcat 4.1.24 as a windows service usind JavaService? If yes How?
I used Java Service Wrapper and it works fine. Thank you for the help.
I'm attempting to use JavaService to make an NT Service out of an older version of JBoss, namely JBoss 2.4.4.
While I can start the service without issue, stopping the service is causing me no end of grief. Here's the appropriate snippet from my install line (I've added the line breaks for readability):
Now, the error message I get when stopping is
Based on my command-line above, it is because the Shutdown class is in a different classpath, namely %2\lib\ext\jboss.jar;. When I try to use this however, I get all kinds of exceptions on startup.
Sadly, all the JavaService docs out there seem to use JBoss 3.0 and above. Has anyone had any luck using JavaService with older JBoss versions?