This discussion is archived
11 Replies Latest reply: Nov 6, 2013 11:19 PM by algibson RSS

startWebLogic.cmd as Windows Service

496283f8-a3a0-4f89-a58b-895b3d3abb86 Newbie
Currently Being Moderated

Hi,

 

Need Help with Setting up startWebLogic.cmd as Windows Service and deploy (P6.ear) file in the console. What are the step by step guides in setting up this startWeblogic.cmd as windows service and deploy primavera p6.ear file in the console. I have only managed till setting up the weblogic server start as windows service, but im not able to deploy primavera p6.ear file in the console. Service state is only in "Start Running" Mode. It is not changing to "Active" Mode. Anybody could guide in providing the codes? Need help with this area.

  • 1. Re: startWebLogic.cmd as Windows Service
    algibson Journeyer
    Currently Being Moderated

    Hi,

     

     

    I'm assuming that when you just run the console that P6 is deploying okay.

     

    After i've got it running in the console, these are the steps I go through - sorry it seems quite complicated but after you've done it a few hundred times it doesn't seem as hard as it use to

     

     

    Step 1 - make sure Weblogic doesn't require a username/password

    -If you are running in development this is already done and you can move onto step 2

    -If you are running production mode then you will want to create a file called boot.properties under C:\Oracle\Middleware\user_projects\domains\P6\servers\AdminServer\security

    *I'm assuming the following

    **Using windows with a default weblogic install patch

    **Domain is called P6

    **You installed it to an AdminServer (i'm sure it would be a very similar process if you did it to a managed server)

    *You will quite likely need to create the final 'security' folder

     

    Contents of this file requires

    username=weblogic

    password=<your password>

     

    Save and close this file and run weblogic in a console again. This time it should not prompt for a username/password (there will be a reference to boot.properties)

     

    If you check the boot.properties file after this you will notice the username and password are now encrypted.

    End the weblogic session after this is done.

     

     

     

    Step 2 - Base Weblogic service configruation

    I like to do a few customizations here so that the Windows Service name is logical and the process shows up with a dedicated name rather than java.exe or wlsvc.exe (or beasvc.exe depedning on the version of weblogic)

     

    I'm going to assume weblogic 12.1 - if you are using 10.3.6 the steps are basically identical except beasvc.exe is now called wlsvc.exe

     

     

    Step 2a - setting up the files

    Go to C:\Oracle\Middleware\wlserver_12.1\server\bin

    Copy/Paste and rename the file wlsvc.exe to be wlsvcP6.exe (whatever you rename this to is what will show up in task manager)

    Copy/Paste and rename the file uninstallSvc.cmd to be uninstallSvcP6.cmd

    Copy/Paste and rename the file installSvc.cmd to be installSvcP6.cmd

     

     

    Step 2b - setting up the uninstall (I do this for good luck so that I hopefully never need it)

    Edit the uninstallSvcP6.cmd file

    Scroll to the end and fine the line that should look like

    "%WL_HOME%\server\bin\wlsvc" -remove -svcname:"wlsvc %DOMAIN_NAME%_%SERVER_NAME%"

    Change this to be:

    "%WL_HOME%\server\bin\wlsvcP6" -remove -svcname:"PrimaveraP6"

     

    The two changes we are making here is for it to reference the renamed wlsvc.exe file and to give it a nice service name in Windows Services

    Save and close this file.

     

     

    Step 2c - setting up the install

    Edit the installSvcP6.cmd file

    Scroll to the end and fine the line that will start with

    "%WL_HOME%\server\bin\wlsvc" -install -svcname:"wlsvc %DOMAIN_NAME%_%SERVER_NAME%"

    Change this to be

    "%WL_HOME%\server\bin\wlsvcP6" -install -svcname:"PrimaveraP6"

     

    Scroll up to near the top of the file and fine the lines

    @echo off

    SETLOCAL

     

    After this you will want to enter the following (modify these for your environment)

    set DOMAIN_HOME=P6

    set USERDOMAIN_HOME=D:\Oracle\Middleware\user_projects\domains\P6

    set SERVER_NAME=AdminServer

    set PRODUCTION_MODE=true

    set JAVA_VENDOR=Sun

    set JAVA_HOME=C:\Java\jdk1.6.0_38

    (I sometimes also put the set USER_MEM_ARGS as well but it shouldnt be neccessary after the next step is done)

     

     

    The next two lines below all of the SET statmeents should be

    set WL_HOME=D:\Oracle\Middleware\wlserver_12.1

    call "%WL_HOME%\common\bin\commEnv.cmd"

     

    Change this to be

    set WL_HOME=D:\Oracle\Middleware\wlserver_12.1

    @rem call "%WL_HOME%\common\bin\commEnv.cmd"

    call %USERDOMAIN_HOME%\bin\setDomainEnv.cmd

     

    Basically we are telling the service not to use the P6 domains setDomainEnv file instead of the default commEnv.cmd file

     

    I usually chuck a pause statement at the very end of the file so I can see if it was successful or not.

     

    Save and close this file

     

     

    Step 3 - installing the service

    Right click on the installSvcP6.cmd and run as administrator

    Hopefully you will get a message saying it installed successfully.

    Take a deep breath, cross you fingers and start the PrimaveraP6 service

     

    Watch task manager for wlsvcP6.exe

     

    With any luck after a minute or two you should have P6 running (make sure you don't still have P6 running in a console window otherwise it will run into port conflicts).

     

     

     

     

    Good luck.

     

     

    Regards

    Alex

  • 2. Re: startWebLogic.cmd as Windows Service
    496283f8-a3a0-4f89-a58b-895b3d3abb86 Newbie
    Currently Being Moderated

    Hi Alex

     


    Thank you very much. Really appreciate your answer and reply. I will try to implement the solution on my server. Hope it will work fine for me too.

     

    Regards
    Ashik

  • 3. Re: startWebLogic.cmd as Windows Service
    496283f8-a3a0-4f89-a58b-895b3d3abb86 Newbie
    Currently Being Moderated

    Hi Alex

     


    It works great. Absolutely perfect solution. Thank you buddy. Greatly appreciate for sharing your knowledge. Thank you very much.

     


    Regards


    Ashik

  • 4. Re: startWebLogic.cmd as Windows Service
    496283f8-a3a0-4f89-a58b-895b3d3abb86 Newbie
    Currently Being Moderated

    Hi Alex

     

    The solution works perfectly well on windows server 2008. But in windows server 2012, installing service seems to have some issues and the installation is not successful. It prompts error messages something like "service cant be started, as there are other service running and etc".

     

    Windows Server 2008 is 32 Bit

    Windows Server 2012 is 64 Bit

     

    Is there anything you could help me on this area?

     

     

     

     

     

     

    Setup Information:

     

    Domain name: P6

    Domain Location: C:\Oracle\Middleware10_36\user_projects\domains\P6
    Server start Mode: Development Mode
    Java Location: C:\Program Files\Java\jdk1.7.0_45

    Weblogic Server Home: C:\Oracle\Middleware10_36\wlserver_10.3

  • 5. Re: startWebLogic.cmd as Windows Service
    algibson Journeyer
    Currently Being Moderated

    Hi Ashik,

     

    For the managed server you will need to add an extra command in the install svc file.

     

    From my example before - i have now added the address for the AdminServer

    set DOMAIN_HOME=P6

    set USERDOMAIN_HOME=D:\Oracle\Middleware\user_projects\domains\P6

    set SERVER_NAME=AdminServer

    set PRODUCTION_MODE=true

    set JAVA_VENDOR=Sun

    set JAVA_HOME=C:\Java\jdk1.6.0_38

    set ADMIN_URL=http://localhost:7001

     

     

    *Replace localhost with the server name

    *Replace 7001 if your admin server is running on a different port

     

    I haven't tried installing weblogic services on Win2k12 yet, if you can put the full error message I might be able to see what is going on.

     

     

     

    Regards

    Alex

  • 6. Re: startWebLogic.cmd as Windows Service
    496283f8-a3a0-4f89-a58b-895b3d3abb86 Newbie
    Currently Being Moderated

    Hi Alex,

     


    When Installed the Service on Windows server 2012 (64 Bit) , this error pop up when starting the service at the console.

     

    "The PrimaveraP6 service on local computer started and then stopped. Some services stop automatically if they are not in use by other Services or Programs"




    Hope you could help me with this.Thank you.



    Regards









  • 7. Re: startWebLogic.cmd as Windows Service
    algibson Journeyer
    Currently Being Moderated

    Hi,

     

    The usual reason for it to fail straight away is if some of the parameters are incorrect.

    I forgot to update one of the settings for the managed server parameters - not sure if this will fix the problem or not.

     

    As well as adding in the setting for ADMIN_URL the SERVER_NAME would also need to change from AdminServer to the name of the managed server.

     

    I don't expect that will be the cause of the failure, so if you still get the same problem please try the following two:

    1) In Windows Event Viewer it should register an error when the service fails to start. This doesn't usually provide any extra detail but usually worth checking just in case.

    2) Tell the service to create a log file and see if it gives us anything.

    To do this bring up the regsitry editor and go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\PrimaveraP6\Paramters

    There should be a Log entry, enter a value in here like C:\p6web.log and then start the service again and see if any info is put in this log file when it gives an error.

     

     

    Regards

    Alex

  • 8. Re: startWebLogic.cmd as Windows Service
    496283f8-a3a0-4f89-a58b-895b3d3abb86 Newbie
    Currently Being Moderated

    Hi Alex

     

    As you told, i have tried creating log entry in " C:\p6web.log " . In the log file, errors were displayed when service failed to start. I have pasted them below.

     

     

    [Thu Oct 24 14:23:21 2013] [I] [initLog] initializing logger

    [Thu Oct 24 14:23:21 2013] [E] [initLog] No 'ROTATION_TYPE' header found. 'TIME' based rotation will be used by default.

    [Thu Oct 24 14:23:21 2013] [E] [initLog] No 'TIME_START_DATE' header found or value is invalid. Rotation will take place every 24 hours beginning today at 23:59:59

    [Thu Oct 24 14:23:21 2013] [E] [initLog] No 'TIME_INTERVAL_MINS' header found. Using the default value of 24 hours.

    [Thu Oct 24 14:23:21 2013] [I] [initLog] TIME based log rotation is ON

    [Thu Oct 24 14:23:21 2013] [I] [trigger] First rotation due in 34598 secs

    [Thu Oct 24 14:23:21 2013] [I] [ServiceStart] console allocation successful. THREAD_DUMP redirection enabled

    [Thu Oct 24 14:23:21 2013] [I] [ServiceStart] About to execute CreateThread()

    [Thu Oct 24 14:23:21 2013] [I] [ServiceStart] lpszCmdLine = -client   -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m  -Xverify:none -Dprimavera.bootstrap.home=C:\P6EPPM_3\p6  -da -Dplatform.home=C:\Oracle\MIDDLE~2\WLSERV~1.3 -Dwls.home=C:\Oracle\MIDDLE~2\WLSERV~1.3\server -Dweblogic.home=C:\Oracle\MIDDLE~2\WLSERV~1.3\server   -Dweblogic.management.discover=true  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\Oracle\MIDDLE~2\patch_wls1036\profiles\default\sysext_manifest_classpath;C:\Oracle\MIDDLE~2\patch_ocp371\profiles\default\sysext_manifest_classpath -classpath "C:\Oracle\MIDDLE~2\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~2\patch_ocp371\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\PROGRA~1\Java\JDK17~1.0_4\lib\tools.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic.jar;C:\Oracle\MIDDLE~2\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\webservices.jar;C:\Oracle\MIDDLE~2\modules\ORGAPA~1.1/lib/ant-all.jar;C:\Oracle\MIDDLE~2\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\Oracle\MIDDLE~2\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~2\patch_ocp371\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\PROGRA~1\Java\JDK17~1.0_4\lib\tools.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic.jar;C:\Oracle\MIDDLE~2\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\webservices.jar;C:\Oracle\MIDDLE~2\modules\ORGAPA~1.1/lib/ant-all.jar;C:\Oracle\MIDDLE~2\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\common\derby\lib\derbyclient.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\xqrl.jar" -Dweblogic.Name=AdminServer -Dweblogic.management.username= -Dweblogic.ProductionModeEnabled= -Djava.security.policy="C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic.policy" weblogic.Server

    [Thu Oct 24 14:23:21 2013] [I] [ServiceStart] lpszJavaHome = C:\PROGRA~1\Java\JDK17~1.0_4

    [Thu Oct 24 14:23:21 2013] [I] [ServiceStart] lpszExecDir = C:\Oracle\Middleware10_36\user_projects\domains\P6R8

    [Thu Oct 24 14:23:21 2013] [I] [ServiceStart] lpszOldPath = C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;

    [Thu Oct 24 14:23:21 2013] [I] [ServiceStart] lpszNewPath = C:\Oracle\MIDDLE~2\WLSERV~1.3\server\native\win\32;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\bin;C:\PROGRA~1\Java\JDK17~1.0_4\jre\bin;C:\PROGRA~1\Java\JDK17~1.0_4\bin;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\native\win\32\oci920_8;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;

    [Thu Oct 24 14:23:21 2013] [I] [ServiceStart] lpszDelay = 0

    [Thu Oct 24 14:23:21 2013] [I] [ServiceStart] lpszStopClass = []

    [Thu Oct 24 14:23:21 2013] [I] [ServiceStart] lpszLog = [C:\p6web.log]

    [Thu Oct 24 14:23:21 2013] [I] [ServiceStart] Thread created successfully

    [Thu Oct 24 14:23:21 2013] [I] [ServiceStart] Reporting SCM of SERVICE_START_PENDING with delay=0

    [Thu Oct 24 14:23:21 2013] [I] [ServiceStart] lpszHost = []

    [Thu Oct 24 14:23:21 2013] [I] [ServiceStart] lpszPort = []

    [Thu Oct 24 14:23:21 2013] [I] [StartJVM] Parsing JVM Arguments

    [Thu Oct 24 14:23:21 2013] [I] [StartJVM] Initializing JVM

    [Thu Oct 24 14:23:21 2013] [E] [StartJVM] Unable to initialize the Java virtual machine!

    [Thu Oct 24 14:23:21 2013] [I] [ServiceStart] Reporting SCM of SERVICE_RUNNING

    [Thu Oct 24 14:23:21 2013] [I] [ServiceStart] waiting for multiple events

    [Thu Oct 24 14:23:21 2013] [I] [ServiceStart] done waiting for multiple events. Wait=1

    [Thu Oct 24 14:23:21 2013] [E] [ServiceStart] Error in JVM. Cause=Unable to initialize the Java virtual machine!

    [Thu Oct 24 14:23:21 2013] [I] [ServiceStart] Informing SCM about SERVICE_STOP

    [Thu Oct 24 14:28:51 2013] [I] [initLog] initializing logger

    [Thu Oct 24 14:28:51 2013] [E] [initLog] No 'ROTATION_TYPE' header found. 'TIME' based rotation will be used by default.

    [Thu Oct 24 14:28:51 2013] [E] [initLog] No 'TIME_START_DATE' header found or value is invalid. Rotation will take place every 24 hours beginning today at 23:59:59

    [Thu Oct 24 14:28:51 2013] [E] [initLog] No 'TIME_INTERVAL_MINS' header found. Using the default value of 24 hours.

    [Thu Oct 24 14:28:51 2013] [I] [initLog] TIME based log rotation is ON

    [Thu Oct 24 14:28:51 2013] [I] [trigger] First rotation due in 34268 secs

    [Thu Oct 24 14:28:51 2013] [I] [ServiceStart] console allocation successful. THREAD_DUMP redirection enabled

    [Thu Oct 24 14:28:51 2013] [I] [ServiceStart] About to execute CreateThread()

    [Thu Oct 24 14:28:51 2013] [I] [ServiceStart] lpszCmdLine = -client   -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m  -Xverify:none -Dprimavera.bootstrap.home=C:\P6EPPM_3\p6  -da -Dplatform.home=C:\Oracle\MIDDLE~2\WLSERV~1.3 -Dwls.home=C:\Oracle\MIDDLE~2\WLSERV~1.3\server -Dweblogic.home=C:\Oracle\MIDDLE~2\WLSERV~1.3\server   -Dweblogic.management.discover=true  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\Oracle\MIDDLE~2\patch_wls1036\profiles\default\sysext_manifest_classpath;C:\Oracle\MIDDLE~2\patch_ocp371\profiles\default\sysext_manifest_classpath -classpath "C:\Oracle\MIDDLE~2\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~2\patch_ocp371\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\PROGRA~1\Java\JDK17~1.0_4\lib\tools.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic.jar;C:\Oracle\MIDDLE~2\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\webservices.jar;C:\Oracle\MIDDLE~2\modules\ORGAPA~1.1/lib/ant-all.jar;C:\Oracle\MIDDLE~2\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\Oracle\MIDDLE~2\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~2\patch_ocp371\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\PROGRA~1\Java\JDK17~1.0_4\lib\tools.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic.jar;C:\Oracle\MIDDLE~2\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\webservices.jar;C:\Oracle\MIDDLE~2\modules\ORGAPA~1.1/lib/ant-all.jar;C:\Oracle\MIDDLE~2\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\common\derby\lib\derbyclient.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\xqrl.jar" -Dweblogic.Name=AdminServer -Dweblogic.management.username= -Dweblogic.ProductionModeEnabled= -Djava.security.policy="C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic.policy" weblogic.Server

    [Thu Oct 24 14:28:51 2013] [I] [ServiceStart] lpszJavaHome = C:\PROGRA~1\Java\JDK17~1.0_4

    [Thu Oct 24 14:28:51 2013] [I] [ServiceStart] lpszExecDir = C:\Oracle\Middleware10_36\user_projects\domains\P6R8

    [Thu Oct 24 14:28:51 2013] [I] [ServiceStart] lpszOldPath = C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;

    [Thu Oct 24 14:28:51 2013] [I] [ServiceStart] lpszNewPath = C:\Oracle\MIDDLE~2\WLSERV~1.3\server\native\win\32;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\bin;C:\PROGRA~1\Java\JDK17~1.0_4\jre\bin;C:\PROGRA~1\Java\JDK17~1.0_4\bin;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\native\win\32\oci920_8;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;

    [Thu Oct 24 14:28:51 2013] [I] [ServiceStart] lpszDelay = 0

    [Thu Oct 24 14:28:51 2013] [I] [ServiceStart] lpszStopClass = []

    [Thu Oct 24 14:28:51 2013] [I] [ServiceStart] lpszLog = [C:\p6web.log]

    [Thu Oct 24 14:28:51 2013] [I] [ServiceStart] Thread created successfully

    [Thu Oct 24 14:28:51 2013] [I] [ServiceStart] Reporting SCM of SERVICE_START_PENDING with delay=0

    [Thu Oct 24 14:28:51 2013] [I] [ServiceStart] lpszHost = []

    [Thu Oct 24 14:28:51 2013] [I] [ServiceStart] lpszPort = []

    [Thu Oct 24 14:28:51 2013] [I] [StartJVM] Parsing JVM Arguments

    [Thu Oct 24 14:28:51 2013] [I] [StartJVM] Initializing JVM

    [Thu Oct 24 14:28:51 2013] [E] [StartJVM] Unable to initialize the Java virtual machine!

    [Thu Oct 24 14:28:51 2013] [I] [ServiceStart] Reporting SCM of SERVICE_RUNNING

    [Thu Oct 24 14:28:51 2013] [I] [ServiceStart] waiting for multiple events

    [Thu Oct 24 14:28:51 2013] [I] [ServiceStart] done waiting for multiple events. Wait=1

    [Thu Oct 24 14:28:51 2013] [E] [ServiceStart] Error in JVM. Cause=Unable to initialize the Java virtual machine!

    [Thu Oct 24 14:28:51 2013] [I] [ServiceStart] Informing SCM about SERVICE_STOP

    [Thu Oct 24 14:28:56 2013] [I] [initLog] initializing logger

    [Thu Oct 24 14:28:56 2013] [E] [initLog] No 'ROTATION_TYPE' header found. 'TIME' based rotation will be used by default.

    [Thu Oct 24 14:28:56 2013] [E] [initLog] No 'TIME_START_DATE' header found or value is invalid. Rotation will take place every 24 hours beginning today at 23:59:59

    [Thu Oct 24 14:28:56 2013] [E] [initLog] No 'TIME_INTERVAL_MINS' header found. Using the default value of 24 hours.

    [Thu Oct 24 14:28:56 2013] [I] [initLog] TIME based log rotation is ON

    [Thu Oct 24 14:28:56 2013] [I] [trigger] First rotation due in 34263 secs

    [Thu Oct 24 14:28:56 2013] [I] [ServiceStart] console allocation successful. THREAD_DUMP redirection enabled

    [Thu Oct 24 14:28:56 2013] [I] [ServiceStart] About to execute CreateThread()

    [Thu Oct 24 14:28:56 2013] [I] [ServiceStart] lpszCmdLine = -client   -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m  -Xverify:none -Dprimavera.bootstrap.home=C:\P6EPPM_3\p6  -da -Dplatform.home=C:\Oracle\MIDDLE~2\WLSERV~1.3 -Dwls.home=C:\Oracle\MIDDLE~2\WLSERV~1.3\server -Dweblogic.home=C:\Oracle\MIDDLE~2\WLSERV~1.3\server   -Dweblogic.management.discover=true  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\Oracle\MIDDLE~2\patch_wls1036\profiles\default\sysext_manifest_classpath;C:\Oracle\MIDDLE~2\patch_ocp371\profiles\default\sysext_manifest_classpath -classpath "C:\Oracle\MIDDLE~2\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~2\patch_ocp371\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\PROGRA~1\Java\JDK17~1.0_4\lib\tools.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic.jar;C:\Oracle\MIDDLE~2\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\webservices.jar;C:\Oracle\MIDDLE~2\modules\ORGAPA~1.1/lib/ant-all.jar;C:\Oracle\MIDDLE~2\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\Oracle\MIDDLE~2\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~2\patch_ocp371\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\PROGRA~1\Java\JDK17~1.0_4\lib\tools.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic.jar;C:\Oracle\MIDDLE~2\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\webservices.jar;C:\Oracle\MIDDLE~2\modules\ORGAPA~1.1/lib/ant-all.jar;C:\Oracle\MIDDLE~2\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\common\derby\lib\derbyclient.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\xqrl.jar" -Dweblogic.Name=AdminServer -Dweblogic.management.username= -Dweblogic.ProductionModeEnabled= -Djava.security.policy="C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic.policy" weblogic.Server

    [Thu Oct 24 14:28:56 2013] [I] [ServiceStart] lpszJavaHome = C:\PROGRA~1\Java\JDK17~1.0_4

    [Thu Oct 24 14:28:56 2013] [I] [ServiceStart] lpszExecDir = C:\Oracle\Middleware10_36\user_projects\domains\P6R8

    [Thu Oct 24 14:28:56 2013] [I] [ServiceStart] lpszOldPath = C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;

    [Thu Oct 24 14:28:56 2013] [I] [ServiceStart] lpszNewPath = C:\Oracle\MIDDLE~2\WLSERV~1.3\server\native\win\32;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\bin;C:\PROGRA~1\Java\JDK17~1.0_4\jre\bin;C:\PROGRA~1\Java\JDK17~1.0_4\bin;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\native\win\32\oci920_8;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;

    [Thu Oct 24 14:28:56 2013] [I] [ServiceStart] lpszDelay = 0

    [Thu Oct 24 14:28:56 2013] [I] [ServiceStart] lpszStopClass = []

    [Thu Oct 24 14:28:56 2013] [I] [ServiceStart] lpszLog = [C:\p6web.log]

    [Thu Oct 24 14:28:56 2013] [I] [ServiceStart] Thread created successfully

    [Thu Oct 24 14:28:56 2013] [I] [ServiceStart] Reporting SCM of SERVICE_START_PENDING with delay=0

    [Thu Oct 24 14:28:56 2013] [I] [ServiceStart] lpszHost = []

    [Thu Oct 24 14:28:56 2013] [I] [ServiceStart] lpszPort = []

    [Thu Oct 24 14:28:56 2013] [I] [StartJVM] Parsing JVM Arguments

    [Thu Oct 24 14:28:56 2013] [I] [StartJVM] Initializing JVM

    [Thu Oct 24 14:28:56 2013] [E] [StartJVM] Unable to initialize the Java virtual machine!

    [Thu Oct 24 14:28:56 2013] [I] [ServiceStart] Reporting SCM of SERVICE_RUNNING

    [Thu Oct 24 14:28:56 2013] [I] [ServiceStart] waiting for multiple events

    [Thu Oct 24 14:28:56 2013] [I] [ServiceStart] done waiting for multiple events. Wait=1

    [Thu Oct 24 14:28:56 2013] [E] [ServiceStart] Error in JVM. Cause=Unable to initialize the Java virtual machine!

    [Thu Oct 24 14:28:56 2013] [I] [ServiceStart] Informing SCM about SERVICE_STOP

    [Thu Oct 24 14:30:05 2013] [I] [initLog] initializing logger

    [Thu Oct 24 14:30:05 2013] [E] [initLog] No 'ROTATION_TYPE' header found. 'TIME' based rotation will be used by default.

    [Thu Oct 24 14:30:05 2013] [E] [initLog] No 'TIME_START_DATE' header found or value is invalid. Rotation will take place every 24 hours beginning today at 23:59:59

    [Thu Oct 24 14:30:05 2013] [E] [initLog] No 'TIME_INTERVAL_MINS' header found. Using the default value of 24 hours.

    [Thu Oct 24 14:30:05 2013] [I] [initLog] TIME based log rotation is ON

    [Thu Oct 24 14:30:05 2013] [I] [trigger] First rotation due in 34194 secs

    [Thu Oct 24 14:30:05 2013] [I] [ServiceStart] console allocation successful. THREAD_DUMP redirection enabled

    [Thu Oct 24 14:30:05 2013] [I] [ServiceStart] About to execute CreateThread()

    [Thu Oct 24 14:30:05 2013] [I] [ServiceStart] lpszCmdLine = -client   -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m  -Xverify:none -Dprimavera.bootstrap.home=C:\P6EPPM_3\p6  -da -Dplatform.home=C:\Oracle\MIDDLE~2\WLSERV~1.3 -Dwls.home=C:\Oracle\MIDDLE~2\WLSERV~1.3\server -Dweblogic.home=C:\Oracle\MIDDLE~2\WLSERV~1.3\server   -Dweblogic.management.discover=true  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\Oracle\MIDDLE~2\patch_wls1036\profiles\default\sysext_manifest_classpath;C:\Oracle\MIDDLE~2\patch_ocp371\profiles\default\sysext_manifest_classpath -classpath "C:\Oracle\MIDDLE~2\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~2\patch_ocp371\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\PROGRA~1\Java\JDK17~1.0_4\lib\tools.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic.jar;C:\Oracle\MIDDLE~2\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\webservices.jar;C:\Oracle\MIDDLE~2\modules\ORGAPA~1.1/lib/ant-all.jar;C:\Oracle\MIDDLE~2\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\Oracle\MIDDLE~2\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~2\patch_ocp371\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\PROGRA~1\Java\JDK17~1.0_4\lib\tools.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic.jar;C:\Oracle\MIDDLE~2\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\webservices.jar;C:\Oracle\MIDDLE~2\modules\ORGAPA~1.1/lib/ant-all.jar;C:\Oracle\MIDDLE~2\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\common\derby\lib\derbyclient.jar;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\xqrl.jar" -Dweblogic.Name=AdminServer -Dweblogic.management.username= -Dweblogic.ProductionModeEnabled= -Djava.security.policy="C:\Oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic.policy" weblogic.Server

    [Thu Oct 24 14:30:05 2013] [I] [ServiceStart] lpszJavaHome = C:\PROGRA~1\Java\JDK17~1.0_4

    [Thu Oct 24 14:30:05 2013] [I] [ServiceStart] lpszExecDir = C:\Oracle\Middleware10_36\user_projects\domains\P6R8

    [Thu Oct 24 14:30:05 2013] [I] [ServiceStart] lpszOldPath = C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;

    [Thu Oct 24 14:30:05 2013] [I] [ServiceStart] lpszNewPath = C:\Oracle\MIDDLE~2\WLSERV~1.3\server\native\win\32;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\bin;C:\PROGRA~1\Java\JDK17~1.0_4\jre\bin;C:\PROGRA~1\Java\JDK17~1.0_4\bin;C:\Oracle\MIDDLE~2\WLSERV~1.3\server\native\win\32\oci920_8;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;

    [Thu Oct 24 14:30:05 2013] [I] [ServiceStart] lpszDelay = 0

    [Thu Oct 24 14:30:05 2013] [I] [ServiceStart] lpszStopClass = []

    [Thu Oct 24 14:30:05 2013] [I] [ServiceStart] lpszLog = [C:\p6web.log]

    [Thu Oct 24 14:30:05 2013] [I] [ServiceStart] Thread created successfully

    [Thu Oct 24 14:30:05 2013] [I] [ServiceStart] Reporting SCM of SERVICE_START_PENDING with delay=0

    [Thu Oct 24 14:30:05 2013] [I] [ServiceStart] lpszHost = []

    [Thu Oct 24 14:30:05 2013] [I] [ServiceStart] lpszPort = []

    [Thu Oct 24 14:30:05 2013] [I] [StartJVM] Parsing JVM Arguments

    [Thu Oct 24 14:30:05 2013] [I] [StartJVM] Initializing JVM

    [Thu Oct 24 14:30:05 2013] [E] [StartJVM] Unable to initialize the Java virtual machine!

    [Thu Oct 24 14:30:05 2013] [I] [ServiceStart] Reporting SCM of SERVICE_RUNNING

    [Thu Oct 24 14:30:05 2013] [I] [ServiceStart] waiting for multiple events

    [Thu Oct 24 14:30:05 2013] [I] [ServiceStart] done waiting for multiple events. Wait=1

    [Thu Oct 24 14:30:05 2013] [E] [ServiceStart] Error in JVM. Cause=Unable to initialize the Java virtual machine!

    [Thu Oct 24 14:30:05 2013] [I] [ServiceStart] Informing SCM about SERVICE_STOP

     

     

    Hope you could help on this. Thank you once again.

     

    Regards

  • 9. Re: startWebLogic.cmd as Windows Service
    algibson Journeyer
    Currently Being Moderated

    Hi,

     

    Theres a couple of things I can see going on that are worth looking into.

    The first is the error regarding: Error in JVM. Cause=Unable to initialize the Java virtual machine!

     

    If you go back into the registry can you double check what the parameter value is for JavaHome

    FYI it is always best practice to install JDK into a path with no spaces (i usually go for C:\Java)

     

    The other thing that doesnt look quite correct is it is using -client instead of -server

    This likely means you havent done the "set JAVA_V-server" in the setDomainEnv.cmd file

     

    Finally the memory arguments you have look like it is missing a few usual ones.

    Your configuration is showing: -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m

    I would expect to see NewSize, MaxNewSize and a SurvivorRatio.

    This is the settings I have which i believe are the default from the adminguide.

    -server   -XX:NewSize=256m -XX:MaxNewSize=256m -XX:MaxPermSize=256m -XX:SurvivorRatio=8 -Xms2048m -Xmx2048m

     

    (This is also the starting text for my CmdLine Parameter)

     

    The last thing to double check, is it starting up okay as a managed server in a console window?

     

     

    Regards

    Alex

  • 10. Re: startWebLogic.cmd as Windows Service
    496283f8-a3a0-4f89-a58b-895b3d3abb86 Newbie
    Currently Being Moderated

    Hi Alex,

     

     

    Based on my installation experience so far, setting up startWeblogic.cmd as Windows Service seems to work fine only with 32 bit OS. Even for Windows Server 2008 or 2003, the service only installed successfully in 32 Bit systems.

     

     

    For 64 Bit Error Pops up "The PrimaveraP6 service on local computer started and then stopped. Some services stop automatically if they are not in use by other Services or Programs". I do not have any idea why im facing issues with 64 Bit OS. I faced the same error while i tried setting up this service in Windows Server 2012 64 Bit.

     

    Additional Info:

    I have installed Primavera in Admin Server using Port 7001

     

     

    Is there anything you could help on this? Thanks in advance.

     

    Regards

  • 11. Re: startWebLogic.cmd as Windows Service
    algibson Journeyer
    Currently Being Moderated

    Hi,

     

    I usually hit this problem the other way round as I try to use 64bit whenever possible.

    The problem I hope you are getting is whether or not you used beasvc.exe or beasvcX64.exe to create the service.

     

    If you use the wrong one then it gives the above error (there's a lot of things you can do wrong that will give the error you are getting but mixing up the 32bit and 64bit is the least obvious).

     

     

    Regards

    Alex

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points