-
1. Re: Can't start JBoss 5 Beta3 with a JRE
dimitris Feb 3, 2008 2:55 PM (in response to javidjamae)Have you confused the scripts? The comment you are making is about run.bat (to be used under a windows terminal), but your output shows a run.sh (under cygwin) ???
-
2. Re: Can't start JBoss 5 Beta3 with a JRE
javidjamae Feb 3, 2008 4:27 PM (in response to javidjamae)No.. neither run.bat nor run.sh works from cygwin or from a command prompt..
-
3. Re: Can't start JBoss 5 Beta3 with a JRE
jaikiran Feb 4, 2008 4:21 AM (in response to javidjamae)Seems to be working fine with JBoss-4.2.x, the server boots fine. (i havent tried with JBoss 5):
=============================================================================== JBoss Bootstrap Environment JBOSS_HOME: D:\JBoss-4.2.2\jboss-4.2.2.GA JAVA: c:\jdk1.5.0_07\jre\bin\java JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 CLASSPATH: D:\JBoss-4.2.2\jboss-4.2.2.GA\bin\run.jar =============================================================================== 14:48:42,698 INFO [Server] Starting JBoss (MX MicroKernel)... 14:48:42,698 INFO [Server] Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139) 14:48:42,698 INFO [Server] Home Dir: D:\JBoss-4.2.2\jboss-4.2.2.GA 14:48:42,698 INFO [Server] Home URL: file:/D:/JBoss-4.2.2/jboss-4.2.2.GA/ 14:48:42,698 INFO [Server] Patch URL: null 14:48:42,698 INFO [Server] Server Name: jaikiran 14:48:42,698 INFO [Server] Server Home Dir: D:\JBoss-4.2.2\jboss-4.2.2.GA\server\jaikiran 14:48:42,698 INFO [Server] Server Home URL: file:/D:/JBoss-4.2.2/jboss-4.2.2.GA/server/jaikiran/ 14:48:42,698 INFO [Server] Server Log Dir: D:\JBoss-4.2.2\jboss-4.2.2.GA\server\jaikiran\log 14:48:42,698 INFO [Server] Server Temp Dir: D:\JBoss-4.2.2\jboss-4.2.2.GA\server\jaikiran\tmp 14:48:42,698 INFO [Server] Root Deployment Filename: jboss-service.xml 14:48:43,120 INFO [ServerInfo] Java version: 1.5.0_07,Sun Microsystems Inc. 14:48:43,120 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.5.0_07-b03,Sun Microsystems Inc. 14:48:43,120 INFO [ServerInfo] OS-System: Windows 2003 5.2,x86 14:48:43,885 INFO [Server] Core system initialized
From the command prompt, run the following command and post the output here:java -version
Also, do you have a folder named 'server' under /cygdrive/c/jre1.5.0_07/bin folder? -
4. Re: Can't start JBoss 5 Beta3 with a JRE
jaikiran Feb 4, 2008 5:00 AM (in response to javidjamae)Tried with JBoss-5.0 Beta3. Worked fine:
D:\jboss-5.0.0.Beta3\bin>run -b 0.0.0.0 =============================================================================== JBoss Bootstrap Environment JBOSS_HOME: D:\jboss-5.0.0.Beta3 JAVA: c:\jdk1.5.0_07\jre\bin\java JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 CLASSPATH: D:\jboss-5.0.0.Beta3\bin\run.jar =============================================================================== 15:20:30,215 INFO [ServerImpl] Starting JBoss (Microcontainer)... 15:20:30,215 INFO [ServerImpl] Release ID: JBoss [Morpheus] 5.0.0.Beta3 (build: SVNTag=JBoss_5_0_0_Beta3 date=200712210026) 15:20:30,215 INFO [ServerImpl] Home Dir: D:\jboss-5.0.0.Beta3 15:20:30,215 INFO [ServerImpl] Home URL: file:/D:/jboss-5.0.0.Beta3/ 15:20:30,215 INFO [ServerImpl] Library URL: file:/D:/jboss-5.0.0.Beta3/lib/ 15:20:30,215 INFO [ServerImpl] Patch URL: null 15:20:30,215 INFO [ServerImpl] Server Name: default 15:20:30,215 INFO [ServerImpl] Server Home Dir: D:\jboss-5.0.0.Beta3\server\default 15:20:30,215 INFO [ServerImpl] Server Home URL: file:/D:/jboss-5.0.0.Beta3/server/default/ 15:20:30,215 INFO [ServerImpl] Server Data Dir: D:\jboss-5.0.0.Beta3\server\default\data 15:20:30,215 INFO [ServerImpl] Server Temp Dir: D:\jboss-5.0.0.Beta3\server\default\tmp 15:20:30,215 INFO [ServerImpl] Server Config URL: file:/D:/jboss-5.0.0.Beta3/server/default/conf/ 15:20:30,215 INFO [ServerImpl] Server Library URL: file:/D:/jboss-5.0.0.Beta3/server/default/lib/ 15:20:30,215 INFO [ServerImpl] Root Deployment Filename: jboss-service.xml 15:20:30,872 INFO [ServerImpl] Starting Microcontainer, bootstrapURL=file:/D:/jboss-5.0.0.Beta3/server/default/conf/bootstrap-beans.xml 15:20:32,544 INFO [ProfileImpl] Using profile root:D:\jboss-5.0.0.Beta3\server\default 15:20:33,309 INFO [ServerInfo] Java version: 1.5.0_07,Sun Microsystems Inc. 15:20:33,325 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.5.0_07-b03,Sun Microsystems Inc. 15:20:33,325 INFO [ServerInfo] OS-System: Windows 2003 5.2,x86 15:20:33,450 INFO [JMXKernel] Legacy JMX core initialized
And here's the output of JAVA_HOME and java -version:D:\>echo %JAVA_HOME% c:\jdk1.5.0_07\jre D:\>%JAVA_HOME%\bin\java -version java version "1.5.0_07" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03) Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode, sharing)
-
5. Re: Can't start JBoss 5 Beta3 with a JRE
jaikiran Feb 4, 2008 5:38 AM (in response to javidjamae)Hmmm... I am now able to reproduce this with both JBoss-4.2.2 and JBoss-5.0 Beta3. I have many installations of Java on my system. Most of them are the *JDK installations which also have a JRE*. This is how the folder structure of such installations look like:
C: | |--- jdk1.5.0_07 | | | |--- bin | | | | | |---- <all other files> | | | | | |--- jre | | | | | |--- bin | | | | | | | |--- client | | | | |--- jvm.dll | | | | | | | |--- server | | | | | | | | | |--- jvm.dll
Setting JAVA_HOME to c:\jdk1.5.0_07\jre and running JBoss works fine. The %JAVA_HOME% and java -version output is:C:\>echo %JAVA_HOME% c:\jdk1.5.0_07\jre C:\>%JAVA_HOME%\bin\java -version java version "1.5.0_07" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03) Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode, sharing)
Then i also have installations which are *pure JRE installations* (most of the times installed through Windows Updates, but sometimes even manual installations) whose folder structure looks like:C: | |--- jre1.5.0_14 | | | |--- bin | | | | | |--- client | | | | | | | |--- jvm.dll
No "server" under bin here.
Setting JAVA_HOME to c:\jre1.5.0_14 and running JBoss fails with an error (both in 4.2.2 and 5.0). The %JAVA_HOME% and java -version output is:C:\>echo %JAVA_HOME% c:\jre1.5.0_14 C:\>%JAVA_HOME%\bin\java -version java version "1.5.0_14" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03) Java HotSpot(TM) Client VM (build 1.5.0_14-b03, mixed mode, sharing)
When i start JBoss, i get the same error as you:D:\jboss-5.0.0.Beta3\bin>run -b 0.0.0.0 =============================================================================== JBoss Bootstrap Environment JBOSS_HOME: D:\jboss-5.0.0.Beta3 JAVA: c:\jre1.5.0_14\bin\java JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 CLASSPATH: D:\jboss-5.0.0.Beta3\bin\run.jar =============================================================================== Error: no `server' JVM at `c:\jre1.5.0_14\bin\server\jvm.dll'. Press any key to continue . . .
The run.bat/run.sh script relies on the string "hotspot" in the java -version output to pass the -server option to the java command while booting JBoss. Looks like this may not always be true. -
6. Re: Can't start JBoss 5 Beta3 with a JRE
jaikiran Feb 4, 2008 6:02 AM (in response to javidjamae)Maybe the run.bat/run.sh script could be changed from:
rem Add -server to the JVM options, if supported
"%JAVA%" -version 2>&1 | findstr /I hotspot > nul
if not errorlevel == 1 (set JAVA_OPTS=%JAVA_OPTS% -server)
torem Add -server to the JVM options, if supported
"%JAVA%" -server -version 2>&1 | findstr /I hotspot > nul
if not errorlevel == 1 (set JAVA_OPTS=%JAVA_OPTS% -server)
After changing this script, JBoss starts fine without problems. Here's the output of java -server -version for various possible combinations:
1) For those who have set JAVA_HOME to the JRE installation inside the JDK ( "server" is supported )C:\>set JAVA_HOME=c:\jdk1.5.0_07\jre C:\>echo %JAVA_HOME% c:\jdk1.5.0_07\jre C:\>%JAVA_HOME%\bin\java -server -version java version "1.5.0_07" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03) Java HotSpot(TM) Server VM (build 1.5.0_07-b03, mixed mode)
2) For those who have set JAVA_HOME to a pure JRE installation ("server" not supported)C:\>set JAVA_HOME=c:\jre1.5.0_14 C:\>echo %JAVA_HOME% c:\jre1.5.0_14 C:\>%JAVA_HOME%\bin\java -server -version Error: no `server' JVM at `c:\jre1.5.0_14\bin\server\jvm.dll'.
The run.bat/run.sh will not set the -server option when this error occurs and moves ahead with starting JBoss.
3) For those who have set JAVA_HOME to a JDK installation ("server" is supported)C:\>set JAVA_HOME=c:\jdk1.5.0_07 C:\>echo %JAVA_HOME% c:\jdk1.5.0_07 C:\>%JAVA_HOME%\bin\java -server -version java version "1.5.0_07" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03) Java HotSpot(TM) Server VM (build 1.5.0_07-b03, mixed mode)
Tested this change (just a possible option) in run.bat/run.sh with Sun JDK/JRE and JBoss starts up fine. Not tested with other JDKs/JREs. -
7. Re: Can't start JBoss 5 Beta3 with a JRE
javidjamae Feb 4, 2008 10:15 AM (in response to javidjamae)Yes, that's exactly the problem, if its a pure JRE installation, it doesn't have the server directory. Do we need to open up a JIRA issue for this?
-
8. Re: Can't start JBoss 5 Beta3 with a JRE
javidjamae Feb 4, 2008 10:28 AM (in response to javidjamae)I created: http://jira.jboss.org/jira/browse/JBAS-5206