Friday, July 25, 2008

I think I found a bug in JBoss Native

With the VPC usage on deployment testing is becoming a common practice, software bug can be traced more easily, and more important, early.

When involving in company project that uses the JBoss Application Server, I found a strange behaviour in JBoss. I install of the necessary Java installers and eventually I could not start my window service, using JBoss Native.
This is the way you can simulate.

1) Download VPC 2007 and Windows XP virtual harddisk to re-test, can be obtained here free from Microsoft (valid till September 2008): http://www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&displaylang=en

2) Install JDK & JRE from Sun Java, using default path ( I used jdk1.5.0_15 Windows x86) without restart PC.

3) Configure JAVA_HOME system variables:


4) Install Ant at C-drive ( I used apache-ant-1.7.0) and configure ANT_HOME system variables:


5) Install JBoss at C-drive ( I used jboss-4.2.2.GA):


6) Run the "run.bat" in the "%JBoss_HOME%\bin" directory to verify everything is installed properly. Go to IE and type: http://localhost:8080/jmx-console/


6) Shut down the JBoss in step(5) by pressing Ctrl-C. Install JBoss Native (I used JBoss Native 2.0.4 Win32 x86), even using a new command prompt.

7) run "service.bat install" in command prompt from "%JBoss_HOME%\bin" directory:


7) run "net start JBAS50SVC", you will hit error here.

8) Open "run.log" produced in "%JBoss_HOME%\bin" directory and you will see this:

Starting JBoss Application Server 5.0 [2008-07-24 04:18:06]
ECHO is off.
JAVA_HOME is not set. Unexpected results may occur.
Set JAVA_HOME to the directory of your local JDK to avoid this message. ===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: C:\jboss-4.2.2.GA
JAVA: java
JAVA_OPTS: -Xrs -Dprogram.name=run.bat -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
CLASSPATH: C:\jboss-4.2.2.GA\bin\run.jar
===============================================================================
Error: no `server' JVM at `C:\Program Files\Java\jre1.5.0_15\bin\server\jvm.dll'. Shutdown JBoss Application Server 5.0 service [2008-07-24 04:18:07]

And I reported this strange behaviour (or could be bug) to JIRA (kinda JBoss version of BugZilla), and update the JBoss Wiki :)

2 comments:

Anonymous said...

Hi,
I am installing my whole application from single installeble file.
Which installs the JBoss.
And I tried to make as Windows NT Service. The installation done using izPack.

But the service creation strucks.

How to send commands to "install" to service.bat.

gary said...

I followed: Using JBoss Native to run JBoss AS as a Windows Service, or you try: JavaServiceWrapper by Tanuki.