Hi,
I've been debugging my (somewhat patched) WildFly install on a server, where the windows service doesn't start WF29. I do create common.conf.bat & ps1 files where I set JAVA_HOME to a WF29\java directory. Those modification always worked before, so I don't think my patches are the problem here.
On installing on a server, the service doesn't start at all wildfly. JAVA_HOME isn't found by the scripts executed by the service.
I've done a diff of WF28 & 29 and I think I found out why, as a setlocal/endlocal was added to bin\common.bat. I'm not sure what this is supposed to do, but If I remove those commands, everything works.
Is setlocal/endlocale somehow erasing the environment variables that I setted in common.conf.bat (that would be my set JAVA_HOME=) ?
Why was this change done ?
$ diff -c wildfly-28.0.1.Final/bin/common.bat wildfly-29.0.1.Final/bin/common.bat
*** wildfly-28.0.1.Final/bin/common.bat 2023-05-18 15:41:04.000000000 -0400
--- wildfly-29.0.1.Final/bin/common.bat 2023-08-25 11:34:52.000000000 -0400
***************
*** 3,8 ****
--- 3,9 ----
goto :eof
:commonConf
+ setlocal
if "x%COMMON_CONF%" == "x" (
set "COMMON_CONF=%DIRNAME%common.conf.bat"
) else (
***************
*** 13,18 ****
--- 14,20 ----
if exist "%COMMON_CONF%" (
call "%COMMON_CONF%" %*
)
+ endlocal
goto :eof