Upgrade of Java 8 and MQ - NoClassDEfFoundError

旧城冷巷雨未停 提交于 2019-12-06 14:58:27

You're getting the exception:

java.lang.ClassNotFoundException: javax.jms.JMSRuntimeException

because you don't have the JMS v2.0 jar on your classpath. You're probably still using the JMS v1.1 jar.

Look at how your application configures its Java classpath to correct the issue.

Note that if you didn't copy the MQ client libraries around, and just referenced the com.ibm.mq.allclient.jar file on the Java classapth from a real MQ client install, you wouldn't have this problem as the JMS v2.0 jar will exist alongside the allclient jar in the MQ_INSTALLATION_DIR/java/lib directory and would be pulled into auto-magically.

As stated by a_cornish_pasty you are likely missing the jms.jar or have an older version.

For IBM MQ Classes for JMS you can find the list of files required on the IBM MQ v9 Knowledge Center page "What is installed for IBM MQ classes for JMS":

Relocatable JAR files
Within an enterprise, the following files can be moved to systems that need to run IBM MQ classes for JMS:

  • com.ibm.mq.allclient.jar
  • com.ibm.mq.traceControl.jar
  • jms.jar
  • fscontext.jar
  • providerutil.jar
  • The Bouncy Castle security provider and CMS support jars

The fscontext.jar and providerutil.jar files are required if your application performs JNDI lookups using a file system context.

The Bouncy Castle security provider and CMS support jar files are required. For more information, see Support for non-IBM JREs.

Note that only com.ibm.mq.allclient.jar, jms.jar, and the Bouncy Castle security provider and CMS support jars are included in the Redistributable client, but all are included in Java All client. You are also running 9.0.0.0 and I would recommend you go to 9.0.0.2. You can find both the Redistributable and Java All clients on Fix Central.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!