Wednesday 8 July 2009

JNDI - Getting access to the namespace on WebSphere Application Server 6.1

Am trying to connect the Lotus Connections business card service ( part of Profiles ) to the Lotus Connections Multi-service portlet, following various documentation sources, including: -


and: -


Part of the setup involves setting up a Resource Provider/URL using Java Naming Directory Interface (JNDI). Having set it up in the WAS administration console, I wanted to see whether it appeared within the JNDI namespace.

For many years, WebSphere Application Server has had the command: -

dumpNameSpace

which, on my Linux box, I can run as follows: -

/opt/IBM/WebSphere/AppServer/profiles/wp_profile/bin/dumpNameSpace.sh

However, this fails with an exception: -

Getting the initial context
ERROR: Could not get the initial context or unable to look up the starting context. Exiting.
Exception received: javax.naming.ServiceUnavailableException: A communication failure occurred while attempting to obtain an initial context with the provider URL: "corbaloc:iiop:localhost:2809".  Make sure that any bootstrap address information in the URL is correct and that the target name server is running.  A bootstrap address with no port specification defaults to port 2809. 
....

This is because the command looks for the default JNDI bootstrap listening on port 2809 ( corbaloc:iiop:localhost:2809 ) whereas, on my server ( running WebSphere Portal Server 6.1.0.2 on WebSphere Application Server 6.1.0.2 ), the bootstrap is listening on port 10031.

Therefore, I needed to run the command as follows: -

 ./dumpNameSpace.sh -url corbaloc:iiop:localhost:10031 > /root/dumpNameSpace.out

I chose to create an output file, in order that I can go and search for the appropriate JNDI variable


No comments:

Visual Studio Code - Wow 🙀

Why did I not know that I can merely hit [cmd] [p]  to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub...