Using the WebLogic Server Java Utilities

WebLogic Server provides a number of Java utilities and Ant tasks for performing administrative and programming tasks.

To use these utilities and tasks, set your CLASSPATH correctly. For more information, see Setting the Classpath.

WebLogic Server provides several Java programs that simplify installation and configuration tasks, provide services, and offer convenient shortcuts. The Java utilities provided with WebLogic Server are all described below. The command-line syntax is specified for all utilities and, for some, examples are provided.

WebLogic Server also provides a number of Ant tasks that automate common application server programming tasks. The Apache Web site provides other useful Ant tasks as well, including tasks for packaging EAR, WAR, and JAR files. For more information, see http://jakarta.apache.org/ant/manual/.

 

appc

The appc compiler generates and compiles the classes needed to deploy EJBs and JSPs to WebLogic Server. It also validates the deployment descriptors for compliance with the current specifications at both the individual module level and the application level. See appc in Programming Weblogic Server Enterprise JavaBeans.

 

AppletArchiver

The AppletArchiver utility runs an applet in a separate frame, keeps a record of all of the downloaded classes and resources used by the applet, and packages these into either a .jar file or a .cab file. (The cabarc utility is available from Microsoft.)

 

Syntax

$ java utils.applet.archiver.AppletArchiver URL filename

Argument

Definition

URL URL for the applet.
filename Local filename that is the destination for the .jar/.cab archive.

 

autotype

Use the autotype Ant task to generate non-built-in data type components, such as the serialization class, for Web services. The fully qualified name for the autotype Ant task is weblogic.ant.taskdefs.webservices.javaschema.JavaSchema. See Running the autotype Ant Task in Programming WebLogic Web Services.

 

BuildXMLGen

Use BuildXMLGen to generate a build.xml file for enterprise applications in the split-directory structure. For complete documentation of this utility, see Developing Applications Using the Split Development Directory Structure in Developing WebLogic Server Applications.

 

CertGen

The CertGen utility generates certificates that should only be used for demonstration or testing purposes and not in a production environment.

 

Syntax

$ java utils.CertGen password certfile keyfile [export]

Argument

Definition

password Defines the password for the private key.
certfile Defines the location and filename for the generated certificate file.
keyfile Defines the location and filename for the generated private key file.
export By default, the CertGen utility generates domestic strength certificates. Specify the [export] option if you want the tool to generate export strength certificates.

 

Example

To generate a certificate:

  1. Copy the following files to the directory in which you run the CertGen tool:

    • $WL_HOME/server/lib\CertGenCA.der - The certificate for a certificate authority trusted by WebLogic Server.
    • $WL_HOME/server/lib\CertGenCAKey.der - The private key for a certificate authority trusted by WebLogic Server.
  2. Enter the following command to generate certificate files named testcert with private key files named testkey:
$ java utils.CertGen mykeypass testcert testkey



Creating Domestic Key Strength - 1024
Encoding



................................................................
................................................................
................................................................
Created Private Key files - testkey.der and testkey.pem
Encoding
................................................................
................................................................
................................................................
Created Certificate files - testcert.der and testcert.pem
................................................................

 

ClientDeployer

Use weblogic.ClientDeployer to extract the client-side JAR file from a J2EE EAR file, creating a deployable JAR file. The weblogic.ClientDeployer class is executed on the Java command line with the following syntax:

java weblogic.ClientDeployer ear-file client

The ear-file argument is an expanded directory (or Java archive file with a .ear extension) that contains one or more client application JAR files.

For example:

java weblogic.ClientDeployer app.ear myclient

where app.ear is the EAR file that contains a J2EE client packaged in myclient.jar.

Once the client-side JAR file is extracted from the EAR file, use the weblogic.j2eeclient.Main utility to bootstrap the client-side application and point it to a WebLogic Server instance as follows:

java weblogic.j2eeclient.Main clientjar URL [application args]

For example

java weblogic.j2eeclient.Main helloWorld.jar t3://localhost:7001 Greetings

 

clientgen

Use clientgen to generate a client JAR file. See Running the clientgen Ant Task in Programming WebLogic Web Services.

 

Conversion

If you have used a pre-6.0 version of WebLogic Server, convert your weblogic.properties files. Instructions for converting your files using a conversion script are available in the Administration Console Online Help section called "Conversion."

 

der2pem

