BEA Logo BEA WebLogic Server Release 5.0

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

Using the WebLogic utilities

Contents
AppletArchiver
dbping
eventsnoop
eventviewer
getProperty
licenseConverter
logToZip
MulticastTest
myip
pem2der
registerLog
Schema
showLicenses
system
t3dbping
verboseToZip
version
writeLicense

WebLogic's developer utilities

WebLogic includes several Java utility programs to make installation and configuration easier, and to offer handy services. These programs are enumerated here. Some of the utility programs are covered in more detail in separate Administrator Guides, as noted.

To use these utilities you must correctly set your classpath.

AppletArchiver

The appletWhat's an applet? archiver utility runs an applet in a separate frame, remembers all of the downloaded classes and resources used by the applet, and packages these into either a .jar or a .cab file. (The cabarch tool is available from Microsoft.)

More details are available in:

Using the applet archiver to create a .jar or .cab archive

Syntax

 $ java utils.applet.archiver.AppletArchiver URL archive

Arguments

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

Examples

See Using the applet archiver to create a .jar or .cab archive for more information and examples.

Top of the page

dbping

The dbping command-line utility tests the connection between a DBMS and your client machine, via a two-tier WebLogic jDriver.

More details are available in:

Testing connections

Syntax

 $ java utils.dbping DBMS user password DB

Arguments

DBMS
Use: MSSQLSERVER4, ORACLE, or INFORMIX4
user
Valid username for login. Use the same values you use with isql or sqlplus.
password
Valid password for the user. Use the same values you use with isql or sqlplus.
DB
Name of the database. Use the same values you use with isql or sqlplus.

Examples

See the examples for each specific database in Testing connections.

Top of the page

eventsnoop

You must have a WebLogic Server running to use the eventsnoop utility, which registers you as a T3Client with an interest in some specified events, and then returns information about the events to stdout.

Syntax

  $ java utils.eventsnoop WebLogicURL topiclist

Arguments

WebLogicURL
URL for the WebLogic Server.
topiclist
A fully-qualified event topic in the WebLogic Server Topic Tree.

Examples

 $ java utils.eventsnoop t3://localhost:7001 WEBLOGIC.TIME WEBLOGIC.LOG

Top of the page

eventviewer

The eventviewer is a GUI interface that, like eventsnoop, registers interest in some specified events, and then returns information about the events. You must have a WebLogic Server running to use this utility.

Syntax

  $ java utils.eventviewer WebLogicURL

Arguments

WebLogicURL
URL of the WebLogic Server.

Examples

  $ java utils.eventviewer t3://localhost:7001

Top of the page

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:\

Top of the page

licenseConverter

Beginning with release 4.0, the default format for WebLogic licenses has changed from a class file that needed to be compiled to a new XMLWhat's XML? format. Although both the older-style class files and the new XML-format license files can still be used, some users may wish to convert their existing licenses to the newer format.

The licenseConverter utility searches through your CLASSPATHWhat's a CLASSPATH?, the WebLogic homeWhat's a WebLogic home? directory, and the current directory and converts the first old-style class license file it finds into the newer XML-format license. The new XML-format file will be named WebLogicLicense.xml. If you already have a WebLogicLicense.xml file in one of those locations, the utility will display a message and quit.

For information on where to place the converted file, see Location of the license files . For more information about WebLogic licenses see Installing a WebLogic license.

Syntax

 $ java utils.licenseConverter

Arguments

-h
Displays instructions for using this utility.

-w path
Directory where the converted XML-format file (WebLogicLicense.xml) will be written. If path is omitted, the file will be written to the current directory. If -w is not used, the XML-format license file will be written to STDOUT.

Example

 $ java utils.licenseConverter -w c:\weblogic 
(Writes the WebLogicLicense.xml file to the c:\weblogic directory.)

Top of the page

logToZip

This utility takes the contents of an HTTP server log file in (common log format), finds the Java classes loaded by the server in it, and creates an uncompressed .zip file that contains those Java classes.

More details are available in:

Creating a .zip file for an applet

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

Syntax

From the document root directory of your HTTP server:
 $ java utils.logToZip logfile codebase zipfile

Arguments

logfile
Fully-qualified pathname of the log file.
codebase
CODEBASE for the applet, or "" if there is no CODEBASE. When the CODEBASE is concatenated with the full package name of the applet, it should describe the directory path to the applet from the HTTP document root. If you need more help on CODEBASE, check the Administrators Guide document, Using WebLogic for applet programming.
zipfile
Name of the .zip file to create. The resulting .zip file will be created in the directory in which you run the program. The path of the filename supplied can be relative or absolute. In the examples, a relative pathname is given, so the .zip file is created in the current directory.

Examples

This example shows the creation of a zipfile for an applet that exists in the document root itself (i.e., no CODEBASE).

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

This example shows the creation of a zipfile for an applet that exists in a subdirectory of the document root.

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

Top of the page

MulticastTest

The MulticastTest helps you debug multicast problems when configuring a WebLogic Cluster. The utility sends out multicast packets and returns information about how multicast is working on your network.

To use MulticastTest, start one copy of the utility on each node where you want to test multicast traffic. You should NOT run The MulticastTest utility 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 prior to starting your clustered WebLogic Servers.

For information on setting up multicast, you should consult the configuration documentation for the specific operating system/hardware of the WebLogic host. For more information on configuring a cluster, read the Administrators Guide document, Setting up a WebLogic Cluster.

Syntax

 $ java utils.MulticastTest -n server100 -a 237.155.155.1
