dumpNameSpace tool

Use the dumpNameSpace tool to dump the contents of a name space accessed through a name server. The dumpNameSpace tool is based on Java Naming and Directory Interface (JNDI).

When you run the dumpNameSpace tool, the naming service must be active. The dumpNameSpace tool cannot dump name spaces local to the server process, such as those with java: and local: URL schemes. The local: name space contains references to enterprise beans with local interfaces. Use the name space dump utility for java:, local: and server name spaces to dump java: and local: name spaces.

The tool dumps the server root context for the server at the specified host and port unless you specify a non-default starting context which precludes it. The tool does not dump the server root contexts for other servers.

 

Run dumpNameSpace

We can run the tool from a command line or using its program interface. This article describes command-line invocations. To access the dumpNameSpace tool through its program interface, refer to the class com.ibm.websphere.naming.DumpNameSpace in the WebSphere Application Server API documentation. Example: Invoking the name space dump tool illustrates running the tool from a command line or using its program interface.

To run the tool from a command line, enter the following command from the WebSphere/AppServer/bin directory:

Platform Command
UNIX dumpNameSpace.sh [[-keyword value]...]
Windows NT or later dumpNameSpace [[-keyword value]...]

If you run the dumpNameSpace tool with security enabled, a login prompt is displayed. If one cancel the login prompt, the dumpNameSpace tool continues outbound with an "UNAUTHENTICATED" credential. Thus, by default, an "UNAUTHENTICATED" credential is used that is equivalent to the "Everyone" access authorization policy. We can modify this default setting by changing the value for the com.ibm.CSI.performClientAuthenticationRequired property to true in the install_dir/properties/sas.client.props file. If you change this property to true, rerun the dumpNameSpace tool and cancel the login prompt; the authorization fails and the command does not continue outbound.

 

Parameters

The keywords and associated values for the dumpNameSpace tool follow:

-host myhost.company.com

Indicates the bootstrap host or the WAS host whose name space you want to dump. The value defaults to localhost. Specify a value for -host if the tool is not run from the local machine. The -host parameter instructs the tool to connect to a server on a remote machine. For example, run

dumpNameSpace -host myhost.mycompany.com 
to display the name space of the server running on myhost.mycompany.com.

-port nnn

Indicates the bootstrap port which, if not specified, defaults to 2809.

-root { cell | server | node | host | legacy | tree | default }

Indicates the root context to use as the initial context for the dump. The applicable root options and default root context depend on the type of name server from which the dump is being obtained. Descriptions of root options follow:

cell DumpNameSpace default. Dumps the tree starting at the cell root context.
server Dumps the tree starting at the server root context.
node Dumps the tree starting at the node root context. The node value is synonymous with host.

For WAS appservers V4.0 or later:

legacy DumpNameSpace default. Dumps the tree starting at the legacy root context.
host Dumps the tree starting at the bootstrap host root context. The host value is synonymous with node.
tree Dumps the tree starting at the tree root context.

For all WAS appservers and other name servers:

default Dumps the tree starting at the initial context which JNDI returns by default for that server type. This is the only -root choice that is compatible with WAS appservers prior to V4.0 and with non-WebSphere Application Server name servers.

-url some_provider_URL

Indicates the value for the java.naming.provider.url property used to get the initial JNDI context. This option can be used in place of the -host, -port, and -root options. If the -url option is specified, the -host, -port, and -root options are ignored.

-factory com.ibm.websphere.naming.WsnInitialContextFactory

Indicates the initial context factory to be used to get the JNDI initial context. The value defaults to com.ibm.websphere.naming.WsnInitialContextFactory. The default value generally does not need to be changed.

-startAt some/subcontext/in/the/tree

Indicates the path from the bootstrap host's root context to the top level context where the dump should begin. The tool recursively dumps subcontexts below this point. It defaults to an empty string, that is, the bootstrap host root context.

-format { jndi | ins }

jndi The default. Displays name components as atomic strings.
ins Shows name components parsed using Interoperable Naming Service (INS) rules (id.kind).

-report { short | long }

short The default. Dumps the binding name and bound object type. This output is also provided by JNDI Context.list().
long Dumps the binding name, bound object type, local object type, and string representation of the local object (that is, the IORs, string values, and other values that are printed).

For objects of user-defined classes to display correctly with the long report option, you might need to add their containing directories to the list of directories searched. Set the environment variable WAS_USER_DIRS as shown in the following platform-specific commands. The value can include one or more directories.

UNIX

WAS_USER_DIRS=/usr/classdir1:/usr/classdir2 export WAS_USER_DIRS

Windows NT or later

set WAS_USER_DIRS=c:\classdir1;d:\classdir2

All .zip, .jar, and .class files in the specified directories can then be resolved by the class loader when running the dumpNameSpace tool.

-traceString "some.package.name.to.trace.*=all=enabled"

Represents the trace string with the same format as that generated by the servers. The output is sent to the file DumpNameSpaceTrace.out.


 

Related Tasks


Troubleshooting name space problems

 

See Also


Example: Invoking the name space dump tool
Name space dump utility for java:, local: and server name spaces
Example: Invoking the name space dump utility for java: and local: name spaces
Name space dump sample output