The der2pem utility converts an X509 certificate from DER format to PEM format. The .pem file is written in the same directory and has the same filename as the source .der file.

 

Syntax

$ java utils.der2pem derFile [headerFile] [footerFile]

Argument

Description

derFile The name of the file to convert. The filename must end with a .der extension, and must contain a valid certificate in .der format.
headerFile The header to place in the PEM file. The default header is "-----BEGIN CERTIFICATE-----". Use a header file if the DER file being converted is a private key file, and create the header file containing one of the following:

  • -----BEGIN RSA PRIVATE KEY-----" for an unencrypted private key.

  • -----BEGIN ENCRYPTED PRIVATE KEY-----" for an encrypted private key.

Note: There must be a new line at the end of the header line in the file.

footerFile The header to place in the PEM file. The default header is "-----END CERTIFICATE-----". Use a footer file if the DER file being converted is a private key file, and create the footer file containing one of the following in the header:

  • -----END RSA PRIVATE KEY-----" for an unencrypted private key.

  • -----END ENCRYPTED PRIVATE KEY-----" for an encrypted private key.

Note: There must be a new line at the end of the header line in the file.


 

Example

$ java utils.der2pem graceland_org.der



Decoding
................................................................

 

dbping

The dbping command-line utility tests the connection between a DBMS and your client machine via a JDBC driver. You must complete the installation of the driver before attempting to use this utility. For more information on how to install a driver, see the documentation from your driver vendor. Also see Setting the Environment for a Type-4 Third-Party JDBC Driver in Programming WebLogic JDBC.

 

Creating a DB2 Package with dbping

With the WebLogic Type 4 JDBC Driver for DB2, you can also use the dbping utility to create a package on the DB2 server. When you ping the database with the dbping utility, the driver automatically creates the default package on the database server if it does not already exist. If the default package already exists on the database server, the dbping utility uses the existing package.

The default DB2 package includes 200 dynamic sections. You can specify a different number of dynamic sections to create in the DB2 package with the -d option. The -d option also sets CreateDefaultPackage=true and ReplacePackage=true on the connection used in the connection test, which forces the DB2 driver to replace the DB2 package on the DB2 server. (See DB2 Connection Properties for more information.) You can use the -d option with dynamic sections set at 200 to forcibly recreate a default package on the DB2 server.

Notes: When you specify the -d option, the dbping utility recreates the default package and uses the value you specify for the number of dynamic sections. It does not modify the existing package.

To create a DB2 package, the user that you specify must have CREATE PACKAGE privileges on the database.

 

Syntax

$ java utils.dbping DBMS [-d dynamicSections] user password DB

Argument

Definition

DBMS Varies by DBMS and JDBC driver:DB2B - WebLogic Type 4 JDBC Driver for DB2JCONN2 - Sybase JConnect 5.5 (JDBC 2.0) driverJCONNECT - Sybase JConnect driverINFORMIXB - WebLogic Type 4 JDBC Driver for InformixMSSQLSERVER4 - WebLogic jDriver for Microsoft SQL ServerMSSQLSERVERB - WebLogic Type 4 JDBC Driver for Microsoft SQL ServerORACLE - WebLogic jDriver for OracleORACLEB - WebLogic Type 4 JDBC Driver for OracleORACLE_THIN - Oracle Thin DriverPOINTBASE - PointBase Universal DriverSYBASEB - WebLogic Type 4 JDBC Driver for Sybase
[-d dynamicSections] Specifies the number of dynamic sections to create in the DB2 package. This option is for use with the WebLogic Type 4 JDBC Driver for DB2 only.If the -d option is specified, the driver automatically sets CreateDefaultPackage=true and ReplacePackage=true on the connection and creates a DB2 package with the number of dynamic sections specified.
user Valid database username for login. Use the same values you use with isql, sqlplus, or other SQL command-line tools.For DB2 with the -d option, the user must have CREATE PACKAGE privileges on the database.
password Valid database password for the user. Use the same values you use with isql or sqlplus.
DB Name and location of the database. Use the following format, depending on which JDBC driver you use:DB2B - Host:Port/DBNameJCONN2 - Host:Port/DBNameJCONNECT - Host:Port/DBNameINFORMIXB - Host:Port/DBName/InformixServerMSSQLSERVER4 - Host:Port/DBName or [DBName@]Host[:Port]MSSQLSERVERB - Host:Port/DBNameORACLE - DBName (as listed in tnsnames.ora)ORACLEB - Host:Port/DBNameORACLE_THIN - Host:Port/DBNamePOINTBASE - Host[:Port]/DBName SYBASEB - Host:Port/DBName
Where:

  • Host is the name of the machine hosting the DBMS,

  • Port is port on the database host where the DBMS is listening for connections, and

  • DBName is the name of a database on the DBMS.

  • InformixServer is an Informix-specific environment variable that identifies the Informix DBMS server.

 