-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
(Required) The multicast address on which the sequenced messages should be broadcast, and which is the multicast address on which the servers in the clusters are communicating with each other. (The default for any cluster for which multicast address isn't set is 237.0.0.1).
-p port number
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 the WebLogic Server, which defaults to 7001 if unset.)
-t timeout in seconds
Idle timeout if no multicast messages are received. The default if unset is 600 (10 minutes). If a timeout is exceeded, a positive confirmation of the timeout is printed to standard out.
-s send interval in seconds
Interval between sends. The default if unset is 2 seconds. A positive confirmation of each message sent out is printed to standard out.

Information about the following statuses are printed to standard out:

  1. A confirmation and sequence ID of each message that this server sends out.
  2. The sequence and sender ID of each message received from any clustered server, including this server.
  3. A missed-sequenced warning when a message is received, but out of sequence.
  4. A missed-message warning when a message is expected but not received.

Examples

 $ 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

Top of the page

myip

The myip utility returns the IP address of this host.

More details are available in:

How to determine your IP address

Syntax

 $ java utils.myip

Examples

 $ java utils.myip
Host toyboat.toybox.com is assigned IP address: 192.0.0.1

Top of the page

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

Arguments

pemFile
The name of the file to convert. The file name must end with a .pem extension and must contain a valid certificate in .pem format.

Examples

 $ java utils.pem2der graceland_org.pem
Decoding
....................................................................
....................................................................
....................................................................
....................................................................
...........................................

Top of the page

registerLog

The registerLog program allows you to register an interest in a topic and writes a message to the logfile that reflects your registration. You must have a WebLogic Server running to use this program.

Syntax

  $ java utils.registerLog WebLogicURL topic

Arguments

WebLogicURL
URL of the WebLogic Server.
topic
Topic of interest for this registration.

Examples

 $ java utils.registerLog t3://localhost:7001 STOCKS
STOCKS
Registration ID is 24

Top of the page

Schema

The Schema utility lets you upload SQL statements to a database using the WebLogic JDBC drivers. For additional information on database connections, see the Developers Guide Using WebLogic JDBC.

Syntax

 $ java utils.Schema driverURL driverClass -u user -p pswd -verbose SQLfile

Arguments

driverURL
(Required) JDBC driver URL.
driverClass
(Required) JDBC driver class pathname.
-u user
Valid username for login.
-p pswd
Valid password for the user.
-verbose
Prints SQL statements and database messages.
SQLfile
(Required) Text file with SQL statements.

Example

To be entered on a single line:
 $ java utils.Schema jdbc:cloudscape:demo;create=true
      COM.cloudscape.core.JDBCDriver
      -verbose examples/utils/ddl/demo.ddl
A sample of a .ddl file:
    DROP TABLE ejbAccounts;
    CREATE TABLE ejbAccounts
      (id   varchar(15),
       bal  float, 
       type varchar(15));
    DROP TABLE idGenerator;
    CREATE TABLE idGenerator
      (tablename varchar(32), 
       maxkey    int);

Top of the page

showLicenses

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

More details available in:

Installing a WebLogic license

Syntax

 $ java utils.showLicenses 

Top of the page

system

Displays basic information about your computer's operating environment, including the manufacturer and version of your JDKWhat's JDK?, your CLASSPATHWhat's CLASSPATH?, and information about your operating system.

Syntax

 $ java utils.system

Examples

 $ 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 

Top of the page

t3dbping

The t3dbping utility tests a WebLogic JDBCWhat's WebLogic JDBC? connection to a DBMS, via any two-tier JDBC driver. You must have access to a WebLogic Server and a DBMS to use this utility.

More details available in:

Testing connections

Syntax

  $ java utils.t3dbping WebLogicURL
        user pswd DBMS driverClass driverURL

Arguments

WebLogicURL
URL of the WebLogic Server.
user
Valid DBMS username.
pswd
Valid password for the user.
DBMS
Database name.
driverClass
Full package name of the WebLogic two-tier driver.
driverURL
URL of the WebLogic two-tier driver.

Examples

See the examples for specific databases in Testing connections.

Top of the page

verboseToZip

Takes the standard out from running a Java application in verbose mode, finds the Java classes referenced, and creates an uncompressed .zip file that contains those Java classes.

More details available in:

Creating a .zip file for a Java application

Syntax

From the document root directory of your HTTP server:

 $ java utils.verboseToZip inputFile zipFileToCreate

Arguments

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

Examples

UNIX example:

 $ java -verbose myapplication > & classList.tmp
 $ java utils.verboseToZip classList.tmp app2.zip

NT example:

 $ java -verbose myapplication > classList.tmp
 $ java utils.verboseToZip classList.tmp app3.zip

Top of the page

version

Displays version information about installed WebLogic Server to stdout.

Syntax

 $ java utils.version

Examples

 $ java utils.version
WebLogic Build: 4.0.1 04/05/1999 22:02:11 #41864

Top of the page

writeLicense

Writes information about all of your WebLogic licenses to a file called writeLicense.txt, located in the current directory. You can then email this file to WebLogic technical support. (support@weblogic.com)

Syntax

 $ java utils.writeLicense -nowrite -Dweblogic.system.home=path

Arguments

-nowrite
Sends the output to stdout instead of writeLicense.txt.
-Dweblogic.system.home
Sets WebLogic home (the root directory of your WebLogic installation). After version 4.0, when XML-formatWhat's XML? license files were introduced, this is a required argument unless you are running writeLicense from WebLogic home. For versions before version 4.0, this argument is not necessary, since the classfile-format licenses looked for in your CLASSPATH.

Examples

 $ java utils.writeLicense -nowrite
* * * * * * 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
...

* * * * * * * 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 WebLogicLicense.xml license found in
weblogic.system.home or current directory

Found in the classpath: c:/weblogic/license/WebLogicLicense.xml
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

 

Copyright © 2000 BEA Systems, Inc. All rights reserved.
Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.
Last updated 01/13/2000