eclipse和tomcat

c9qzyr3d  于 2021-10-10  发布在  Java
关注(0)|答案(1)|浏览(386)

我正在为一个spring项目从Java8迁移到Java11。我将jdk版本更改为EclipseIDE,甚至将项目和pom.xml文件一起更改。启动项目时,如果有人有想法,我会出现以下错误:

Caused by: java.lang.NoClassDefFoundError: org/springframework/web/context/request/async/CallableProcessingInterceptor
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
at java.lang.Class.getDeclaredFields(Class.java:1916)
at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:104)
at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:137)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:332)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:989)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:303)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5082)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 27 more
72qzrwbm

72qzrwbm1#

在我的例子中,解决方案是在maven的jar中查找类(org/springframework/web/context/request/async/callableprocessinginterceptor),并且在我更新项目并运行后在文件系统中查找war级别的类

相关问题