Search code examples
jndiwebsphere-libertybootstrappingopen-liberty

Migrating application from WAS Full profile 8.5.5.7 to WAS Liberty profile 17.0.0.4


I have migrated everything and deployed the application to the new server. When I try running it, I get the following exception:

A communication failure occurred while attempting to obtain an initial context with the provider URL: "corbaloc:iiop:127.0.0.1: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. Possible causes other than an incorrect bootstrap address or unavailable name server include the network environment and workstation network configuration.

Now, on full profile I know where to see the bootstrap address and how to configure it. I couldn't find anything on the Liberty profile though. I did have a look at several IBM documentations but can't find how to do it. Anyone here might point me in the right direction?

Just to include everything, here is the relevant part in the jndi.properties file:

java.naming.provider.url=corbaloc:iiop:127.0.0.1:2809 java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory

I have as of yet never worked with either WAS other than deploying applications nor have I worked with JNDI lookups or anything. I know that there is a factory that uses the java.properties file though.

Since I want to migrate with as little effort as possible I assume that the easiest would be to change the bootstrap address in the Liberty rather than changing the running code in the application.


Solution

  • If you need to set the bootstrap address to a non-default value, you can do that in the server.xml with the <iiopEndpoint> element, like:

    <iiopEndpoint id="defaultIiopEndpoint" iiopPort="2809"/>

    with the full documentation for the ORB here.