WebLogic Server Command Reference
The weblogic.Server
class is the main class for a WebLogic Server instance. You start a server instance by invoking weblogic.Server
in a Java command. You can invoke the class directly in a command prompt (shell), indirectly through scripts, or through the Node Manager.
This section describes the following:
For information about using scripts to start an instance of WebLogic Server, refer to "Starting Administration Servers" and "Starting Managed Servers From a WebLogic Server Script" in the Administration Console Online Help.
For information about using the Node Manager to start an instance of WebLogic Server, refer to "Overview of Node Manager" in the Configuring and Managing WebLogic Server guide.
This section describes the environment that you must set up before you can start a server instance. Then it describes the syntax for invoking weblogic.Server
.
To set up your environment for the weblogic.Server
command:
CLASSPATH
environment variable, as described in Modifying the Classpath.PATH
environment variable. You can use any JVM that is listed in the Supported Configurations page at http://download.oracle.com/docs/cd/E13222_01/wls/certifications/index.html.WebLogic Server's classpath is already set, but you may choose to modify it for a number of reasons such as adding a patch to WebLogic Server, adding a third-party database, updating the version of the database you are using, or adding support for Log4j logging.
To apply a patch to ALL of your WebLogic Server domains without the need to modify the classpath of a domain, just give the patch JAR file the name, weblogic_sp.jar
, and copy it into the WL_HOME
/server/lib
directory. The commEnv.cmd/sh
script will automatically include a JAR named weblogic_sp
on the classpath for you.
If you would rather not use the name weblogic_sp.jar
for your patch file or you would just like to make sure a JAR file, such as one mentioned below, comes before weblogic.jar
on the classpath:
commEnv.cmd/sh
script in WL_HOME
/common/bin
and prepend your JAR file to the weblogic_classpath
environment variable.setDomainEnv.cmd/sh
script, in that domain's bin directory, and prepend it onto the PRE_CLASSPATH
environment variable. If you use the trial version of PointBase, an all-Java database management system, include the following files:
If you use WebLogic Enterprise Connectivity, include the following files:
The shell environment in which you run a server determines which character you use to separate path elements. On Windows, you typically use a semicolon (;). In a BASH shell, you typically use a colon (:).
The syntax for invoking weblogic.Server
is as follows:
java [
options
] weblogic.Server [-help]
The java weblogic.Server -help
command returns a list of frequently used options.
If you have set up the required environment described in Environment, when you enter the command java weblogic.Server
with no options, WebLogic Server does the following:
config.xml
file in the current directory, WebLogic Server asks if you want to create a domain and server instance. If you answer yes, WebLogic Server does the following:myserver
, and persists the configuration in a file named ./config.xml
. Any options that you specify are persisted to the config.xml
file. For example, if you specify -Dweblogic.ListenPort=8001
, then WebLogic Server saves 8001
in the config.xml file. For any options that you do not specify, the server instance uses default values.
WebLogic Server also creates a config.xml.booted
file, which is a copy of the config.xml
file in its state just after the server successfully boots. If the config.xml
becomes corrupted, you can boot the server with this config.xml.booted
file.
Note: For information about restrictions for creating and using domains, see Domain Restrictions in Configuring and Managing WebLogic Server.
DefaultAuthenticatorInit.ldift
and SerializedSystemIni.dat
.WebLogic Server also encrypts and stores your username and password in a boot.properties
file, which enables you to bypass the login prompt during subsequent instantiations of the server. For more information, refer to "Boot Identity Files" in the Administration Console Online Help.
startmydomain.cmd
and startmydomain.sh
, that you can use to start subsequent instantiations of the server. You can use a text editor to modify startup options such as whether the server starts in production mode or development mode. The startmydomain
script contains comments that describe each option.
You can use weblogic.Server
options to configure the following attributes of a server instance:
Unless you are creating a new domain as described in Using the weblogic.Server Command Line to Create a Domain, all startup options apply to the current server instantiation; they do not modify the persisted values in an existing config.xml
file. Use the Administration Console or the weblogic.Admin
command to modify the config.xml
file.
For information on verifying the WebLogic Server attribute values that you set, refer to Verifying Attribute Values That Are Set on the Command Line.
The following table describes frequently used options that configure the Java Virtual Machine (JVM) in which the server instance runs. For a complete list of JVM options, refer to the documentation for your specific JVM. For a list of JVMs that can be used with WebLogic Server, refer to the Supported Configurations page at http://download.oracle.com/docs/cd/E13222_01/wls/certifications/index.html.
Specify the minimum and maximum values (in megabytes) for Java heap memory. For example, you might want to start the server with a default allocation of 200 megabytes of Java heap memory to the WebLogic Server. To do so, you can start the server with the For best performance it is recommended that the minimum and maximum values be the same so that the JVM does not resize the heap. The values assigned to these parameters can dramatically affect the performance of your WebLogic Server and are provided here only as general defaults. In a production environment you should carefully consider the correct memory heap size to use for your applications and environment. |
|
The minimum content for this option is described under Modifying the Classpath. Instead of using this argument, you can use an environment variable named |
|
Used by some JVMs to start a HotSpot virtual machine, which enhances performance. For a list of JVMs that can be used with WebLogic Server, refer to the Supported Configurations page at http://download.oracle.com/docs/cd/E13222_01/wls/certifications/certifications/index.html. |
All server instances must have access to license and configuration data. The following table provides options for indicating the location of this data.
Specifies the location of the BEA home directory, which contains licensing and other essential information. By default, |
|
Specifies the server's root directory. By default, the root directory is the directory from which you issue the start command. For more information, refer to "A Server's Root Directory" in the Configuring and Managing WebLogic Server guide. |
|
Specifies a configuration file for your domain. The The XML file must exist in the Administration Server's root directory, which is either the current directory or the directory that you specify with The
Instead, use the following arguments:
If you do not specify this value, the default is |
|
Prevents the Valid only if you invoke |
|
Specifies the name of the domain. If you are using In addition, this option supports a directory structure that WebLogic Server required in releases prior to 7.0 and continues to support in current releases. Prior to 7.0, all configuration files were required to be located at the following pathname: where If your domain's configuration file conforms to that pathname, and if you invoke the |
For information on how a Managed Server retrieves its configuration data, refer to the -Dweblogic.management.server
entry in Table 4-3 on page 11.
The Administration Console does not display values that you set on the command line. For information on verifying the attribute values that you set, refer to Verifying Attribute Values That Are Set on the Command Line.
The following example starts an Administration Server instance named SimpleServer. In the example, the config.xml
file has been renamed to SimpleDomain.xml
and it is located in a directory named c:\my_domains\SimpleDomain
. The command itself is issued from the D:\
directory after running WL_HOME
\server\bin\setWLSEnv.cmd
(where WL_HOME
is the directory in which you installed WebLogic Server):
D:\> java -Dweblogic.Name=SimpleServer -Dweblogic.ConfigFile=SimpleDomain.xml -Dweblogic.RootDirectory=c:\my_domains\SimpleDomain weblogic.Server
The following example starts a Managed Server instance named SimpleManagedServer. Specifying a config.xml
file is not valid because Managed Servers contact the Administration Server for their configuration data. Multiple instances of WebLogic Server can use the same root directory. However, if your server instances share a root directory, make sure that all relative filenames are unique. In this example, SimpleManagedServer shares its root directory with SimpleServer. The command itself is issued from the D:\
directory after running WL_HOME
\server\bin\setWLSEnv.cmd
:
D:\> java -Dweblogic.Name=SimpleManagedServer -Dweblogic.management.server=http://localhost:7001 -Dweblogic.RootDirectory=c:\my_domains\SimpleDomain weblogic.Server
The following table describes the options for configuring how servers communicate.
Starts a server instance as a Managed Server and specifies the Administration Server that will configure and manage the server instance. The domain's configuration file does not specify whether a server configuration is an Administration Server or a Managed Server. You determine whether a server instance is in the role of Administration Server or Managed Server with the options that you use to start the instance. If you omit the For Note: Regardless of which protocol you specify, the initial download of a Managed Server's configuration is over HTTP or HTTPS. After the RMI subsystem initializes, the server instance can use the T3 or T3S protocol. For For For more information on configuring a connection to the Administration Server, refer to "Configuring a Connection to the Administration Server in the Administration Console Online Help. |
|
Specifies the address at which this server instance listens for requests. The This startup option overrides any listen address value specified in the For more information, refer to "Configuring the Listen Address" in the Configuring and Managing WebLogic Server guide. |
|
Enables and specifies the plain-text (non-SSL) listen port for the server instance. This startup option overrides any listen port value specified in the The default listen port is 7001. For more information, refer to "Configuring the Listen Ports" in the Configuring and Managing WebLogic Server guide. |
|
Enables and specifies the port at which this WebLogic Server instance listens for SSL connection requests. This startup option overrides any SSL listen port value specified in the The default SSL listen port is 7002. For more information, refer to "Configuring the Listen Ports" in the Configuring and Managing WebLogic Server guide. |
|
Determines whether an Administration Server recovers control of a domain after the server fails and is restarted. A A Caution: Specify For information on re-establishing administrative control over Managed Servers after an Administration Server has already started, refer to DISCOVERMANAGEDSERVER. |
The Administration Console does not display values that you set on the command line. For information on verifying the attribute values that you set, refer to Verifying Attribute Values That Are Set on the Command Line.
Each Weblogic Server instance uses an instance of weblogic.management.security.SSLMBean
to represent its SSL configuration. All of the options in the following table that start with -Dweblogic.security.SSL
modify the configuration of the server's SSLMBean
. For example, the -Dweblogic.security.SSL
.ignoreHostnameVerification
option sets the value of the SSLMBean
's ignoreHostnameVerification
attribute.
The following table describes the options for configuring a server to communicate using Secure Sockets Layer (SSL).
Disables host-name verification, which enables you to use the demonstration digital certificates that are shipped with WebLogic Server. By default, when a WebLogic Server instance is in the role of SSL client (it is trying to connect to some other server or application via SSL), it verifies that the host name that the SSL server returns in its digital certificate matches the host name of the URL used to connect to the SSL server. If the host names do not match, the connection is dropped. If you disable host name verification, either by using this option or by modifying the server's configuration in the Note: BEA does not recommend using the demonstration digital certificates or turning off host name verification in a production environment. This startup option overrides any Host Name Verification setting in the For more information, refer to "Using Hostname Verification" in the Managing WebLogic Security guide. |
|
|
Specifies the name of a custom Host Name Verifier class. The class must implement the |
|
Modifies the default server-session time-to-live for the SSL session. The |
Specifies the password for retrieving SSL private keys from an encrypted flat file. Use this option if you store private keys in an encrypted flat file. |
|
If you configure a server instance to use the SSL features that were available before WebLogic Server 8.1, you can use this argument to specify the certificate authorities that the server or client trusts. The If a server instance is using the SSL features that were available before 8.1, and if you do not specify this argument, the WebLogic Server or client trusts all of the certificates that are specified in We recommend that you do not use the demonstration certificate authorities in any type of production deployment. For more information, refer to "Configuring SSL" in the Managing WebLogic Security guide. |
The Administration Console does not display values that you set on the command line. For information on verifying the attribute values that you set, refer to Verifying Attribute Values That Are Set on the Command Line.
To set additional SSL attributes from the startup command, do the following:
SSLMBean
and ServerMBean
. The Javadoc also indicates valid values for each attribute.Each attribute that SSLMBean
and ServerMBean
expose as a setter method can be set by a startup option.
SSLMBean
, add the following option to the start command:-Dweblogic.ssl.
attribute-name
=
value
For example, the SSLMBean
exposes its Enabled
attribute with the following setter method:
To enable SSL for a server instance named MedRecServer, use the following command when you start MedRecServer:
java -Dweblogic.Name=MedRecServer
-Dweblogic.ssl.Enabled=true weblogic.Server
The Administration Console does not display values that you set on the command line. For information on verifying the attribute values that you set, refer to Verifying Attribute Values That Are Set on the Command Line.
The following table describes the options for configuring general security parameters.
Specifies the username under which the server instance will run. The username must belong to a role that has permission to start a server. For information on roles and permissions, refer to "Security Roles" in the Securing WebLogic Resources guide. This option prevents a server instance from using any boot identity file and overrides other startup options that cause a server to use boot identity files. For more information, refer to "Boot Identity Files" in the Administration Console Online Help. |
|
This option prevents a server instance from using any boot identity file and overrides other startup options that cause a server to use boot identity files. For more information, refer to "Boot Identity Files" in the Administration Console Online Help. |
|
Creates a Do not specify this argument in a server's BEA recommends that you do not add this argument to a startup script. Instead, use it only when you want to create a For more information, refer to "Boot Identity Files" in the Administration Console Online Help. |
|
Specifies a boot identity file that contains a username and password. The If you do not specify a filename, a server instance or the |
|
Assigns a user ID to anonymous users. By default, all anonymous users are identified with the string To emulate the security behavior of WebLogic Server 6.x, specify For more information, refer to "Users and Groups" in the Securing WebLogic Resources guide. |
|
Standard J2EE options that enable the Java security manager and specify a filename (using a relative or fully-qualified pathname) that contains Java 2 security policies. To use the WebLogic Server sample policy file, specify Using For more information, refer to "Using the Java Security Manager to Protect WebLogic Resources" in the Programming WebLogic Security guide. |
|
By default, roles and security policies cannot be set for an EJB or Web application through the Administration Console unless security constraints were defined in the deployment descriptor for the EJB or Web application. Use this option when starting WebLogic Server to override this problem. This startup option does not work with EJBs or EJB methods that use |
|
Enables you to retrieve an If you retrieve This startup option overrides the Anonymous Admin Lookup Enabled setting on the Security By default, the |
|
Configures the number of seconds that the Identity Assertion cache stores a Subject. When using an Identity Assertion provider (either for an X.509 certificate or some other type of token), Subjects are cached within the server. This greatly enhances performance for servlets and EJB methods with By default, Subjects remain in the cache for 300 seconds, which is also the maximum allowed value. Setting the value to Setting a high value generally improves the performance of identity assertion, but makes the Identity Assertion provider less responsive to changes in the configured Authentication provider. For example, a change in the user's group will not be reflected until the Subject is flushed from the cache and recreated. |
|
Specifies a new directory location for the Although an Auditing provider is configured per security realm, each server writes auditing data to its own log file in the server directory. By default, all auditing information recorded by the WebLogic Auditing provider is saved in For more information, see "Configuring a WebLogic Auditing Provider" in Managing WebLogic Security. |
|
Limits the size of the data file used by the embedded LDAP server. When the data file exceeds the specified size, WebLogic Server eliminates from the data file space occupied by deleted entries. |
|
-Dweblogic.security.ldap. |
Limits the size of the change log file used by the embedded LDAP server. When the change log file exceeds the specified number of entries, WebLogic Server truncates the change log by removing all entries that have been sent to all managed servers. |
The Administration Console does not display values that you set on the command line. For information on verifying the attribute values that you set, refer to Verifying Attribute Values That Are Set on the Command Line.
The following table describes options for configuring a server instance's message output.
Redirects the server and JVM's standard output stream to a file. You can specify a pathname that is fully qualified or relative to the WebLogic Server root directory. For more information, refer to "Redirecting System.out and System.err to a File" in the Administration Console Online Help. |
|
Redirects the server and JVM's standard error stream to a file. You can specify a pathname that is fully qualified or relative to the WebLogic Server root directory. For more information, refer to "Redirecting System.out and System.err to a File" in the Administration Console Online Help. |
|
|
Specifies whether the Administration Server generates Audit Events and/or log messages when a user changes or invokes management operations on domain resources. See "Configuration Auditing" in the Administration Console Online Help. |
The Administration Console does not display values that you set on the command line. For information on verifying the attribute values that you set, refer to Verifying Attribute Values That Are Set on the Command Line.
Each Weblogic Server instance uses an instance of weblogic.management.configuration.LogMBean
to represent the configuration of its logging services.
To set values for LogMBean
attributes from the startup command, do the following:
LogMBean
. The Javadoc also indicates valid values for each attribute.The LogMBean
exposes its FileName
attribute with the following setter method:
To specify the name of the MedRecServer instance's local log file, use the following command when you start MedRecServer:
java -Dweblogic.Name=MedRecServer
-Dweblogic.log.FileName="C:\logfiles\myServer.log"
weblogic.Server
The Administration Console does not display values that you set on the command line. For information on verifying the attribute values that you set, refer to Verifying Attribute Values That Are Set on the Command Line.
The following table describes options for configuring additional attributes of a server instance.
Specifies the name of the server instance that you want to start. The specified value must refer to the name of a server that has been defined in the domain's |
|
Determines whether all servers in a domain start in production mode. This option is applicable only when starting the Administration Server. All Managed Servers start in the same mode as the Administration Server. A If you do not specify this option, the assumed value is For information on the differences between development mode and production mode, refer to "Differences Between Configuration Startup Modes." |
|
Starts a server and places it in the For information about administration ports, refer to "Enabling the Domain-Wide Administration Port" in the Configuring and Managing WebLogic Server guide. This startup option overrides any startup mode setting in the If you do not specify this value (either on the command line or in |
|
Limits the number of entities in an XML document that the WebLogic XML parser resolves. If you do not specify this option, the XML parser that WebLogic Server installs resolves 10,000 entity references in an XML document, regardless of how many an XML document contains. |
|
Causes the JSP compiler on Windows systems to preserve case when it creates output files names. See "Running JSPC on Windows Systems" in Programming WebLogic JSP. |
|
Used to override the default WebLogic Server HTTP stream handler. To use this option, write a class that implements the |
|
When This means that you must make sure that the attributes common to Web applications are scoped to a common parent classloader (application scoped) or you must place them in the system classpath if the two Web applications do not belong to the same application. When The optimistic-serialization value can also be specified at domain level in the |
The Administration Console does not display values that you set on the command line. For information on verifying the attribute values that you set, refer to Verifying Attribute Values That Are Set on the Command Line.
The following table describes options for configuring additional attributes of a cluster.
Determines the Multicast Address that clustered servers use to send and receive cluster-related communications. By default, a clustered server refers to the Multicast Address that is defined in the Note: The Administration Console does not display values that you set on the command line. For information on verifying the attribute values that you set, refer to Verifying Attribute Values That Are Set on the Command Line. Regardless of how you set the Multicast Address, all servers in a cluster must communicate at the same Multicast Address. |
A simple way to start a server instance is as follows:
WL_HOME
\server\bin\setWLSEnv.cmd
(on Windows) WL_HOME
/server/bin/setWLSEnv.sh
(on UNIX)config.xml
file. For example, change to the WL_HOME
\samples\domains\medrec
directory.java -Dweblogic.Name=
servername
weblogic.Server
You can use weblogic.Server
to create a domain that contains a single server instance. You cannot use weblogic.Server
to add Managed Server instances to a domain, nor can you use weblogic.Server
to modify an existing domain.
As described in Default Behavior, if weblogic.Server
is unable to find a config.xml
file, it offers to create the file. Any command option that you specify and that corresponds to an attribute that is persisted in the config.xml
file will be persisted. For example, the -Dweblogic.Name
and -Dweblogic.Domain
options specify the name of a server configuration and the name of a domain. If weblogic.Server
is unable to find a config.xml
file, both of these values are persisted in config.xml
. However, the -Dweblogic.system.BootIdentityFile
option, which specifies a file that contains user credentials for starting a server instance, is not an attribute that the config.xml
file persists.
To create and instantiate a simple example domain and server, do the following:
java -Dweblogic.Domain=SimpleDomain -Dweblogic.Name=SimpleServer
-Dweblogic.management.username=weblogic
-Dweblogic.management.password=weblogic -Dweblogic.ListenPort=7701
weblogic.Server
After you enter this command, WebLogic Server asks if you want to create a new config.xml
file. If you enter y
, it asks you to confirm the password. Then it instantiates a domain named SimpleDomain. The domain's Administration Server is configured as follows:
weblogic
, with a password of weblogic
.localhost
, the IP address of the host computer, or the DNS name of the host computer. For more information about setting the listen address, refer to "Configuring the Listen Address" in the Administration Console Online Help.Entering the weblogic.Server
command as described in this section creates the following files:
config.xml
DefaultAuthenticatorInit.ldift
and SerializedSystemIni.dat
, which store basic security-related data. boot.properties
file, which contains the username and password in an encrypted format. This file enables you to bypass the prompt for username and password when you start the server. For more information, refer to "Boot Identity Files" in the Administration Console Online Help.startmydomain.cmd
and startmydomain.sh
, that you can use to start subsequent instantiations of the server.
The Administration Console does not display values that you set on the command line because the startup options set attribute values for the server's Local Configuration MBean. To see the values that are in a server's Local Configuration MBean, use the weblogic.Admin
utility as follows:
java weblogic.Admin -url
url-for-server-instance
-username
username
-password
password
GET -type
MBean-name
Config -property
attribute-name
For example, to determine the multicast address that a cluster member is using, enter the following command, where MRMachine1:7041
is the listen address and port of the cluster member:
java weblogic.Admin -url MRMachine1:7041 -username weblogic -password weblogic GET -pretty -type ClusterConfig -property MulticastAddress
To determine the severity level of messages that the example MedRecServer prints to standard out, enter the following command:
java weblogic.Admin -url localhost:7001 -username weblogic -password weblogic GET -pretty -type ServerConfig -property StdoutSeverityLevel
For more information about Local Configuration MBeans, refer to "Overview of WebLogic JMX Services" in the Programming WebLogic Server Management Services with JMX guide. For more information on using the weblogic.Admin
utility, refer to weblogic.Admin Command-Line Reference.