Question
CTS
AU
Last activity: 7 Aug 2023 10:33 EDT
JMS connection to Queue Factory - null pointer exception in 8.6.1
Hi All,
We have upgraded JMS listeners and JMS-Connectors from Pega 7.2 to Pega 8.6.1 platform with smart investigate frameworks. After that, we are facing the below exception in the JMS connection, please suggest a solution if you'd have faced the same.
Exception : Couldn't resolve JMS connection factory object 'java:comp/env/jms/PEGAQueueConFactory' from JNDI server at , javax.naming.NamingException: Unexpected exception resolving reference [Root exception is java.lang.NullPointerException]
We have migrated from WAS-based setup to Openshift Container-based platform where Pega is running on Tomcat App server. The following configurations are defined in the context.xml file and web.xml file.
web.xml file :
<resource-ref id="PEGAQueueConFactory">
<description>PEGAQueueConFactory</description>
<res-ref-name>jms/PEGAQueueConFactory</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
context.xml file :
Hi All,
We have upgraded JMS listeners and JMS-Connectors from Pega 7.2 to Pega 8.6.1 platform with smart investigate frameworks. After that, we are facing the below exception in the JMS connection, please suggest a solution if you'd have faced the same.
Exception : Couldn't resolve JMS connection factory object 'java:comp/env/jms/PEGAQueueConFactory' from JNDI server at , javax.naming.NamingException: Unexpected exception resolving reference [Root exception is java.lang.NullPointerException]
We have migrated from WAS-based setup to Openshift Container-based platform where Pega is running on Tomcat App server. The following configurations are defined in the context.xml file and web.xml file.
web.xml file :
<resource-ref id="PEGAQueueConFactory">
<description>PEGAQueueConFactory</description>
<res-ref-name>jms/PEGAQueueConFactory</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
context.xml file :
<Resource name="jms/PEGAQueueConFactory" auth="Container" type="com.ibm.mq.jms.MQQueueConnectionFactory" factory="com.ibm.mq.jms.MQQueueConnectionFactoryFactory" description="PEGAQueueConFactory" CCDTURL="file:///usr/local/tomcat/conf/CHL-PEGAQueueConFactory.TAB" CNLIST="******.APPS.***(1111)" CROPT="77777" CRT="888888" EXP="99999" QMGR="Server.MQ" />
Detail Exception :
WorkQueueMananger Contents --------------------------
| Maintain ThreadPool size :- false | Maximum ThreadPool size :- -1 | ThreadPool inactive timeout :- 0 | unavailable - :- com.ibm.msg.client.commonservices.CSIException: JMSCS0002
Stack trace to show the location of the FFST call | FFST Location :- java.lang.Exception | at com.ibm.msg.client.commonservices.trace.Trace.getCurrentPosition(Trace.java:2143) | at com.ibm.msg.client.commonservices.trace.Trace.createFFSTString(Trace.java:2053) | at com.ibm.msg.client.commonservices.trace.Trace.ffstInternal(Trace.java:1935) | at com.ibm.msg.client.commonservices.trace.Trace.ffst(Trace.java:1736) | at com.ibm.msg.client.commonservices.nls.PINLSServices.createException(PINLSServices.java:112) | at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:226) | at com.ibm.msg.client.jms.internal.JmsErrorUtils.createException(JmsErrorUtils.java:126) | at com.ibm.msg.client.jms.internal.JmsFactoryFactoryImpl.getInstance(JmsFactoryFactoryImpl.java:168) | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | at java.base/java.lang.reflect.Method.invoke(Method.java:566) | at com.ibm.msg.client.jms.JmsFactoryFactory.getInstance(JmsFactoryFactory.java:173) | at com.ibm.mq.jms.MQConnectionFactory.initialiseMQConnectionFactory(MQConnectionFactory.java:3218) | at com.ibm.mq.jms.MQConnectionFactory.<init>(MQConnectionFactory.java:260) | at com.ibm.mq.jms.MQQueueConnectionFactory.<init>(MQQueueConnectionFactory.java:72) | at com.ibm.mq.jms.MQQueueConnectionFactoryFactory.getObjectInstance(MQQueueConnectionFactoryFactory.java:69) | at org.apache.naming.factory.FactoryBase.getObjectInstance(FactoryBase.java:96) | at java.naming/javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:341) | at org.apache.naming.NamingContext.lookup(NamingContext.java:864) | at org.apache.naming.NamingContext.lookup(NamingContext.java:158) | at org.apache.naming.NamingContext.lookup(NamingContext.java:850) | at org.apache.naming.NamingContext.lookup(NamingContext.java:158) | at org.apache.naming.NamingContext.lookup(NamingContext.java:850) | at org.apache.naming.NamingContext.lookup(NamingContext.java:158) | at org.apache.naming.NamingContext.lookup(NamingContext.java:850) | at org.apache.naming.NamingContext.lookup(NamingContext.java:172) | at org.apache.naming.SelectorContext.lookup(SelectorContext.java:161) | at java.naming/javax.naming.InitialContext.lookup(InitialContext.java:409) | at com.pega.pegarules.integration.engine.internal.services.jms.JMSListener.initializeConnection(JMSListener.java:1035) | at com.pega.pegarules.integration.engine.internal.services.jms.JMSListener.runPoller(JMSListener.java:760) | at com.pega.pegarules.integration.engine.internal.services.jms.JMSListener.run_(JMSListener.java:755) | at com.pega.pegarules.integration.engine.internal.services.listener.ServiceListenerBaseImpl.run(ServiceListenerBaseImpl.java:476) | at java.base/java.lang.Thread.run(Thread.java:829)
-------------------------------------------------------------------------------------
Product :- ProductName Date/Time :- Fri Oct 01 16:49:42 AEST 2021 System time :- 1633070982326 Operating System :- Linux UserID :- ***user Java Vendor :- AdoptOpenJDK Java Version :- 11.0.11+9
Source Class :- JmsFactoryFactory Source Method :- getIntance(int) ProbeID :- XI001005 Thread :- name=JMS-Thread-100 priority=5 group=main ccl=com.pega.pegarules.bootstrap.loader.PRAppLoader@2c7fff1b
Data ----
| connectionTypeName :- com.ibm.msg.client.wmq | exception :- ExceptionDepth is 3 | exception :- | | Cause:1 :- java.lang.reflect.InvocationTargetException | | Cause:2 :- java.lang.NullPointerException | | StackTrace:1 :- java.lang.reflect.InvocationTargetException | | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | | at java.base/java.lang.reflect.Method.invoke(Method.java:566) | | at com.ibm.msg.client.jms.JmsFactoryFactory.getInstance(JmsFactoryFactory.java:173) | | at com.ibm.mq.jms.MQConnectionFactory.initialiseMQConnectionFactory(MQConnectionFactory.java:3218) | | at com.ibm.mq.jms.MQConnectionFactory.<init>(MQConnectionFactory.java:260) | | at com.ibm.mq.jms.MQQueueConnectionFactory.<init>(MQQueueConnectionFactory.java:72) | | at com.ibm.mq.jms.MQQueueConnectionFactoryFactory.getObjectInstance(MQQueueConnectionFactoryFactory.java:69) | | at org.apache.naming.factory.FactoryBase.getObjectInstance(FactoryBase.java:96) | | at java.naming/javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:341) | | at org.apache.naming.NamingContext.lookup(NamingContext.java:864) | | at org.apache.naming.NamingContext.lookup(NamingContext.java:158) | | at org.apache.naming.NamingContext.lookup(NamingContext.java:850) | | at org.apache.naming.NamingContext.lookup(NamingContext.java:158) | | at org.apache.naming.NamingContext.lookup(NamingContext.java:850) | | at org.apache.naming.NamingContext.lookup(NamingContext.java:158) | | at org.apache.naming.NamingContext.lookup(NamingContext.java:850) | | at org.apache.naming.NamingContext.lookup(NamingContext.java:172) | | at org.apache.naming.SelectorContext.lookup(SelectorContext.java:161) | | at java.naming/javax.naming.InitialContext.lookup(InitialContext.java:409) | | at com.pega.pegarules.integration.engine.internal.services.jms.JMSListener.initializeConnection(JMSListener.java:1035) | | at com.pega.pegarules.integration.engine.internal.services.jms.JMSListener.runPoller(JMSListener.java:760) | | at com.pega.pegarules.integration.engine.internal.services.jms.JMSListener.run_(JMSListener.java:755) | | at com.pega.pegarules.integration.engine.internal.services.listener.ServiceListenerBaseImpl.run(ServiceListenerBaseImpl.java:476) | | at java.base/java.lang.Thread.run(Thread.java:829) | | Caused by: java.lang.NullPointerException | | at com.ibm.msg.client.jms.internal.JmsFactoryFactoryImpl.getInstance(JmsFactoryFactoryImpl.java:170) | | ... 26 more | | | | StackTrace:2 :- java.lang.NullPointerException | | at com.ibm.msg.client.jms.internal.JmsFactoryFactoryImpl.getInstance(JmsFactoryFactoryImpl.java:170) | | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | | at java.base/java.lang.reflect.Method.invoke(Method.java:566) | | at com.ibm.msg.client.jms.JmsFactoryFactory.getInstance(JmsFactoryFactory.java:173) | | at com.ibm.mq.jms.MQConnectionFactory.initialiseMQConnectionFactory(MQConnectionFactory.java:3218) | | at com.ibm.mq.jms.MQConnectionFactory.<init>(MQConnectionFactory.java:260) | | at com.ibm.mq.jms.MQQueueConnectionFactory.<init>(MQQueueConnectionFactory.java:72) | | at com.ibm.mq.jms.MQQueueConnectionFactoryFactory.getObjectInstance(MQQueueConnectionFactoryFactory.java:69) | | at org.apache.naming.factory.FactoryBase.getObjectInstance(FactoryBase.java:96) | | at java.naming/javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:341) | | at org.apache.naming.NamingContext.lookup(NamingContext.java:864) | | at org.apache.naming.NamingContext.lookup(NamingContext.java:158) | | at org.apache.naming.NamingContext.lookup(NamingContext.java:850) | | at org.apache.naming.NamingContext.lookup(NamingContext.java:158) | | at org.apache.naming.NamingContext.lookup(NamingContext.java:850) | | at org.apache.naming.NamingContext.lookup(NamingContext.java:158) | | at org.apache.naming.NamingContext.lookup(NamingContext.java:850) | | at org.apache.naming.NamingContext.lookup(NamingContext.java:172) | | at org.apache.naming.SelectorContext.lookup(SelectorContext.java:161) | | at java.naming/javax.naming.InitialContext.lookup(InitialContext.java:409) | | at com.pega.pegarules.integration.engine.internal.services.jms.JMSListener.initializeConnection(JMSListener.java:1035) | | at com.pega.pegarules.integration.engine.internal.services.jms.JMSListener.runPoller(JMSListener.java:760) | | at com.pega.pegarules.integration.engine.internal.services.jms.JMSListener.run_(JMSListener.java:755) | | at com.pega.pegarules.integration.engine.internal.services.listener.ServiceListenerBaseImpl.run(ServiceListenerBaseImpl.java:476) | | at java.base/java.lang.Thread.run(Thread.java:829) | | No Components Found