-
Bug
-
Resolution: Duplicate
-
Major
-
EAP_EWP 5.1.2
-
None
-
Windows
-
Release Notes
-
-
Documented as Resolved Issue
-
NEW
native/sbin/run.log logs "Config file not found $JBOSS_DIST/native/sbin/run.conf.bat" when starting JBoss. Then it results in JBoss starting up without JAVA_OPTS setting, which is specified in $JBOSS_HOME/bin/run.conf.bat.
The following code using DIRNAME for the path of run.conf.bat is root cause. Because service.bat is actually not placed under $JBOSS_HOME/bin but under $JBOSS_DIST/native/sbin.
native/sbin/service.bat
set DIRNAME=%CD% rem Read an optional configuration file. if "x%RUN_CONF%" == "x" ( set "RUN_CONF=%DIRNAME%\run.conf.bat" ) if exist "%RUN_CONF%" ( call "%RUN_CONF%" %* )
A proposed fix is:
service.bat.patch
--- native/sbin/service.bat 2012-02-18 00:12:29.606749132 +0900 +++ native/sbin/service.bat.NEW 2012-02-18 00:12:39.326543339 +0900 @@ -13,9 +13,17 @@ @if "%OS%" == "Windows_NT" setlocal set DIRNAME=%CD% -rem Read an optional configuration file. +REM Find the JBOSS-AS home +if exist "..\..\jboss-as\bin\run.bat" ( + set "EAPPATH=..\..\jboss-as\bin" +) else if exist "..\bin\run.bat" ( + set "EAPPATH=..\bin" +) else if exist "run.bat" ( + set "EAPPATH=." +) + if "x%RUN_CONF%" == "x" ( - set "RUN_CONF=%DIRNAME%\run.conf.bat" + set "RUN_CONF=%EAPPATH%\run.conf.bat" ) if exist "%RUN_CONF%" ( call "%RUN_CONF%" %* @@ -37,14 +45,6 @@ set "JAVA_OPTS=-Xrs %JAVA_OPTS%" ) -REM Find the JBOSS-AS home -if exist "..\..\jboss-as\bin\run.bat" ( - set "EAPPATH=..\..\jboss-as\bin" -) else if exist "..\bin\run.bat" ( - set "EAPPATH=..\bin" -) else if exist "run.bat" ( - set "EAPPATH=." -) if not "x%EAPPATH" == "x" goto getSvcPath echo Cannot find the run.bat.