[英]java.lang.NoClassDefFoundError: com/ibm/mq/MQException in Tomcat
I am running a dynamic web project, but am encountering the following errors from Tomcat: 我正在运行一个动态Web项目,但是遇到来自Tomcat的以下错误:
Caused by: java.lang.NoClassDefFoundError: com/ibm/mq/MQException
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)
at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:261)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:140)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:405)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:881)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
Caused by: java.lang.ClassNotFoundException: com.ibm.mq.MQException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
... 20 more
I have the com.ibm.mq.jar added as an external jar. 我将com.ibm.mq.jar添加为外部jar。 Does anyone know what's wrong? 有人知道怎么了吗?
You need to mark that jar as needing to be deployed from your project's Deployment Assembly property page. 您需要从项目的“部署程序集”属性页面中将该jar标记为需要部署。 By default, only the jars physically in the WEB-INF/lib folder will be deployed to the server. 默认情况下,只有物理上位于WEB-INF / lib文件夹中的jar才会部署到服务器。
First of all, you need more than just com.ibm.mq.jar file to connect to a remote queue manager. 首先,您不仅需要com.ibm.mq.jar文件来连接到远程队列管理器。
If you are using WMQ v6.0 or lower then you need the following MQ JAR files: 如果使用的是WMQ v6.0或更低版本,则需要以下MQ JAR文件:
If you are using WMQ v7.0, v7.1, v7.5 or higher then you need the following MQ JAR files: 如果使用的是WMQ v7.0,v7.1,v7.5或更高版本,则需要以下MQ JAR文件:
If you are using JMS in your application then you also need: 如果在应用程序中使用JMS,则还需要:
Are you using MQ JNDI? 您在使用MQ JNDI吗? If so, also add the jndi.jar file too. 如果是这样,还请添加jndi.jar文件。
This is the standard RTM, as it is well documented. 这是标准的RTM,有据可查。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.