ClassNotFoundException when setting up JNDI Server
SummaryUser is planning to set up an EJB connection with an external Java application and trying to set up the JNDI rule.
So they are setting up JNDI server in Pega 7.2.1 on WebSphere Liberty profile 220.127.116.11. and typed "com.ibm.websphere.naming.WsnInitialContextFactory" as "Initial context factory".
However, after saving the rule and clicking "Test connectivity", an error popped up.
Error MessagesConfiguration Issues
Required classes are not available. Please check the configuration.
Steps to Reproduce1. Setup Pega 7.2.1 environment with WebSphere Liberty Profile 18.104.22.168.
2. Create "JNDI Server" rule.
3. Type "com.ibm.websphere.naming.WsnInitialContextFactory" for "Initial context factory".
4. Type valid "Provider URL".
5. Save the JNDI Server rule.
6. Click "Test connectivity" button.
The root cause is in the third-party product WebSphere Liberty profile 22.214.171.124. WsnInitialContextFactory is deprecated in this version.
ResolutionPerform the following local-change:
- Copy the jar which contains WsnInitialContextFactory (com.ibm.ws.ejb.thinclient_8.5.0.jar) in the ext folder of web server.
- Restart the node.
One can also include the jar in the prconfig file as below:
<env name="classloader/classpath" value="dir/applib/thirdParty.jar" />
Published October 8, 2020