Use the default values for the java.naming.factory.initial and java.naming.provider.url JNDI properties when you migrate to Liberty.
The following WebSphere Application Server traditional values for these properties are not valid:
java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactoryjava.naming.provider.url=corbaloc:iiop:localhost:2809The migration tool scans Java and properties files for the properties mentioned earlier.
In jndi.properties files the java.naming.factory.initial and java.naming.provider.url property keys are flagged regardless of the value.
If the properties file rule detects a jndi.properties file, check the properties in the file.
Either remove the java.naming.factory.initial and java.naming.provider.url properties, or delete the file if none of the properties are needed.
The following example illustrates application code that this rule will flag:
java.naming.factory.initial,
com.ibm.websphere.naming.WsnInitialContextFactory);
java.naming.provider.url,
corbaloc:iiop:localhost:2809);
When you use the InitialContext(Hashtable) constructor, remove these two properties. If no other properties are being used, you can use the default constructor.
The following example illustrates the proper use of the code shown in the previous example:
When you use the InitialContext(Hashtable) constructor, remove these two properties. If no other properties are being used, you can use the default constructor.
This rule has an automated fix to remove those two properties. Copy the custom configuration to your application build file to enable it.
The rule will also flag com.ibm.websphere.naming.WsnInitialContextFactory anywhere in Java code. Remove this string and verify that it is not being used as part of InitialContext initialization.