Skip to main content

BEASVC.EXE - WebLogic as a Windows Service

I remember the first time I had to work out why WebLogic wouldn't run as a service. It was a frustrating experience. There were no error messages. No Windows error dialog. No console output.

How do you troubleshoot something like this??!!

This short article will show you. For simplicity I'll talk about the node manager, but the same principles apply for running an admin or managed server as a service.

First Steps

First, you still have your server logs. Sure the console output is better, but it's a starting point. Check this log for errors and especially take note of the start up variables such as PATH and CLASSPATH. If the server log isn't being created, that tells you WebLogic probably isn't even being started. (Check that you have a license file if you haven't already.)

Ok, so the logs were no help. The next step is to look at how the service is trying to start WebLogic.

When you install WebLogic as a service, you're really setting up beasvc.exe as the service. This is a tool that BEA/Oracle supplies with your WebLogic installation, and all it does is runs WebLogic using parameters stored in the Windows Registry.

To find out what beasvc is doing, you can either:
  • Use the beasvc '-debug' mode; or
  • Simulate the way beasvc starts WebLogic.
BEASVC Debug Mode

beasvc.exe provides an easy debug mode. To use it, open a command-line console (cmd.exe) and change to the directory where all your domains are located (eg c:\bea\user_projects\). Then run the following command:

WL_HOME\server\bin\beasvc.exe -debug "SVC_NAME"

Where WL_HOME is where weblogic server is installed to (Eg.
c:\bea\weblogic92) and SVC_NAME is the name of the service.

Running beasvc with this option will give you a lot of useful information. You can find out more about the '-debug' option here.

Simulating BEASVC.EXE

If the '-debug' option isn't helping, or you need to test something specific, you can always simulate how beasvc starts WebLogic.
Normally to start WebLogic, you'd go to the startWebLogic.cmd (or other) script, but since you're starting WebLogic as a service this script is useless.

What we need to do is get all the environment variables and start-up parameters and then run WebLogic at the command-line.

To find the start-up parameters in the Windows Registry, first obtain the full service name from the Windows Services management console. To do this, right-click on the service you are troubleshooting, and click Properties. Copy the 'Display Name' field.

In regedit, search for the service using this display name. (On the Find dialog, select 'Look at: Keys' only.)

When you've found the node, expand it and select 'Parameters'. This contains all the important start-up parameters and environment variables.

Now that we have the start-up parameters used by beasvc, we can easily simulate it.

First, open a command console (cmd.exe) and change to the directory specified by the ExecDir registry entry.

Set the PATH variable to the value of the Path registry entry. Now run java.exe with no options. If it does not execute, you know that the registry's Path entry is incorrect. You can either edit it with regedit, or fix your installsvc.cmd script and run it again.

Finally, run java.exe again, this time followed by the CmdLine registry entry. This should run WebLogic as beasvc.exe would, except any errors will be printed to the console window.

Common Problems

With services, I frequently encounter various problems caused by incorrect CLASSPATH or PATH values - usually directory names with spaces that aren't surrounded by quotes. Java can interpret these as separate command line parameters, rather than a single file path.

As a general rule, avoid installing WebLogic to a directory that has a space in the name. If you do, use the old 8dot3 path name (use the DIR /X command to obtain these).


If you're having trouble working out why an exception is being thrown, you can check if this site covers your scenario: It's a good resource for administrators who understand java.


  1. Good posts Casey, keep up the good work.


  2. Chris,

    do you know, how to find out parameters of stop status to complete the entire simulation?

  3. Hi Anitka, If you're stopping the process via the Windows Services Computer Management Console, you're really just killing the process. (So you can simulate by using the Windows Task Manager.)

    It is possible to change this behavior so that a graceful shutdown occurs when you stop the service. The steps for doing this can be found here:

  4. Should "classpath" generated from original script tagged to the cmdLine registry string ? Could you provide working registry string values for Path and CmdLine ? Trying to resolve -
    Error in java application .......

    The following line contains specific error details .......
    Unable to find a JVM!

  5. John, There is bug with certain JVMs when running on some 64-bit OSs which results in the "Unable to find a JVM!" error message. See the 3rd post here:

  6. Exceptional! Thank you!


Post a Comment

Popular posts from this blog

Connection refused: No available router to destination

This is a simple symptom-cause-solution blog entry only. I hope these blogs will help fellow administrators.

The following exception occurs in WebLogic server logs. Most likely to occur during WebLogic server start-up, but similar exceptions may occur at other times. t3://myserver:8000: Destination unreachable; nested exception is: Connection refused: connect; No available router to destination] at weblogic.jndi.internal.ExceptionTranslator.toNamingException( at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException( at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext( at weblogic.jndi.Environment.getContext( at weblogic.jndi.Environment.getContext(
This message (Connection refused: connect; No available router to destination) is a kind of "catch…

BAD_CERTIFICATE - A corrupt or unuseable certificate...

This is a simple symptom-cause-solution blog entry only. I hope these blogs will help fellow administrators.
In wls_utc, when trying to test a webservice using SSL, the following error message is received: FATAL Alert:BAD_CERTIFICATE - A corrupt or unuseable certificate was received.
If SSL debugging is enabled, the following error also appears in the logs: ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)' <1254822672320>>
verification failed because RSA key public exponent [3] is too small
The certificate encryption is of a weaker strength than expected by newer versions of Java.
Add the flag "" to the server startup parameters.


WebLogic Admin Console

WebLogic Admin Console
The WebLogic Admin Console is a web-based, user interface used to configure and control a set of WebLogic servers or clusters (i.e. a "domain"). In any logical group of WebLogic servers there must exist one admin server, which hosts the WebLogic Admin Console application and manages the associated configuration files.
WebLogic Administrators will use the Administration Console for a number of tasks, including:
Starting and stopping WebLogic servers or entire clusters.Configuring server parameters, security, database connections and deployed applications.Viewing server status, health and metrics. Note: It is not strictly necessary to use the Weblogic Admin Console to perform these tasks, as they can be scripted using WLST (the WebLogic Scripting Tool).
Accessing the Admin Console
WebLogic Admin Console Url: http://hostname:port/console.
To access the WebLogic Administration Console, assuming the admin server has been started, goto the above url. Where hostname…