Issue
After upgrading to JDK 11 from JDK 8 and MQ 9.2.0.5 (from 9.2.0.4), i'm getting the below error when trying to open JMS connection.
I'm running on WLS 14.
I also upgraded allclient.jar to 9.2.0.5.
I tried running it with previous MQ (9.2.0.4) which worked fine with java 8, i get the same issue. Same code works fine with MQ 9.2.0.4, JDK 8 and WLS 12.
I verified that method exists in jar and verified no other versions of allclient jars exists.
com.ibm.mq.jmqi.JmqiException: CC=2;RC=2195;AMQ9546: Error return code received. [1=java.lang.NoSuchMethodException[com.ibm.mq.jmqi.remote.api.RemoteFAP.(com.ibm.mq.jmqi.JmqiEnvironment, int)],3=Class.getConstructor0] at com.ibm.mq.jmqi.JmqiEnvironment.getInstance(JmqiEnvironment.java:857) at com.ibm.mq.jmqi.JmqiEnvironment.getMQI(JmqiEnvironment.java:702) at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:8437) at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:7815) at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl._createConnection(JmsConnectionFactoryImpl.java:322) at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:242) at com.ibm.mq.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6026) at com.ibm.mq.jms.MQConnectionFactory.createConnection(MQConnectionFactory.java:6086) at org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter.doCreateConnection(UserCredentialsConnectionFactoryAdapter.java:188) at . Caused by: java.lang.NoSuchMethodException: com.ibm.mq.jmqi.remote.api.RemoteFAP.(com.ibm.mq.jmqi.JmqiEnvironment, int) at java.base/java.lang.Class.getConstructor0(Class.java:3349) at java.base/java.lang.Class.getConstructor(Class.java:2151) at com.ibm.mq.jmqi.JmqiEnvironment.getInstance(JmqiEnvironment.java:764)
Solution
Remove if you have com.ibm.* related packages in prefer-application-packages section in weblogic.xml.
Answered By - drdonna
Answer Checked By - Candace Johnson (JavaFixing Volunteer)