Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-8148

JBoss Native service.bat using a wrong path for run.conf.bat

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate Issue
    • Affects Version/s: EAP_EWP 5.1.2
    • Fix Version/s: TBD EAP 5
    • Component/s: Scripts and Commands
    • Labels:
      None
    • Environment:

      Windows

    • Affects:
      Release Notes
    • Release Notes Text:
      Hide
      An issue was found with the the JBoss Native service batch file on Windows Server. When JBoss Enterprise Application Server was started, the service batch file (<filename>service.bat</filename>) searched for its associated configuration batch file in the wrong directory, resulting in the error message <computeroutput>Config file not found $JBOSS_DIST/native/sbin/run.conf.bat</computeroutput>. The cause of the issue was that it was looking for the configuration batch file in <filename>$JBOSS_HOME/bin</filename> when instead it was in <filename>$JBOSS_DIST/native/sbin</filename>. The service batch file has now been corrected with the correct path specified.
      Show
      An issue was found with the the JBoss Native service batch file on Windows Server. When JBoss Enterprise Application Server was started, the service batch file (<filename>service.bat</filename>) searched for its associated configuration batch file in the wrong directory, resulting in the error message <computeroutput>Config file not found $JBOSS_DIST/native/sbin/run.conf.bat</computeroutput>. The cause of the issue was that it was looking for the configuration batch file in <filename>$JBOSS_HOME/bin</filename> when instead it was in <filename>$JBOSS_DIST/native/sbin</filename>. The service batch file has now been corrected with the correct path specified.
    • Release Notes Docs Status:
      Documented as Resolved Issue
    • Docs QE Status:
      NEW

      Description

      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.
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                tfonteyn Tom Fonteyne
                Reporter:
                mmiura Masafumi Miura
                Writer:
                Russell Dickenson
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: