3 Replies Latest reply on Jul 5, 2005 3:24 PM by darranl

    JBoss as a JavaService fails to boot

    slb0971

      I am attempting to configure JBoss to run as a Windows Service. Following the advice and info I've been able to find on the web, I was able to get it running finally. However, it won't completely load. The service starts fine, I can't connect to the JMX console. Upon further investigation, I discovered that the error log contained the following:

      Failed to boot JBoss:
      java.lang.ClassNotFoundException: org.jboss.system.server.ServerInfo
      at org.jboss.mx.loading.UnifiedLoaderRepository3.loadClass(UnifiedLoaderRepository3.java:593)
      at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1192)
      at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:233)
      at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:279)
      at org.jboss.system.server.ServerImpl.createMBean(ServerImpl.java:495)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:387)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
      at org.jboss.Main.boot(Main.java:195)
      at org.jboss.Main$1.run(Main.java:463)
      at java.lang.Thread.run(Thread.java:534)

      I've double-checked my JBOSS_HOME and JAVA_HOME environment variables and done everything else I can think of to figure out why this exception is occurring.

      JBoss runs fine when started from the command line via the run.bat file, so I know my installation is good. Any suggestions?

        • 1. Re: JBoss as a JavaService fails to boot
          darranl

          1 - Post a link to the instructions you followed to install JBoss as a service.

          then

          2 - Describe the steps you went through to install JBoss as a service and show us the exact commands you issues. If you don't have this information available uninstall the current service so you can register it again.

          • 2. Re: JBoss as a JavaService fails to boot
            slb0971

            I performed the following steps to install JBoss service:

            1) Download and unpack the JavaService utility from http://forge.objectweb.org/projects/javaservice
            2) Copy the JavaService.exe file to JBoss bin directory and rename it to JBossService.exe
            3) After considerable trial and error, and lots of Googling, I came up with the following install batch to actually install the service

            echo off

            setlocal JAVA_HOME
            setlocal JBOSS_HOME
            set JAVA_HOME=c:\Sun\AppServer\jdk
            set JBOSS_HOME=c:\jboss-4.0.2

            if "%JAVA_HOME%" == "" goto help
            if "%JBOSS_HOME%" == "" goto help

            net stop JBoss
            JBossService -uninstall JBoss
            JBossService -install JBoss %JAVA_HOME%\jre\bin\server\jvm.dll -Xms192m -Xmx256m -Djava.class.path=%JAVA_HOME%\lib\tools.jar;%JBOSS_HOME%\bin\run.jar;%JBOSS_HOME%\bin\shutdown.jar;%JBOSS_HOME%\lib\dom4j.jar -start org.jboss.Main -params -c Default -stop org.jboss.Main -method systemExit -out %JBOSS_HOME%\bin\out.log -err %JBOSS_HOME%\bin\err.log -current %JBOSS_HOME%\bin
            net start JBoss
            goto end

            :help
            echo The environment variables %JAVA_HOME% and %JBOSS_HOME% have to be set,
            echo JavaService.exe and this script have to be in %%JBOSS_HOME%%\bin.
            echo.
            echo The Service has NOT been installed
            echo.
            echo JAVA_HOME = %JAVA_HOME%
            echo JBOSS_HOME = %JBOSS_HOME%
            echo.

            :end

            3) I also verified the values of JAVA_HOME and JBOSS_HOME environment variables, and rebooted just to be sure.

            The service runs fine, but the error log contains the previously posted exception.

            • 3. Re: JBoss as a JavaService fails to boot
              darranl

              Here is the link to some instructions that I have tested in the past: -

              http://wiki.jboss.org/wiki/Wiki.jsp?page=RunJBossAsAServiceOnWindows

              The main differences I can see are the differences in the classpath and the arguments passed to the main method, if you are starting the default configuration you do not need to specify it is the default.

              I have never tried the command with nested environment variables, I have always just entered the full paths. Also once the service is registered the environment variables are irrelevent.

              Finally when I have seen people trying to use the JDK installed with another application server I have seen mixed results. I do not have the Sun application server installed at the moment so I can't see if there is anything conflicting within the installation. You should try just installing the JDK on its own.