Example

C:\>java utils.dbping ORACLE_THIN scott tiger dbserver1:1561:demo



**** Success!!! ****

You can connect to the database in your app using:

java.util.Properties props = new java.util.Properties();
  props.put("user", "scott");
  props.put("password", "tiger");
  props.put("dll", "ocijdbc9");
  props.put("protocol", "thin");
  java.sql.Driver d =
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
  java.sql.Connection conn =
    Driver.connect("jdbc:oracle:thin:@dbserver1:1561:demo", props);

 

ddcreate

This Ant task calls EARInit, which generates an application.xml and a weblogic-application.xml file for an EAR. For more information, see EarInit.

 

DDInit

DDInit is a utility for generating deployment descriptors for applications to be deployed on WebLogic Server. Target a module's archive or folder and DDInit uses information from the module's class files to create appropriate deployment descriptor files.

WebLogic Builder, the graphical user interface for generating and editing deployment descriptors, runs DDInit to generate deployment descriptors. See WebLogic Builder for more information.

In its command-line version, unlike in WebLogic Builder, DDInit writes new files that overwrite existing descriptor files. If META-INF (for EAR or EJB), or WEB-INF (for Web Applications), does not exist, DDInit creates it.

Specify the type of J2EE deployable for which you want deployment descriptors generated by using the DDInit command specific to the type, as described below.

 

EJBInit

Target a JAR file or a folder containing files that you intend to archive as a JAR file, and EJBInit will generate the ejb-jar.xml and the weblogic-ejb-jar.xml files for the module.

java weblogic.marathon.ddinit.EJBInit <module>

EJBInit looks in folders under the target and finds EJBs (bean class, local or remote home, remote or local interface). Matches interfaces with beans, and determines from that match which home belongs to which bean. In the bean itself it looks for CMP fields. then for relationships between entity beans. From information gathered in this way, EJBInit writes the deployment descriptors.

DDInit supports EJB 2.0. DDInit will provide accurate results for session beans from 1.1, but is not likely to work for EJB 1.1 entity beans.

 

WebInit

Target a WAR file or a folder containing files that you intend to archive as a WAR file, and WebInit will create web.xml and weblogic.xml files for the module.

java weblogic.marathon.ddinit.WebInit <module>

 

EarInit

Generate an application.xml and a weblogic-application.xml file for an EAR using this command. Target an existing EAR or a folder containing JAR or WAR files you intend to archive into an EAR file.

java weblogic.marathon.ddinit.EarInit <module>

In WebLogic Builder, EarInit looks recursively at the entire tree under the targeted module. On the command line, you need to already have descriptors for the modules contained in the EAR. application.xml will account for the modules. The generated weblogic-application.xml will be an empty placeholder.

 

Limitations

  • Generated XML representations of relations among entity beans are only accurate for one-to-one relations. For entity beans that already have descriptors, Builder does not refresh relations that have a "many" side.
  • Support for generating descriptors for EJB 1.1 beans is not guaranteed; focus is on EJB 2.0

 

Example

This output from this example describes building deployment descriptor files for ejb_st.jar.

D:\dev\smarticket5\smarticket\bin>java weblogic.marathon.ddinit.EJBInit ejb_st.jar

Found 4 classes that implement the EnterpriseBean interface

Discovered module type for D:\dev\smarticket5\smarticket\bin\ejb_st.jar

Found EJB components. Initializing descriptors

Creating desc for bean com.sun.j2ee.blueprints.smarticket.ejb.customer.CustomerEJB

*** found remote home: com.sun.j2ee.blueprints.smarticket.ejb.customer.CustomerHome

*** found remote interface: com.sun.j2ee.blueprints.smarticket.ejb.customer.Customer

Setting prim-key-class to 'java.lang.String'

Adding Entity bean 'CustomerEJB'

