I created a new ActiveDirectoryAuthenticator user for our WebLogic server and added the credentials to the boot.properties file under the <Server>/security
folder. When I start the server with startWebLogic.cmd it boots it correctly with the specified user. However when I go through the example, http://docs.oracle.com/cd/E13222_01/wls/docs81b/adminguide/winservice.html, to create the service or try to modify the script that someone had created a few years ago, it does not boot the server with the correct user.
What am I doing wrong?
@echo off
SETLOCAL
set DOMAIN_NAME=<domain_name>
set SERVER_NAME=<server_name>
set MAX_CONNECT_RETRIES=2
set HOST=localhost
set PORT=7011
set USERDOMAIN_HOME=F:\bea1032\user_projects\domains\<domain_name>
set WL_HOME=F:\bea1032\wlserver_10.3
call "%WL_HOME%\common\bin\commEnv.cmd"
:checkWLS
if exist "%WL_HOME%\server\lib\weblogic.jar" goto checkJava
goto finish
:checkJava
if exist "%JAVA_HOME%\bin\java.exe" goto runWebLogic
goto finish
:runWebLogic
if not "%JAVA_VM%" == "" goto noResetJavaVM
if "%JAVA_VENDOR%" == "BEA" set JAVA_VM=-jrocket
if "%JAVA_VENDOR%" == "HP" set JAVA_VM=-server
if "%JAVA_VENDOR%" == "Sun" set JAVA_VM=-server
:noResetJavaVM
if not "%MEM_ARGS%" == "" goto noResetMemArgs
set MEM_ARGS=-Xms32m -Xmx200m
:noResetMemArgs
set CLASSPATH=%WEBLOGIC_CLASSPATH%;%CLASSPATH%
@echo off
if "%ADMIN_URL%" == "" goto runAdmin
@echo on
set CMDLINE="%JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -classpath \"%CLASSPATH%\" -Dweblogic.Name=%SERVER_NAME% -Dweblogic.management.server=\"%ADMIN_URL%\" -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE% -Djava.security.policy=\"%WL_HOME%\server\lib\weblogic.policy\" weblogic.Server"
goto finish
:runAdmin
@echo on
set CMDLINE="%JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -classpath \"%CLASSPATH%\" -Dweblogic.Name=%SERVER_NAME% -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE% -Djava.security.policy=\"%WL_HOME%\server\lib\weblogic.policy\" weblogic.Server"
:finish
if "%WL_USE_X86DLL%" == "true" set EXTRAPATH=%WL_HOME%\server\native\win\32;%WL_HOME%\server\bin;%JAVA_HOME%\jre\bin;%JAVA_HOME%\bin;%WL_HOME%\server\native\win\32\oci920_8
if "%WL_USE_IA64DLL%" == "true" set EXTRAPATH=%WL_HOME%\server\native\win\64\;%WL_HOME%\server\bin;%JAVA_HOME%\jre\bin;%JAVA_HOME%\bin;%WL_HOME%\server\native\win\64\oci920_8
if "%WL_USE_AMD64DLL%" == "true" set EXTRAPATH=%WL_HOME%\server\native\win\x64\;%WL_HOME%\server\bin;%JAVA_HOME%\jre\bin;%JAVA_HOME%\bin;%WL_HOME%\server\native\win\x64\oci920_8
"%WL_HOME%\server\bin\beasvc" -install -svcname:"beasvc %DOMAIN_NAME%_%SERVER_NAME%" -javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%" -maxconnectretries:"%MAX_CONNECT_RETRIES%" -host:"%HOST%" -port:"%PORT%" -extrapath:"%EXTRAPATH%" -cmdline:%CMDLINE%
ENDLOCAL
WLS_USER
andWLS_PW
or setting those directly as-user:
and-password:
in your beasvc call? – Display Name is missing