Reputation: 1173
I try to convert application using Websphere 8.5 full profile to Liberty profile, but I got issue regarding to incompatibility.
Unable to find the InitialContextFactory com.ibm.websphere.naming.WsnInitialContextFactory
I know the class location com.ibm.ws.ejb.thinclient_8.0.0.jar in full profile verison, but I could not the relevant one in Liberty profile, And one more thing, because I am doing maintenance application, so the class to look at
com.ibm.websphere.naming.WsnInitialContextFactory
it already complied in jar file, so I am unable to change it,
I totally get stuck on this. any idea on this issue is appreciated.
Upvotes: 1
Views: 5632
Reputation: 631
In my case, I was using *java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory
into the application properties which was further injected into the spring bean of QuartzSchedulerService
as a property injection.
I just removed the line from the application properties
java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory
and removed property java.naming.factory.initial
injection also from spring bean config. It got fixed.
I'm using the above config in Quartz scheduler. So, shared if helpful for someone. Thanks.
Upvotes: 0
Reputation: 18020
Liberty is not using WsnInitialContextFactory, so you will need to refactor your classes using it to parameter less constructor of InitialContext
like this:
InitialContext ctx = new InitialContext();
Where in your application you need that WsnInitialContextFactory
?
Upvotes: 2