Network Deployment (Distributed operating systems), v8.0 > Troubleshoot and support > Troubleshoot Naming and directory > Troubleshoot namespace problems


View java:, local:, and server namespace dumps

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

Start the naming service.

If the namespaces that to view are not local to the server process, use the dumpNameSpace tool.

We cannot use the dumpNameSpace tool to dump a java: or local: namespace because the dumpNameSpace tool cannot access those namespaces.

The java: namespace of a Java EE application is accessible only by that application. We can invoke a NameServer MBean to dump the java: namespace for any Java EE application running in the same server process.

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

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


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) (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 to invoke. For example,

    set mbean [$AdminControl completeObjectName WebSphere:*,type=NameServer,cell=
        cellName,node=nodeName,process=serverName]
    
    where cellName, nodeName, and serverName are the names of the cell, node, and server for the MBean to invoke. 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.

    We can dump a java: , local:, or server namespace. For each of these, the value for opts is the list of namespace dump options described in Namespace dump utility for java:, local: and server namespaces. The list can be empty.

    java: namespace

    Dump a java: namespace by invoking the dumpJavaNameSpace method on the NameServer MBean. Since each server application has its own java: namespace, 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 {{appname}{modName}{compName}{opts}}
    

    where appname is the application name, modName is the module name, and compName is the component name of the java: namespace to dump.

    local: namespace

    Dump a java: namespace by invoking the dumpLocalNameSpace method on the NameServer MBean. Because there is only one local: namespace in a server process, we have to specify the namespace dump options only.
    $AdminControl invoke $mbean dumpLocalNameSpace {{opts}}
    

    Server namespace

    Dump a server namespace by invoking the dumpServerNameSpace method on an application server's NameServer MBean. This provides an alternative way to dump the namespace on an application server, much like the dumpNameSpace command line utility.
    $AdminControl invoke $mbean dumpServerNameSpace {{opts}}
    


Results

Namespace 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: namespace

Assume to dump the java: namespace 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: namespace 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: namespace

Assume to dump the local: namespace for the server server1 on node node1 of cell MyCell. The following script commands generate a short format dump of that server's local namespace:
set mbean [$AdminControl completeObjectName WebSphere:*,type=NameServer,cell=MyCell,node=node1,process=server1]
$AdminControl invoke $mbean dumpLocalNameSpace {{-report short}}

Use Jython to dump java:, local: or server namespaces

Assume to use Jython to run the NameServer MBean methods that dump java:, local: or server namespaces for the server server1 on node node1.

The following script commands set the NameServer instance to invoke to nameServerString and then dump a java: namespace for DefaultApplication:

nameServerString = AdminControl.completeObjectName("WebSphere:type=NameServer,node=node1,process=server1,*")
print AdminControl.invoke(nameServerString, "dumpJavaNameSpace",
           '[DefaultApplication Increment.jar Increment "-report long"]')

The following script commands set the NameServer instance to invoke to nameServerString and then dump a local: namespace:

nameServerString = AdminControl.completeObjectName("WebSphere:type=NameServer,node=node1,process=server1,*")
print AdminControl.invoke(nameServerString, "dumpLocalNameSpace", '["-report short"]')

The following script commands set the NameServer instance to invoke to nameServerString and then dump a server namespace:

nameServerString = AdminControl.completeObjectName("WebSphere:type=NameServer,node=node1,process=server1,*")
print AdminControl.invoke(nameServerString, "dumpServerNameSpace", '["-root server"]')


View a namespace dump
Troubleshoot namespace problems


Related


Namespace dump utility for java:, local: and server namespaces
dumpNameSpace tool

+

Search Tips   |   Advanced Search