View java:, local: and server name space dumps

 

+

Search Tips   |   Advanced Search

 

Overview

To understand why a naming operation is failing, you can view the dump of a java: or local: name space. From the WAS scripting tool, invoke a NameServer MBean to dump java: or local: name spaces.

Start the naming service.

If the name spaces to view are not local to the server process, use the dumpNameSpace tool.

You cannot use the dumpNameSpace tool to dump a java: or local: name space because the dumpNameSpace tool cannot access those name spaces.

The java: name space of a J2EE application is accessible only by that application. You can invoke a NameServer MBean to dump the java: name space for any J2EE application running in the same server process.

The local: name space contains references to enterprise beans with local interfaces. There is only one local: name space in a server process. You can invoke the NameServer MBean associated with that server process to dump the local: name space.

Use the scripting tool to invoke the NameServer MBean running in the application's server process to generate dumps of java: , local:, or server name spaces.

 

Procedure

  1. Invoke a method on a NameServer MBean by using the WAS scripting tool.

    Enter the scripting command prompt by typing the following command: [AIX] [Linux] [HP-UX] [Solaris]

    wsadmin.sh

    [Windows]

    wsadmin

    Use the -help option for help on using the wsadmin command.

  2. Select the NameServer MBean instance to invoke. Run the following script commands to select the NameServer instance you want to invoke. For example,

    set mbean [$AdminControl completeObjectName WebSphere:*,type=NameServer,cell=cell,node=node,process=server]

    The specified server must be running before you can invoke a method on the MBean. You can see a list of all NameServer MBeans current running by issuing the following query:

    $AdminControl queryNames {*:*,type=NameServer}

  3. Invoke the NameServer MBean.

    You can dump a java: , local:, or server name space. For each of these, the value for opts is the list of name space dump options described in Name space dump utility for java:, local: and server name spaces. The list can be empty.

    java: name space

    Dump a java: name space by invoking the dumpJavaNameSpace method on the NameServer MBean. Since each server application has its own java: name space, the application must be specified on the method invocation. An application is identified by the application name, module name, and component name. The method syntax follows:

    $AdminControl invoke $mbean dumpJavaNameSpace {{app}{mod}{comp}{opts}}

    ...where app is the application name, mod is the module name, and comp is the component name of the java: name space you want to dump.

    local: name space

    Dump a java: name space by invoking the dumpLocalNameSpace method on the NameServer MBean. Because there is only one local: name space in a server process, you have to specify the name space dump options only.

    $AdminControl invoke $mbean dumpLocalNameSpace {{opts}}

    Server name space

    Dump a server name space by invoking the dumpServerNameSpace method on an appserver's NameServer MBean. This provides an alternative way to dump the name space on an appserver, much like the dumpNameSpace command line utility.

    $AdminControl invoke $mbean dumpServerNameSpace {{opts}}

 

Results

Name space dump output is sent to the console. It is also written to the file DumpNameSpace.log in the server's log directory.

 

Example

Dumping a java: name space

Assume you want to dump the java: name space of an application component running in server server1 on node node1 of the cell MyCell. The application name is AcctApp in module AcctApp.war, and the component name is Acct Servlet. The following script commands generate a long format dump of the application's java: name space of that application:

set mbean [$AdminControl completeObjectName WebSphere:*,type=NameServer,cell=MyCell,node=node1,process=server1]

$AdminControl invoke $mbean dumpJavaNameSpace {{DefaultApplication}{Increment.jar}{Increment}{-report long}}

Dumping a local: name space

Assume you want to dump the local: name space for the server server1 on node node1 of cell MyCell. The following script commands generate a short format dump of that server's local name space:

set mbean [$AdminControl completeObjectName WebSphere:*,type=NameServer,cell=MyCell,node=node1,process=server1]

$AdminControl invoke $mbean dumpLocalNameSpace {{-report short}}



View a name space dump
Troubleshooting name space problems

 

Related Reference

Name space dump utility for java:, local: and server name spaces

 

Related information

dumpNameSpace tool