Support Article
ClassNotFoundException when setting up JNDI Server
SA-30986
Summary
User 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 16.0.0.3. 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 Messages
Configuration Issues
Required classes are not available. Please check the configuration.
Error Details:
java.lang.ClassNotFoundException: com.ibm.websphere.naming.WsnInitialContextFactory
Steps to Reproduce
1. Setup Pega 7.2.1 environment with WebSphere Liberty Profile 16.0.0.3.
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.
Root Cause
The root cause is in the third-party product WebSphere Liberty profile 16.0.0.3. WsnInitialContextFactory is deprecated in this version.
Resolution
Perform 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.
<env name="classloader/classpath" value="dir/applib/thirdParty.jar" />
Published October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.