views:

54

answers:

1

I'm attempting to get my Jboss Server running as a windows service using the JbossService.exe, and I had it working until I uninstalled it (with ./JbossService -uninstall JbossService), and now, while it will install and the service will appear in the windows service list, attempting to start it will only yield the error message:

"The JBossService on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service."

If it helps, the command I'm using to install it is:

./JBossService.exe -install JBossService "$java_home\jre\bin\server\jvm.dll"
 -Xmx128m -Xrs -Djava.class.path="$java_home\lib\tools.jar;$jboss_home\bin\run.jar"
 -Duser.timezone="Australia/Sydney" 
 -start "org.jboss.Main" -stop "org.jboss.Main" 
 -method systemExit  -out "$jboss_home\server\default\log\stdout.log"
 -err "$jboss_home\server\default\log\stderr.log" 
 -current "$jboss_home\bin"

Any ideas would be appreciated. If more information is required just let me know.

A: 

Hi user408305. Are you using Cygwin? If not, this could be due to the fact that environment variables are not referenced using %%, not $, on Windows. You might try the following instead:

JBossService.exe -install JBossService "%java_home%\jre\bin\server\jvm.dll"
 -Xmx128m -Xrs -Djava.class.path="%java_home%\lib\tools.jar;%jboss_home%\bin\run.jar"
 -Duser.timezone="Australia/Sydney" 
 -start "org.jboss.Main" -stop "org.jboss.Main" 
 -method systemExit  -out "%jboss_home%\server\default\log\stdout.log"
 -err "%jboss_home%\server\default\log\stderr.log" 
 -current "%jboss_home%\bin"

Even if you are using Cygwin, the $ notation still might not work if, for example, these parameters are being stored in the Registry and then read later from the OS (which does not understand Cygwin notation).

Matt Solnit