Support Article
Connect MQ error: Failed to compile generated Java
SA-20367
Summary
User is not able to test the connect MQ rules. When they click on Test Connectivity button, it gives them an error as below. They were not facing any issue earlier, but the issue has appeared since the past three weeks.
Failed to compile generated Java com.pegarules.generated.activity.ra_action_validateinfrastructureconnectmq_40e0e5f7c0ede9f55bc1cce96a9d4fef: ----------
1. ERROR in com/pegarules/generated/activity/ra_action_validateinfrastructureconnectmq_40e0e5f7c0ede9f55bc1cce96a9d4fef.java (at line 853)
int reqQueueOpt = com.ibm.mq.constants.CMQC.MQOO_OUTPUT;
^^^^^^^^^^^^^^^^^^^^
com.ibm.mq.constants cannot be resolved
Error Messages
Failed to compile generated Java com.pegarules.generated.activity.ra_action_validateinfrastructureconnectmq_40e0e5f7c0ede9f55bc1cce96a9d4fef: ----------
1. ERROR in com/pegarules/generated/activity/ra_action_validateinfrastructureconnectmq_40e0e5f7c0ede9f55bc1cce96a9d4fef.java (at line 853)
int reqQueueOpt = com.ibm.mq.constants.CMQC.MQOO_OUTPUT;
^^^^^^^^^^^^^^^^^^^^
com.ibm.mq.constants cannot be resolved
Steps to Reproduce
Open Connect-MQ rules and test connectivity.
Click Test Connectivity.
Error is displayed in the popup.
Root Cause
A defect or configuration issue in the operating environment. Customer was having multiple MQ related errors when testing the connectivity. Also the MQ related .jar files are not searchable from the SMA.
Resolution
Related PDN article https://pdn.pega.com/support-articles/couldnt-connect-mq-server-located-uscinc2b5s8
Take DB backup
Stop the Application server.
Clean-up all prior MQ JAR entries from the PRPC database by executing the SQL command below for each of the MQ JARs that you installed.
DELETE from PRPC_SCHEMA_NAME.pr_engineclasses where pzjar like '%JAR_FILE_NAME.jar';
Replace JAR_FILE_NAME with the following jar file names -
* com.ibm.mq.commonservices
* com.ibm.mq.headers
* com.ibm.mq
* com.ibm.mq.pcf
* com.ibm.mq.jmqi
* com.ibm.mqjms
* connector.jar
*dhbcore.jar
* fscontext
* jms
After that Import the following JAR files to the PegaRULES database schema using Developer portal > Import archive wizard.
com.ibm.mq.commonservices.jar
com.ibm.mq.headers.jar
com.ibm.mq.jar
com.ibm.mq.pcf.jar
com.ibm.mq.jmqi.jar
com.ibm.mqjms.jar
connector.jar
dhbcore.jar
fscontext.jar
jms.jar
Re-test the MQ connectivity after restart the Server
However after importing the .jar files the test connectivity failed. The connector.jar was somehow get corrupted. Re-importing it resolved the issue.
Published March 16, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.