Pages - Menu

Trying to Start a Weblogic Admin Server or Managed Server via a Service on 64bit Windows Fails with "Unable to Find a JVM"

Wednesday, July 24, 2013

If the service was created successfully and however when attempting to start the service, the following window is shown:

The beasvc <Domain>_<ServerName> service on Local Computer started and then stopped. Some services stop automatically  if they have no work to do, for example, the Performance Logs and Alerts service.

Assuming the -log parameter was specified when creating the service as per the note, the <ServerName>-stdout.txt file shows the following:


[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszCmdLine = -client -Xms32m -Xmx200m -XX:MaxPermSize=128m -XX:+UseSpinning  -Xverify:none  -da -Dplatform.home=C:\Oracle\AS11\MIDDLE~1\WLSERV~1.3 -Dwls.home=C:\Oracle\AS11\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=C:\Oracle\AS11\MIDDLE~1\WLSERV~1.3\server   -Dweblogic.management.discover=true  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\Oracle\AS11\MIDDLE~1\patch_wls1033\profiles\default\sysext_manifest_classpath -Xverify:none -classpath etc....
......
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszJavaHome = C:\Oracle\JDK6-64
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszExecDir = C:\Oracle\AS11\MiddlewareStand\user_projects\domains\Test_Domain
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszOldPath = C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszNewPath = C:\Oracle\AS11\MIDDLE~1\WLSERV~1.3\server\native\win\x64\;C:\Oracle\AS11\MIDDLE~1\WLSERV~1.3\server\bin;C:\Oracle\JDK6-64\jre\bin;C:\Oracle\JDK6-64\bin;C:\Oracle\AS11\MIDDLE~1\WLSERV~1.3\server\native\win\x64\oci920_8;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszDelay = 0
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszStopClass = []
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszLog = [C:\Oracle\AS11\MiddlewareStand\user_projects\domains\Test_Domain\servers\AdminServer\logs\AdminServer-stdout.txt]
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] Thread created successfully
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] Reporting SCM of SERVICE_START_PENDING with delay=0
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszHost = []
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszPort = []
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] Reporting SCM of SERVICE_RUNNING
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] waiting for multiple events
[Fri Jul 23 11:12:01 2010] [E] [StartJVM] Unable to fine a JVM
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] done waiting for multiple events. Wait=1
[Fri Jul 23 11:12:01 2010] [E] [ServiceStart] Error in JVM. Cause=Unable to find a JVM!
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] Informing SCM about SERVICE_STOP

CAUSE :

The service is attempting to start Weblogic with the JAVA_OPTION "-client", for example from the log:

 lpszCmdLine = -client -Xms32m -Xmx200m -XX:MaxPermSize=128m -XX:+UseSpinning  -Xverify:none  -da -Dplatform.home=C:\Oracle\AS11\MIDDLE~1\WLSERV~1.3 -Dwls.home=C:\Oracle\AS11\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=C:\Oracle\AS11\MIDDLE~1\WLSERV~1.3\server   -Dweblogic.management.discover=true  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\Oracle\AS11\MIDDLE~1\patch_wls1033\profiles\default\sysext_manifest_classpath -Xverify:none -classpath

On 64bit Windows for the Service to start the WLS Server, the "-server" option should be used


SOLUTION :

Either edit the existing Registry Entry:

1. Select the Windows "Start" -> "Run" -> "regedit"
2. In the Registry Editor, navigate to: HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/beasvc <Domain_ServerName>/Parameters
3. Double Click on the "CmdLine" variable and change the "value data" from "-client" to "-server". For example change:

-client -Xms32m -Xmx200m -XX:MaxPermSize=128m etc..


to:

-server -Xms32m -Xmx200m -XX:MaxPermSize=128m etc..
or if using JRockit JDK:

-jrockit -Xms32m -Xmx200m -XX:MaxPermSize=128m etc..

4. Attempt to start the service again and it should start successfully. Check the <ServerName>-stdout.txt to make sure the server is up and running.


OR delete the exisitng service and create it again:

1. Delete the existing service from the registry and reboot the server.
2. Edit the $MIDDLEWARE_HOME\wlserver_10.3\server\bin\installSvc.cmd
3. Add "set JAVA_VM=-server", or for JRockit only "set JAVA_VM=-jrockit" at the following section:

@echo off

set JAVA_VM=-server

if "%ADMIN_URL%" == "" goto runAdmin
@echo on
set CMDLINE="%JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -classpath \"%CLASSPATH%\" -Dweblogic.Name=%SERVER_NAME%

-Dweblogic.management.username=%WLS_USER% -Dweblogic.management.server=\"%ADMIN_URL%\

8 comments

  1. Worked for me by the solution:
    change the "value data" from "-client" to "-server". For example change:

    -client -Xms32m -Xmx200m -XX:MaxPermSize=128m etc..

    to:

    -server -Xms32m -Xmx200m -XX:MaxPermSize=128m etc..

    Thanks very much...

    ReplyDelete
  2. Many Thanks for this, got me out of trouble.

    ReplyDelete
  3. I changed client to server now there is a new error

    Error in JVM. Caused=Unable to load 'path_to_java\jre\bin\server\jvm.dll'

    I verified that the path is correct and the file is there.

    ReplyDelete
    Replies
    1. Found the issue. The OS is 64-bit and installSvc.cmd was calling beasvc.exe. It needed to call beasvcX64.exe

      Delete
    2. I call beasvcX64.exe in installSvc.cmd.
      "C:\Oracle\Middleware\wlserver_10.3\server\bin\beasvcX64.exe" -install -svcname:"beasvc base_domain_AdminServer" -javahome:"%JAVA_HOME%" -execdir:"C:\Oracle\Middleware\user_projects\domains\base_domain" -maxconnectretries:"%MAX_CONNECT_RETRIES%" -host:"%HOST%" -port:"%PORT%" -extrapath:"%EXTRAPATH%" -password:"%WLS_PW%" -cmdline:%CMDLINE%
      But it don't work.

      Delete
    3. Got the Sam error. It doesn't work at my side either

      Delete
    4. Did you fix the issue. I am also facing same issue.

      Delete
  4. thanks for this usefull article, waiting for this article like this again. It managed services

    ReplyDelete

 

Archives

Blogger news

Blogroll

Most Reading