-
1. Re: JBossTomcat3.2 & JavaService not working?
mozkill Jun 2, 2003 3:02 PM (in response to harlequinn)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...
JavaService -install Server c:\jdk\jre\bin\server\jvm.dll -Djava.class.path="c:\jdk\lib\tools.jar;c:\jboss\bin\run.jar;c:\jboss\lib\crimson.jar;C:\jboss\log;C:\jboss\lib\ext\activation.jar;C:\jboss\lib\ext\castor-0.9.1.jar;C:\jboss\lib\ext\catalina-service.jar;C:\jboss\lib\ext\gnu-regexp-1.0.8.jar;C:\jboss\lib\ext\hsql.jar;C:\jboss\lib\ext\hsqldb.jar;C:\jboss\lib\ext\jboss-j2ee.jar;C:\jboss\lib\ext\jboss-management.jar;C:\jboss\lib\ext\jboss.jar;C:\jboss\lib\ext\jbosscx.jar;C:\jboss\lib\ext\jbossmq.jar;C:\jboss\lib\ext\jbosspool.jar;C:\jboss\lib\ext\jbosssx.jar;C:\jboss\lib\ext\jce1_2_1.jar;C:\jboss\lib\ext\jcert.jar;C:\jboss\lib\ext\jmxtools.jar;C:\jboss\lib\ext\jndi.jar;C:\jboss\lib\ext\jnet.jar;C:\jboss\lib\ext\jnpserver.jar;C:\jboss\lib\ext\jpl-util-0_5b.jar;C:\jboss\lib\ext\jsse.jar;C:\jboss\lib\ext\log4j.jar;C:\jboss\lib\ext\mail.jar;C:\jboss\lib\ext\oswego-concurrent.jar;C:\jboss\lib\ext\ots-jts_1.0.jar;C:\jboss\lib\ext\tyrex-0.9.8.5.jar;C:\jboss\lib\ext\xalan.jar;C:\jboss\tmp\;C:\jboss\db\;C:\catalina\common\lib\naming-common.jar;C:\catalina\common\lib\naming-resources.jar;C:\catalina\common\lib\servlet.jar;C:\catalina\server\lib\catalina.jar;C:\catalina\server\lib\jakarta-regexp-1.2.jar;C:\catalina\server\lib\servlets-common.jar;C:\catalina\server\lib\servlets-default.jar;C:\catalina\server\lib\servlets-invoker.jar;C:\catalina\server\lib\servlets-manager.jar;C:\catalina\server\lib\servlets-snoop.jar;C:\catalina\server\lib\servlets-webdav.jar;C:\catalina\server\lib\tomcat-ajp.jar;C:\catalina\server\lib\tomcat-util.jar;C:\catalina\server\lib\warp.jar;C:\catalina\bin\bootstrap.jar;C:\catalina\lib\jasper-compiler.jar;C:\catalina\lib\jasper-runtime.jar;C:\catalina\lib\naming-factory.jar" -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXParserFactoryImpl -Djava.security.policy=policy.all -start org.jboss.Main -stop org.jboss.Shutdown -out stdout.log -err stderr.log -current c:\jboss\bin -
2. Re: JBossTomcat3.2 & JavaService not working?
flandry Jun 2, 2003 6:15 PM (in response to harlequinn)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? -
3. Re: JBossTomcat3.2 & JavaService not working?
harlequinn Jun 6, 2003 12:00 PM (in response to harlequinn)*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. -
4. Re: JBossTomcat3.2 & JavaService not working?
blaidig Jun 6, 2003 4:05 PM (in response to harlequinn)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 -
5. Re: JBossTomcat3.2 & JavaService not working?
blaidig Jun 6, 2003 6:51 PM (in response to harlequinn)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= )
Bob -
6. Re: JBossTomcat3.2 & JavaService not working?
harlequinn Jun 7, 2003 2:59 AM (in response to harlequinn)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.
:gotAllArgs
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.. -
7. Re: JBossTomcat3.2 & JavaService not working?
cevdet.dengi Aug 4, 2003 5:48 AM (in response to harlequinn)Hello,
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?
Thanks
cevdet -
8. Re: JBossTomcat3.2 & JavaService not working?
bkross Aug 5, 2003 4:47 AM (in response to harlequinn)I have JBoss 3.2.1 running as a Windows service using Java Service Wrapper without any issues.
http://sourceforge.net/projects/wrapper
I can provide a copy of my configuration file if necessary. -
9. Re: JBossTomcat3.2 & JavaService not working?
cevdet.dengi Aug 6, 2003 4:00 AM (in response to harlequinn)I used Java Service Wrapper and it works fine. Thank you for the help.
-
10. Re: JBossTomcat3.2 & JavaService not working?
dipaka Sep 5, 2003 4:55 PM (in response to harlequinn)Hello everyone,
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):
%1\jre\bin\%3\jvm.dll
-Djava.class.path=%1\lib\tools.jar;%2\bin\run.jar;
-start org.jboss.Main
-params catalina
-stop org.jboss.Shutdown
Now, the error message I get when stopping is
java.lang.NoClassDefFoundError: org/jboss/Shutdown
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?