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


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


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 on WebSphere Application Server ), the bootstrap is listening on port 10031.

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

 ./ -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:

On the subject of aliases ...

I'm a super-massive fan of time/labour saving devices, and that goes for command-line tips n' tricks to save me: - (a) typing more s...