Creating desc for bean com.sun.j2ee.blueprints.smarticket.ejb.localeinfo.LocaleInfoEJB

*** found remote home: com.sun.j2ee.blueprints.smarticket.ejb.localeinfo.LocaleInfoHome

*** found remote interface: com.sun.j2ee.blueprints.smarticket.ejb.localeinfo.LocaleInfo

LocaleInfoEJB is a Stateless Session bean

Adding Session bean 'LocaleInfoEJB'

Creating desc for bean com.sun.j2ee.blueprints.smarticket.ejb.movieinfo.MovieInfoEJB

*** found remote home: com.sun.j2ee.blueprints.smarticket.ejb.movieinfo.MovieInfoHome

*** found remote interface: com.sun.j2ee.blueprints.smarticket.ejb.movieinfo.MovieInfo

MovieInfoEJB is a Stateless Session bean

Adding Session bean 'MovieInfoEJB'

Creating desc for bean com.sun.j2ee.blueprints.smarticket.ejb.ticketsales.TicketSalesEJB

*** found remote home: com.sun.j2ee.blueprints.smarticket.ejb.ticketsales.TicketSalesHome

*** found remote interface: com.sun.j2ee.blueprints.smarticket.ejb.ticketsales.TicketSales

TicketSalesEJB is a Stateful Session bean

Adding Session bean 'TicketSalesEJB'

Writing descriptors

Building module with newly created descriptors

Finished building module

 

Deployer

Using the Deployer>weblogic.Deployer tool, you can deploy J2EE applications and components to WebLogic Servers in a command-line or scripting environment. For detailed information on using this tool, see weblogic.Deployer Utility

The weblogic.Deployer utility replaces the weblogic.deploy utility, which has been deprecated.

 

ejbc

Deprecated. See ejbc in Programming Weblogic Server Enterprise JavaBeans.

 

EJBGen

EJBGen is an Enterprise JavaBeans 2.0 code generator. You can annotate your Bean class file with javadoc tags and then use EJBGen to generate the Remote and Home classes and the deployment descriptor files for an EJB application, reducing to one the number of EJB files you need to edit and maintain.

See EJBGen Reference in Programming WebLogic Server Enterprise JavaBeans.

 

getProperty

The getProperty utility gives you details about your Java setup and your system. It takes no arguments.

 

Syntax

$ java utils.getProperty

 

Example

$ java utils.getProperty



-- listing properties --
user.language=en
java.home=c:\java11\bin\..
awt.toolkit=sun.awt.windows.WToolkit
file.encoding.pkg=sun.io
java.version=1.1_Final
file.separator=\
line.separator=
user.region=US
file.encoding=8859_1
java.vendor=Sun Microsystems Inc.
user.timezone=PST
user.name=mary
os.arch=x86
os.name=Windows NT
java.vendor.url=http://www.sun.com/
user.dir=C:\weblogic
java.class.path=c:\weblogic\classes;c:\java\lib\cla...
java.class.version=45.3
os.version=4.0
path.separator=;
user.home=C:\

 

host2ior

The host2ior utility obtains the Interoperable Object Reference (IOR) of a WebLogic Server.

 

Syntax

$ java utils.host2ior hostname port

 

ImportPrivateKey

The ImportPrivateKey utility is used to load a private key into a private keystore file.

 

Syntax

$ java utils.ImportPrivateKey keystore keystorepass alias keypass certfile keyfile

Argument

Definition

keystore Defines the name of the keystore file. A new keystore is created if one does not exist.
keystorepass Defines the password to open the keystore file.
alias Defines the name that is used to look up certificates and keys in the keystore.
keypass Defines the password used to unlock the private key file and to protect the private key in the keystore.
certfile The name of the certificate associated with the private key.
keyfile The name of the file holding the protected private key.

 

Example

Use the following steps to:

  • Generate a certificate and private key using the CertGen utility
  • Create a keystore and store a private key using the ImportPrivateKey utility

To generate a certificate:

  1. Copy the following files to the directory in which you run the CertGen tool:

    • $WL_HOME/server/lib\CertGenCA.der - The certificate for a certificate authority trusted by WebLogic Server.
    • $WL_HOME/server/lib\CertGenCAKey.der - The private key for a certificate authority trusted by WebLogic Server.
  2. Enter the following command to generate certificate files named testcert with private key files named testkey:
$ java utils.CertGen mykeypass testcert testkey



Creating Domestic Key Strength - 1024
Encoding



................................................................
................................................................
................................................................
Created Private Key files - testkey.der and testkey.pem
Encoding
................................................................
................................................................
................................................................
Created Certificate files - testcert.der and testcert.pem
................................................................
  1. Convert the certificate from DER format to PEM format.
D:\bea2\weblogic700\samples\server\src>java utils.der2pem CertGenCA.der



Encoding
................................................................
................................................................
  1. Concatenate the certificate and the Certificate Authority (CA).
D:\bea2\weblogic700\samples\server\src>type testcert.pem CertGenCA.pem >> newcerts.pem



  1. Create a new keystore named mykeystore and load the private key located in the testkey.pem file.
D:\bea2\weblogic700\samples\server\src>java utils.ImportPrivateKey



mykeystore mypasswd mykey mykeypass newcerts.pem testkey.pem
Keystore file not found, creating it

 

jhtml2jsp

Converts JHTML files to JSP files. Be sure to inspect results carefully. Given the unpredictability of the JHTML code, jhtml2jsp will not necessarily produce flawless translations.

Output is a new JSP file named after the original file.

The HTTP servlets auto-generated from JSP pages differ from the regular HTTP servlets generated from JHTML. JSP servlets extend weblogic.servlet.jsp.JspBase, and so do not have access to the methods available to a regular HTTP servlet.

If your JHTML pages may reference these methods to access the servlet 'context' or 'config' objects, you will need to substitute these methods with the reserved words in JSP that represent these implicit objects.

If your JHTML uses variables that have the same name as the reserved words in JSP, the tool will output a warning. You will need to edit your Java code in the generated JSP page to change the variable name to something other than a reserved word.

 

Syntax

$ java weblogic.utils.jhtml2jsp -d <directory> filename.jhtml

or

$ java weblogic.utils.jhtml2jsp filename.jhtml

Argument

Definition

-d Specify the target directory. If target directory isn't specified, output is written to current directory.

 

jspc

Deprecated JSP-specific compiler task. Use appc.

 

logToZip

The logToZip utility searches an HTTP server log file, finds the Java classes loaded into it by the server, and creates an uncompressed .zip file that contains those Java classes. It is executed from the document root directory of your HTTP server.

To use this utility, have access to the log files created by the HTTP server.

 

Syntax

$ java utils.logToZip logfile codebase zipfile

Argument

Definition

logfile Required. Fully-qualified pathname of the log file.
codebase Required. Code base for the applet, or "" if there is no code base. By concatenating the code base with the full package name of the applet, you get the full pathname of the applet (relative to the HTTP document root).
zipfile Required. Name of the .zip file to create. The resulting .zip file is created in the directory in which you run the program. The pathname for the specified file can be relative or absolute. In the examples shown below, a relative pathname is given, so the .zip file is created in the current directory.

 

Examples

The following example shows how a .zip file is created for an applet that resides in the document root itself, that is, with no code base:

$ cd /HTTP/Serv/docs



$ java utils.logToZip /HTTP/Serv/logs/access "" app2.zip

The following example shows how a .zip file is created for an applet that resides in a subdirectory of the document root:

C:\>cd \HTTP\Serv



C:\HTTP\Serv>java utils.logToZip \logs\applets\classes app3.zip

 

MBean Commands

Use the MBean commands (CREATE, DELETE, GET, INVOKE, QUERY, and SET) to administer MBeans. See Commands for Managing WebLogic Server MBeans in weblogic.Admin Command-Line Reference.

 

MulticastTest

The MulticastTest utility helps you debug multicast problems when configuring a WebLogic Cluster. The utility sends out multicast packets and returns information about how effectively multicast is working on your network. Specifically, MulticastTest displays the following types of information via standard output:

  1. A confirmation and sequence ID for each message sent out by the current server.
  2. The sequence and sender ID of each message received from any clustered server, including the current server.
  3. A missed-sequenced warning when a message is received out of sequence.
  4. A missed-message warning when an expected message is not received.

To use MulticastTest, start one copy of the utility on each node on which you want to test multicast traffic.

Warning: Do NOT run the MulticastTest utility by specifying the same multicast address (the -a parameter) as that of a currently running WebLogic Cluster. The utility is intended to verify that multicast is functioning properly before starting your clustered WebLogic Servers.

