Network Deployment (Distributed operating systems), v8.0 > Troubleshoot and support > Troubleshoot Naming and directory > Troubleshoot namespace problems
View a namespace dump
To understand why a naming operation is failing, view the dump of a namespace. We can use the dumpNameSpace tool to dump the contents of a namespace accessed through a name server. The dumpNameSpace tool is based on JNDI.
Start the naming service.
When you run the dumpNameSpace tool, the naming service must be active. The dumpNameSpace tool cannot dump namespaces local to the server process, such as those with java: and local: URL schemes. The local: namespace contains references to enterprise beans with local interfaces. Use the namespace dump utility for java:, local: and server namespaces to dump java: and local: namespaces.
Decide which parameters to use for the dumpNameSpace tool. dumpNameSpace tool describes the supported keywords and values.
The dumpNameSpace 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.
We can run the tool from a command line or using its program interface.
Procedure
- Run the tool from a command line.
Enter the dumpNameSpace command from the WAS_HOME/bin directory. (AIX) (Solaris)
dumpNameSpace.sh [[-keyword value]...](Windows)dumpNameSpace [[-keyword value]...]There are several command-line options to choose from. For detailed help on the options, enter either of the following commands:
dumpNameSpace -helpor:dumpNameSpace -?Invoke the namespace dump tool from a command line by entering either of the following commands:
dumpNameSpace -host myhost.mycompany.com -port 901or:dumpNameSpace -url corbaloc:iiop:myhost.mycompany.com:901- Run the tool from a Java program.
We can access the dumpNameSpace tool through its program interface. Refer to the class com.ibm.websphere.naming.DumpNameSpace in the WAS API documentation for details on the DumpNameSpace program interface.
Add statements such as the following to your Java program to invoke the namespace dump tool from a Java program:
{ ... import javax.naming.Context; import javax.naming.InitialContext; import com.ibm.websphere.naming.DumpNameSpace; ... java.io.PrintStream filePrintStream = ... Context ctx = new InitialContext(); // Starting context for dump ctx = (Context) ctx.lookup("cell/nodes/node1/servers/server1"); DumpNameSpace dumpUtil = new DumpNameSpace(filePrintStream, DumpNameSpace.SHORT); dumpUtil.generateDump(ctx); ... }
Results
Namespace dump output is sent to the console.
The tool dumps output in short or long format. Namespace dump output on single-server installations includes only entries for a single server. Output such as the following for a multiple-server installation includes bindings for multiple servers in the cell. This multiple-server output is in the SHORT dump format:
Get the initial context Getting the starting context ============================================================================== Namespace Dump Provider URL: corbaloc:iiop:localhost:9810 Context factory: com.ibm.websphere.naming.WsnInitialContextFactory Requested root context: cell Starting context: (top)=outpostNetwork Formatting rules: jndi Time of dump: Mon Sep 16 18:35:03 CDT 2002 ============================================================================== ============================================================================== Beginning of Namespace Dump ============================================================================== 1 (top) 2 (top)/domain javax.naming.Context 2 Linked to context: outpostNetwork 3 (top)/cells javax.naming.Context 4 (top)/clusters javax.naming.Context 5 (top)/clusters/Cluster1 javax.naming.Context 6 (top)/cellname java.lang.String 7 (top)/cell javax.naming.Context 7 Linked to context: outpostNetwork 8 (top)/deploymentManager javax.naming.Context 8 Linked to URL: corbaloc::outpost:9809/NameServiceServerRoot 9 (top)/nodes javax.naming.Context 10 (top)/nodes/will2 javax.naming.Context 11 (top)/nodes/will2/persistent javax.naming.Context 12 (top)/nodes/will2/persistent/SomeObject SomeClass 13 (top)/nodes/will2/nodename java.lang.String 14 (top)/nodes/will2/domain javax.naming.Context 14 Linked to context: outpostNetwork 15 (top)/nodes/will2/cell javax.naming.Context 15 Linked to context: outpostNetwork 16 (top)/nodes/will2/servers javax.naming.Context 17 (top)/nodes/will2/servers/server1 javax.naming.Context 18 (top)/nodes/will2/servers/will2 javax.naming.Context 19 (top)/nodes/will2/servers/member2 javax.naming.Context 20 (top)/nodes/will2/node javax.naming.Context 20 Linked to context: outpostNetwork/nodes/will2 21 (top)/nodes/will2/nodeAgent javax.naming.Context 22 (top)/nodes/outpost javax.naming.Context 23 (top)/nodes/outpost/node javax.naming.Context 23 Linked to context: outpostNetwork/nodes/outpost 24 (top)/nodes/outpost/nodeAgent javax.naming.Context 24 Linked to URL: corbaloc::outpost:2809/NameServiceServerRoot 25 (top)/nodes/outpost/persistent javax.naming.Context 26 (top)/nodes/outpost/nodename java.lang.String 27 (top)/nodes/outpost/domain javax.naming.Context 27 Linked to context: outpostNetwork 28 (top)/nodes/outpost/servers javax.naming.Context 29 (top)/nodes/outpost/servers/server1 javax.naming.Context 30 (top)/nodes/outpost/servers/server1/url javax.naming.Context 31 (top)/nodes/outpost/servers/server1/url/CatalogDAOSQLURL 31 java.net.URL 32 (top)/nodes/outpost/servers/server1/mail javax.naming.Context 33 (top)/nodes/outpost/servers/server1/mail/PlantsByWebSphere 33 javax.mail.Session 34 (top)/nodes/outpost/servers/server1/TransactionFactory 34 com.ibm.ejs.jts.jts.ControlSet$LocalFactory 35 (top)/nodes/outpost/servers/server1/servername java.lang.String 36 (top)/nodes/outpost/servers/server1/WSsamples javax.naming.Context 37 (top)/nodes/outpost/servers/server1/WSsamples/TechSampDatasource 37 TechSamp 38 (top)/nodes/outpost/servers/server1/thisNode javax.naming.Context 38 Linked to context: outpostNetwork/nodes/outpost 39 (top)/nodes/outpost/servers/server1/cell javax.naming.Context 39 Linked to context: outpostNetwork 40 (top)/nodes/outpost/servers/server1/eis javax.naming.Context 41 (top)/nodes/outpost/servers/server1/eis/DefaultDatasource_CMP 41 Default_CF 42 (top)/nodes/outpost/servers/server1/eis/WSsamples javax.naming.Context 43 (top)/nodes/outpost/servers/server1/eis/WSsamples/TechSampDatasource_CMP 43 TechSamp_CF 44 (top)/nodes/outpost/servers/server1/eis/jdbc javax.naming.Context 45 (top)/nodes/outpost/servers/server1/eis/jdbc/PlantsByWebSphereDataSource_CMP 45 PLANTSDB_CF 46 (top)/nodes/outpost/servers/server1/eis/jdbc/petstore 46 javax.naming.Context 47 (top)/nodes/outpost/servers/server1/eis/jdbc/petstore/PetStoreDB_CMP 47 PetStore_CF 48 (top)/nodes/outpost/servers/server1/eis/jdbc/CatalogDB_CMP 48 Catalog_CF 49 (top)/nodes/outpost/servers/server1/jta javax.naming.Context 50 (top)/nodes/outpost/servers/server1/jta/usertransaction 50 java.lang.Object 51 (top)/nodes/outpost/servers/server1/DefaultDatasource 51 Default Datasource 52 (top)/nodes/outpost/servers/server1/jdbc javax.naming.Context 53 (top)/nodes/outpost/servers/server1/jdbc/CatalogDB CatalogDB 54 (top)/nodes/outpost/servers/server1/jdbc/petstore javax.naming.Context 55 (top)/nodes/outpost/servers/server1/jdbc/petstore/PetStoreDB 55 PetStoreDB 56 (top)/nodes/outpost/servers/server1/jdbc/PlantsByWebSphereDataSource 56 PLANTSDB 57 (top)/nodes/outpost/servers/outpost javax.naming.Context 57 Linked to URL: corbaloc::outpost:2809/NameServiceServerRoot 58 (top)/nodes/outpost/servers/member1 javax.naming.Context 59 (top)/nodes/outpost/cell javax.naming.Context 59 Linked to context: outpostNetwork 60 (top)/nodes/outpostManager javax.naming.Context 61 (top)/nodes/outpostManager/domain javax.naming.Context 61 Linked to context: outpostNetwork 62 (top)/nodes/outpostManager/cell javax.naming.Context 62 Linked to context: outpostNetwork 63 (top)/nodes/outpostManager/servers javax.naming.Context 64 (top)/nodes/outpostManager/servers/dmgr javax.naming.Context 64 Linked to URL: corbaloc::outpost:9809/NameServiceServerRoot 65 (top)/nodes/outpostManager/node javax.naming.Context 65 Linked to context: outpostNetwork/nodes/outpostManager 66 (top)/nodes/outpostManager/nodename java.lang.String 67 (top)/persistent javax.naming.Context 68 (top)/persistent/cell javax.naming.Context 68 Linked to context: outpostNetwork 69 (top)/legacyRoot javax.naming.Context 69 Linked to context: outpostNetwork/persistent 70 (top)/persistent/AnotherObject AnotherClass ============================================================================== End of Namespace Dump ==============================================================================
What to do next
If you cannot use the dumpNameSpace command line utility to dump the java: namespace for a Java EE specification application because the application's java: namespace is accessible only by that application, run the namespace dump utility for java:, local: and server namespaces.
View java:, local:, and server namespace dumps
Troubleshoot namespace problems
Related
Namespace dump utility for java:, local: and server namespaces
dumpNameSpace tool