Question
Unitedhealth Group
US
Last activity: 2 Mar 2017 14:10 EST
Getting "java.lang.NoClassDefFoundError: Could not initialize class com.ibm.mq.MQEnvironment" error while doing a test connection from MQ server form
Hi All,
I am getting below exception while doing a test connection from "MQ Server" form of PRPC. This application is running on PRPC 7.1.9 and on JBOSS 6.4.6 GA. I have imported the following JAR files in PRPC under "customer" codeset and restarted the server. Even after that I am getting the above error.
1) com.ibm.mq.commonservices.jar
2) com.ibm.mq.connector.jar
3) com.ibm.mq.headers.jar
4) com.ibm.mq.jar
5) com.ibm.mq.jmqi.jar
6) com.ibm.mqjms.jar
7) com.ibm.mq.pcf.jar
8) com.ibm.msg.client.commonservices.jar
9) com.ibm.msg.client.jms.jar
10) dhbcore.jar
Appreciate your help and quick response in resolving this error.
***Updated by moderator: Marissa to update categories***
***Updated by moderator: Marissa to add SR Details***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
IN
Hello!
Upon reviewing the SR it is determined that JMS should be used with ear deployment in this use case.
Regards,
Lochan | Community Moderator | Pegasystems Inc.
Pegasystems Inc.
US
What is your MQ version? Make sure your jars are from the compatible MQ client version. Also attach the complete error stack. This looks to be classloading conflict issue.
Unitedhealth Group
US
Hi Kevin,
Thanks for your reply. We are using MQ version of 7.5 and client resource adapter version of Proprietary information hidden. Below is the full stack trace of the error,
Hi Kevin,
Thanks for your reply. We are using MQ version of 7.5 and client resource adapter version of Proprietary information hidden. Below is the full stack trace of the error,
com.pega.pegarules.pub.PRRuntimeError
com.pega.pegarules.pub.PRRuntimeError: PRRuntimeError
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:712)
at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivitiesAlt(PRThreadImpl.java:461)
at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.runActivities(HttpAPI.java:3358)
at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequestInner(EngineAPI.java:419)
at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.performTargetActionWithLock(PRSessionProviderImpl.java:1270)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1008)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:841)
at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequest(EngineAPI.java:331)
at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.invoke(HttpAPI.java:852)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:315)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:263)
at com.pega.pegarules.session.internal.engineinterface.etier.ejb.EngineBean.invokeEngine(EngineBean.java:225)
at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:370)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:411)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingThrowable(AppServerBridgeToPega.java:223)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingException(AppServerBridgeToPega.java:245)
at com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.invokeEngine(EngineBeanBoot.java:168)
at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.tx.EjbBMTInterceptor.handleInvocation(EjbBMTInterceptor.java:104)
at org.jboss.as.ejb3.tx.BMTInterceptor.processInvocation(BMTInterceptor.java:60)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.security.AuthorizationInterceptor.processInvocation(AuthorizationInterceptor.java:116)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:89)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.interceptors.EjbExceptionTransformingInterceptorFactories$2.processInvocation(EjbExceptionTransformingInterceptorFactories.java:103)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:185)
at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:73)
at com.pega.pegarules.internal.etier.interfaces.EngineLocal$$$view20.invokeEngine(Unknown Source)
at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngineInner(JNDIEnvironment.java:278)
at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngine(JNDIEnvironment.java:223)
at com.pega.pegarules.web.impl.WebStandardImpl.makeEtierRequest(WebStandardImpl.java:574)
at com.pega.pegarules.web.impl.WebStandardImpl.doPost(WebStandardImpl.java:374)
at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:370)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:411)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingThrowable(AppServerBridgeToPega.java:223)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethod(AppServerBridgeToPega.java:272)
at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doPost(WebStandardBoot.java:121)
at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doGet(WebStandardBoot.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.event(JBossWebContext.java:91)
at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.invoke(JBossWebContext.java:72)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:420)
at org.jboss.as.web.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:134)
at org.jboss.as.web.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:99)
at org.jboss.as.web.session.JvmRouteValve.invoke(JvmRouteValve.java:92)
at org.jboss.as.web.session.LockingValve.invoke(LockingValve.java:64)
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:490)
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:420)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: com/ibm/mq/internal/MQCommonServices
at com.ibm.mq.MQSESSION.getJmqiEnv(MQSESSION.java:149)
at com.ibm.mq.MQSimpleConnectionManager.<init>(MQSimpleConnectionManager.java:105)
at com.ibm.mq.MQEnvironment.<clinit>(MQEnvironment.java:540)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.pegarules.generated.activity.ra_action_validateinfrastructure_1dd40a7c0f65276d7e76088be5fc58eb.step3_circum0(ra_action_validateinfrastructure_1dd40a7c0f65276d7e76088be5fc58eb.java:367)
at com.pegarules.generated.activity.ra_action_validateinfrastructure_1dd40a7c0f65276d7e76088be5fc58eb.perform(ra_action_validateinfrastructure_1dd40a7c0f65276d7e76088be5fc58eb.java:109)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3505)
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:646)
... 109 more
Caused by: java.lang.ClassNotFoundException: com.ibm.mq.internal.MQCommonServices
at com.pega.pegarules.internal.bootstrap.phase2.PRBaseLoader.findClass(PRBaseLoader.java:312)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at com.pega.pegarules.internal.bootstrap.phase2.PRBaseLoader.loadClass(PRBaseLoader.java:237)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.pega.pegarules.bootstrap.loader.PRAppLoader.loadClass(PRAppLoader.java:772)
at com.pega.pegarules.bootstrap.loader.PRAppLoader.loadClass(PRAppLoader.java:649)
... 118 more
Pegasystems Inc.
US
looks like pega engine cannot see this class:
Caused by: java.lang.ClassNotFoundException: com.ibm.mq.internal.MQCommonServices
at com.pega.pegarules.internal.bootstrap.phase2.PRBaseLoader.findClass(PRBaseLoader.java:312)
you can confirm that using SMA>>Advanced>>ETier runtime environment (java class lookup).
Just wondering if you can simply use Connect-JMS (as long as you use ear deployment) since you already have resource adapter deployed, no need to import MQ client jars, which is proven to be chanllenging sometimes. What is your business requirement in particular?
Unitedhealth Group
US
Hi Kevin,
Thanks for your prompt response. Yes, I can confirm SMA that pega is unable to locate this class "com.ibm.mq.internal.MQCommonServices". We have business requirement to send the response message back to the same queue from which request is received. Since there are more than 5 queues, we want to use the reply to feature on "Connect-MQ" rules, which is not available with "Connect-JMS". Please let me know if you want me to raise an SR.
Pegasystems Inc.
US
You can use JMS MDB listener, the replyto feature is supported there. I am confused why you would send the message back to the same queue (normally replyto queue is a different queue and picked up by another listener process). Who is processing messages on the queue? Please elaborate your business flows first before opening any SRs.
Unitedhealth Group
US
Kevin,
Thanks for the prompt response. Here is the business requirement. We have MDB listener which listens for incoming messages and PRPC processes those messages and at a later time an acknowledgement will be sent to MQ queues. Here the response needs to be sent is asynchornous and hence we are not using MDB for response. We have 10 queues to send response and we don't want to create 10 Connect-JMS instead we want to leverage the functionality available in Connect-MQ forms to send to any of those queues defined there.
If you are still not clear, we can setup a meeting and disucss more. Please let me know you availability.
Pegasystems Inc.
US
Thanks for the clarification, please go ahead to create a SR for further investigation.
Pegasystems Inc.
US
One more thing: can you please first try this approach: https://community.pega.com/support/support-articles/mq-connect-setup-jboss-eap-63-does-not-work, essentially using jboss module instead of importing jars into db.
Unitedhealth Group
US
Thanks Kevin. I have tried that before but didn't worked.
Pegasystems Inc.
US
When you open your SR please comment here with the SR # so that we may track this in your thread for you!
Marissa | Community Moderator | Pegasystems Inc.
Unitedhealth Group
US
Hi Marissa,
I have raised SR-A97325 with GCS.
Pegasystems Inc.
US
GCS wil take it from here and we will be in touch.
Accepted Solution
Pegasystems Inc.
IN
Hello!
Upon reviewing the SR it is determined that JMS should be used with ear deployment in this use case.
Regards,
Lochan | Community Moderator | Pegasystems Inc.
Cognizant Technology Solutions
IN
Hi
We are in Pega 7.2.1. Has there been any intermediate fixes between 7.1 and 7.2.1?