For information about setting up multicast, see the configuration documentation for the operating system/hardware of the WebLogic Server host machine. For more information about configuring a cluster, see Using WebLogic Server Clusters.

 

Syntax

$ java utils.MulticastTest -n name -a address [-p portnumber]


 [-t timeout] [-s send]

Argument

Definition

-n name Required. A name that identifies the sender of the sequenced messages. Use a different name for each test process you start.
-a address The multicast address on which: (a) the sequenced messages should be broadcast; and (b) the servers in the clusters are communicating with each other. (The default is 237.0.0.1.)
-p portnumber Optional. The multicast port on which all the servers in the cluster are communicating. (The multicast port is the same as the listen port set for WebLogic Server, which defaults to 7001 if unset.)
-t timeout Optional. Idle timeout, in seconds, if no multicast messages are received. If unset, the default is 600 seconds (10 minutes). If a timeout is exceeded, a positive confirmation of the timeout is sent to stdout.
-s send Optional. Interval, in seconds, between sends. If unset, the default is 2 seconds. A positive confirmation of each message sent out is sent to stdout.

 

Example

$ java utils.MulticastTest -N server100 -A 237.155.155.1



Set up to send and receive on Multicast on Address 237.155.155.1 on port 7001
Will send a sequenced message under the name server100 every 2 seconds.
Received message 506 from server100
Received message 533 from server200 I (server100) sent message num 507
Received message 507 from server100
Received message 534 from server200 I (server100) sent message num 508
Received message 508 from server100
Received message 535 from server200 I (server100) sent message num 509
Received message 509 from server100
Received message 536 from server200 I (server100) sent message num 510
Received message 510 from server100
Received message 537 from server200 I (server100) sent message num 511
Received message 511 from server100
Received message 538 from server200 I (server100) sent message num 512
Received message 512 from server100
Received message 539 from server200 I (server100) sent message num 513
Received message 513 from server100

 

myip

The myip utility returns the IP address of the host.

 

Syntax

$ java utils.myip

 

Example

$ java utils.myip



Host toyboat.toybox.com is assigned IP address: 192.0.0.1

 

pem2der

The pem2der utility converts an X509 certificate from PEM format to DER format. The .der file is written in the same directory as the source .pem file.

 

Syntax

$ java utils.pem2der pemFile

Argument

Description

pemFile The name of the file to be converted. The filename must end with a .pem extension, and it must contain a valid certificate in .pem format.

 

Example

$ java utils.pem2der graceland_org.pem



Decoding
................................................................
................................................................
................................................................
................................................................
................................................................

 

pointbase

PointBase is bundled with WebLogic Server as a sample database. Its documentation is also included at WL_HOME\common\eval\pointbase\docs, where WL_HOME is the WebLogic Server installation directory.

The PointBase documentation is also on the PointBase site, at http://www.pointbase.com/support/docs/overview.html.

 

rmic

The WebLogic RMI compiler is a command-line utility for generating and compiling remote objects. Use weblogic.rmic to generate dynamic proxies on the client-side for custom remote object interfaces in your application, and to provide hot code generation for server-side objects. See WebLogic RMI Compiler in Programming WebLogic RMI.

 

Schema

The Schema utility lets you upload SQL statements to a database using the WebLogic JDBC drivers. For additional information about database connections, see Programming WebLogic JDBC.

 

Syntax

$ java utils.Schema driverURL driverClass [-u username]


 [-p password] [-verbose] SQLfile

Argument

Definition

driverURL Required. URL for the JDBC driver.
driverClass Required. Pathname of the JDBC driver class.
-u username Optional. Valid username.
-p password Optional. Valid password for the user.
-verbose Optional. Prints SQL statements and database messages.
SQLfile Required. Text file with SQL statements.

 

Example

The following code shows a Schema command line for the examples.utils package:

$ java utils.Schema



jdbc:pointbase:server://localhost/demo"
com.pointbase.jdbc.jdbcUniversalDriver" -u "examples"
-p "examples" examples/utils/ddl/demo.ddl
utils.Schema will use these parameters:
url: jdbc:pointbase:server://localhost/demo



driver: com.pointbase.jdbc.jdbcUniversalDriver
dbserver: null
user: examples
password: examples
SQL file: examples/utils/ddl/demo.ddl

 

