4 Replies Latest reply: Aug 31, 2011 2:48 AM by Nitin Bhardwaj RSS

Not able to install JBoss 5.1 as a windows service on Windows 2008 64 bit

Nitin Bhardwaj Newbie

Hi Friends,

 

I am trying to install JBoss 5.1 as a Windows service on Windows 2008 server (64 bit). I tried using two JVM configurations:

1. JDK 1.6 update 27 64 bit

2. JDK 1.6 update 27 32 bit

However, I was unsuccessful using both of the above.

I used service.bat install command from bin directory of JBoss and kept logging on, but no error was displayed. However, the service was not installed.

The log for both of the above approaches remained the following:

 

C:\servers\jboss-5.1.0\bin>service.bat install

 

 

C:\servers\jboss-5.1.0\bin>REM JBoss, the OpenSource webOS

 

 

C:\servers\jboss-5.1.0\bin>REM

 

 

C:\servers\jboss-5.1.0\bin>REM Distributable under LGPL license.

 

 

C:\servers\jboss-5.1.0\bin>REM See terms of license at gnu.org.

 

 

C:\servers\jboss-5.1.0\bin>REM

 

 

C:\servers\jboss-5.1.0\bin>REM -------------------------------------------------

------------------------

 

 

C:\servers\jboss-5.1.0\bin>REM JBoss Service Script for Windows

 

 

C:\servers\jboss-5.1.0\bin>REM -------------------------------------------------

------------------------

 

 

C:\servers\jboss-5.1.0\bin>set DIRNAME=C:\servers\jboss-5.1.0\bin

 

 

C:\servers\jboss-5.1.0\bin>REM

 

 

C:\servers\jboss-5.1.0\bin>REM VERSION, VERSION_MAJOR and VERSION_MINOR are popu

lated

 

 

C:\servers\jboss-5.1.0\bin>REM during the build with ant filter.

 

 

C:\servers\jboss-5.1.0\bin>REM

 

 

C:\servers\jboss-5.1.0\bin>set SVCNAME=JBAS50SVC

 

 

C:\servers\jboss-5.1.0\bin>set SVCDISP=JBoss Application Server 5.1

 

 

C:\servers\jboss-5.1.0\bin>set SVCDESC=JBoss Application Server 5.1.0 GA/Platfor

m: Windows x86

 

 

C:\servers\jboss-5.1.0\bin>set NOPAUSE=Y

 

 

C:\servers\jboss-5.1.0\bin>REM Suppress killing service on logoff event

 

 

C:\servers\jboss-5.1.0\bin>set JAVA_OPTS=-Xrs

 

 

C:\servers\jboss-5.1.0\bin>REM Figure out the running mode

 

 

C:\servers\jboss-5.1.0\bin>if /I "install" == "install" goto cmdInstall

 

 

C:\servers\jboss-5.1.0\bin>jbosssvc.exe -imwdcl JBAS50SVC "C:\servers\jboss-5.1.

0\bin" "JBoss Application Server 5.1" "JBoss Application Server 5.1.0 GA/Platfor

m: Windows x86" service.bat

 

 

C:\servers\jboss-5.1.0\bin>if not errorlevel 0 goto errExplain

 

 

C:\servers\jboss-5.1.0\bin>echo Service JBoss Application Server 5.1 installed

Service JBoss Application Server 5.1 installed

 

 

C:\servers\jboss-5.1.0\bin>goto cmdEnd

 

 

C:\servers\jboss-5.1.0\bin>

 

The most important thing is that no error is being displayed and also that no service is being installed on the server. I've checked "Administrative Tools ---> Services" that no service related to Jboss has been installed.

 

Also note that when I install the JBoss 5.1 as a Windows Service on my XP (32 bit) OS machine then it is installed perfectly fine.

 

Request you to help me.

 

Best Regards,

Nitin

 

Message was edited by: Nitin Bhardwaj

  • 1. Re: Not able to install JBoss 5.1 as a windows service on Windows 2008 64 bit
    Wolfgang Knauf Master

    Hi,

     

    you probably opened the command prompt by using "Run as administrator"?

     

    Best regards

     

    Wolfgang

  • 2. Re: Not able to install JBoss 5.1 as a windows service on Windows 2008 64 bit
    Nitin Bhardwaj Newbie

    Actually, just the opposite. I ran the command prompt as a user.

    The error has been resolved today by running the Command Prompt as an Administrator, and then issuing the command "service.bat install". Peter Johnson pointed me to that answer on Coderanch Thanks to you for replying !

     

    However, now I am facing another error: When I start the Windows service (for JBoss AS) then it throws the following exception when I try to login to my application named XCMS (Note: I've used JAAS based security for my web application and the database for authentication and authorization):

     

    19:11:05,808 ERROR [[/XCMS]] Exception sending request initialized lifecycle event to listener instance of class com.listener.XCMSServletRequestListener

    19:11:27,761 ERROR [CoyoteAdapter] An exception or error occurred in the container during the request processing

    java.lang.OutOfMemoryError: PermGen space

     

    Important Note: No such exception occurs when I start the JBoss AS through run.bat. Everything works fine and I am able to login to the application and use the application.The XCMSServletRequestListener implements the interface java.servlet.ServletRequestListener, and it has been defined as follows in the web.xml:

     

    <listener>

        <description>ServletRequestListener for Setting User Information in Session</description>

        <display-name>XCMSServletRequestListener</display-name>

        <listener-class>com.listener.XCMSServletRequestListener</listener-class>

      </listener>

     

    I have no idea why the OutOfMemoryError is coming only with JBoss Windows Service and not with run.bat (JBoss AS).

    Request you to help me out.

     

    Best Regards,

    Nitin

  • 3. Re: Not able to install JBoss 5.1 as a windows service on Windows 2008 64 bit
    Peter Johnson Master

    You are runing into a know issue where service.bat is setting JAVA_OPTS (it adds in the -Xrs) which causes run.conf.bat to not set any of the memory settings. One workaround is to comment out the setting of JAVA_OPTS within service.bat and add the -Xrs flag to JAVA_OPTS in run.conf.bat.

  • 4. Re: Not able to install JBoss 5.1 as a windows service on Windows 2008 64 bit
    Nitin Bhardwaj Newbie

    Thanks Peter. It worked !

     

    Best Regards,

    Nitin