gpt4 book ai didi

java.lang.NoClassDefFoundError : com/ibm/mq/MQException in Tomcat 错误

转载 作者:行者123 更新时间:2023-11-28 23:01:07 26 4
gpt4 key购买 nike

我正在运行一个动态 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

我将 com.ibm.mq.jar 添加为外部 jar。有谁知道出了什么问题吗?

最佳答案

您需要将该 jar 标记为需要从项目的部署程序集属性页进行部署。默认情况下,只会将物理上位于 WEB-INF/lib 文件夹中的 jars 部署到服务器。

关于java.lang.NoClassDefFoundError : com/ibm/mq/MQException in Tomcat 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19163010/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com