servicegen

The servicegen Ant task takes as input an EJB JAR file or a list of Java classes, and creates all the needed Web Service components and packages them into a deployable EAR file. See servicegen in Programming WebLogic Web Services.

 

SearchAndBuild

This Ant task executes build.xml files that are included within the FileSet. The task assumes that all of the files defined in FileSet are valid build files, and executes the Ant task of each of them.

Make certain that your FileSet filtering is correct. If you include the build.xml file that SearchAndBuildTask is being called from, you will be stuck in an infinite loop as this task will execute the top level build file - itself - forever. See FileSet.

 

Example

<project name="all_modules" default="all" basedir=".">

<taskdef name="buildAll" classname="weblogic.ant.taskdefs.build.SearchAndBuildTask"/>

<target name="all">

<buildAll>

<fileset dir="${basedir}">

<include name="**\build.xml"/>

<exclude name="build.xml"/>

</fileset>

</buildAll>

</target>

</project>

 

showLicenses

The showLicenses utility displays license information about BEA products installed in this machine.

 

Syntax

$ java -Dbea.home=license_location utils.showLicenses

Argument

Description

license_location The fully qualified name of the directory where the license.bea file exists.

 

Example

$ java -Dbea.home=d:\bea utils.showLicense

 

source2wsdd

Generates a web-services.xml deployment descriptor file from the Java source file for a Java class-implemented WebLogic Web Service. For complete documentation of this Ant task, see Running the source2wsdd Ant Task in Programming WebLogic Web Services.

 

system

The system utility displays basic information about your computer's operating environment, including the manufacturer and version of your JDK, your CLASSPATH, and details about your operating system.

 

Syntax

$ java utils.system

 

Example

$ java utils.system



* * * * * * * java.version * * * * * * *
1.1.6

* * * * * * * java.vendor * * * * * * *
Sun Microsystems Inc.

* * * * * * * java.class.path * * * * * * *
\java\lib\classes.zip;\weblogic\classes;
\weblogic\lib\weblogicaux.jar;\weblogic\license
...

* * * * * * * os.name * * * * * * *
Windows NT

* * * * * * * os.arch * * * * * * *
x86

* * * * * * * os.version * * * * * * *
4.0

 

ValidateCertChain

WebLogic Server provides the ValidateCertChain utility to check whether or not an existing certificate chain will be rejected by WebLogic Server. The utility uses certificate chains from PEM files, PKCS-12 files, PKCS-12 keystores, and JKS keystores. A complete certificate chain must be used with the utility. The following is the syntax for the ValidateCertChain utility:

java utils.ValidateCertChain -file pemcertificatefilenamejava utils.ValidateCertChain -pem pemcertificatefilenamejava utils.ValidateCertChain -pkcs12store pkcs12storefilenamejava utils.ValidateCertChain -pkcs12file pkcs12filename passwordjava utils.ValidateCertChain -jks alias storefilename [storePass]

Example of valid certificate chain:

java utils.ValidateCertChain -pem zippychain.pemCert[0]: CN=zippy,OU=FOR TESTINGONLY,O=MyOrganization,L=MyTown,ST=MyState,C=USCert[1]: CN=CertGenCAB,OU=FOR TESTINGONLY,O=MyOrganization,L=MyTown,ST=MyState,C=US

Certificate chain appears valid

Example of invalid certificate chain:

java utils.ValidateCertChain -jks mykey mykeystoreCert[0]: CN=corba1,OU=FOR TESTING ONLY, O=MyOrganization,L=MyTown,ST=MyState,C=US

CA cert not marked with critical BasicConstraint indicating it is a CACert[1]: CN=CACERT,OU=FOR TESTING ONLY, O=MyOrganization,L=MyTown,ST=MyState,C=USCertificate chain is invalid

 

verboseToZip

When executed from the document root directory of your HTTP server, verboseToZip takes the standard output from a Java application run in verbose mode, finds the Java classes referenced, and creates an uncompressed.zip file that contains those Java classes.

 

Syntax

$ java utils.verboseToZip inputFile zipFileToCreate

Argument

Definition

inputFile Required. Temporary file that contains the output of the application running in verbose mode.
zipFileToCreate Required. Name of the .zip file to be created. The resulting .zip file is be created in the directory in which you run the program.

 

Example

$ java -verbose myapplication > & classList.tmp



$ java utils.verboseToZip classList.tmp app2.zip

 

wlappc

This utility compiles and validates a J2EE EAR file, an EJB JAR file or a WAR file for deployment.

For more information, seeappc".

 

wlcompile

Use the wlcompile Ant task to invoke the javac compiler to compile your application's Java files in a split development directory structure. See Developing Applications Using the Split Development Directory Structure in Developing WebLogic Server Applications.

 

wlconfig

The wlconfig Ant task enables you to configure a WebLogic Server domain by creating, querying, or modifying configuration MBeans on a running Administration Server instance. For complete documentation on this Ant task, see Configuring a WebLogic Server Domain Using the wlconfig Ant Task in the WebLogic Server Command Reference.

 

wldeploy

The wldeploy Ant task enables you to perform Deployer functions using attributes specified in an Ant task. See wldeploy Ant Task in Deployment Tools Reference.

 

wlpackage

Use the wlpackage Ant task to package your split development directory application as a traditional EAR file that can be deployed to WebLogic Server. See Developing Applications Using the Split Development Directory Structure in Developing WebLogic Server Applications.

 

wlserver

The wlserver Ant task enables you to start, reboot, shutdown, or connect to a WebLogic Server instance. The server instance may already exist in a configured WebLogic Server domain, or you can create a new single-server domain for development by using the generateconfig=true attribute. For complete documentation on this Ant task, see Starting Servers and Creating Domains Using the wlserver Ant Task in the WebLogic Server Command Reference.

 

writeLicense

The writeLicense utility writes information about all your WebLogic licenses in a file called writeLicense.txt, located in the current directory. This file can then be emailed, for example, to WebLogic technical support.

 

Syntax

$ java utils.writeLicense -nowrite -Dbea.home=path

Argument

Definition

-nowrite Required. Sends the output to stdout instead of writeLicense.txt.
-Dbea.home Required. Sets WebLogic system home (the root directory of your WebLogic Server installation).

 

Examples

$ java utils.writeLicense -nowrite

 

Example of Unix Output

* * * * * * System properties * * * * * *




* * * * * * * java.version * * * * * * *
1.1.7

* * * * * * * java.vendor * * * * * * *
Sun Microsystems Inc.

* * * * * * * java.class.path * * * * * * *
c:\weblogic\classes;c:\weblogic\lib\weblogicaux.jar;
c:\java117\lib\classes.zip;c:\weblogic\license
...

 

Example of Windows NT Output

* * * * * * * os.name * * * * * * * 



Windows NT

* * * * * * * os.arch * * * * * * *
x86

* * * * * * * os.version * * * * * * *
4.0

* * * * * * IP * * * * * *
Host myserver is assigned IP address: 192.1.1.0

* * * * * * Location of WebLogic license files * * * * * *
No WebLogicLicense.class found

No license.bea license found in
weblogic.system.home or current directory

Found in the classpath: c:/weblogic/license/license.bea
Last Modified: 06/02/1999 at 12:32:12

* * * * * * Valid license keys * * * * * *
Contents:
Product Name : WebLogic
IP Address : 192.1.1.0-255
Expiration Date: never
Units : unlimited
key : b2fcf3a8b8d6839d4a252b1781513b9
...

* * * * * * All license keys * * * * * *
Contents:
Product Name : WebLogic
IP Address : 192.1.1.0-255
Expiration Date: never
Units : unlimited
key : b2fcf3a8b8d6839d4a252b1781513b9
...

* * * * * * WebLogic version * * * * * *
WebLogic Build: 4.0.x xx/xx/1999 10:34:35 #xxxxx

 

wsdl2Service

The wsdl2Service Ant task is a Web Services tool that takes as input an existing WSDL file and generates the Java interface that represents the implementation of your Web Service and the web-services.xml file that describes the Web Service. See wsdl2Service in Programming WebLogic Web Services.

 

wsdlgen

The wsdlgen Ant task is a Web Services tool that generates a WSDL file from the EAR and WAR files that implement your Web Service. See wsdlgen in Programming WebLogic Web Services.

 

wspackage

Use the Web Services wspackage Ant task to package the various components of a WebLogic Web Service into a new deployable EAR file and add extra components to an already existing EAR file. See wspackage in Programming WebLogic Web Services.

Skip navigation bar  Back to Top Previous Next