spring 和 iBatis 集成 AnnotationMethodHandlerExceptionResolver$1

发布于 2024-10-30 16:01:16 字数 3475 浏览 0 评论 0原文

我是 spring 和 iBatis 的新手。我正在尝试集成两者,并且我已经放置了所有需要的 jar。但它仍然抛出以下异常。 我想我错过了一个相应的罐子。但我无法弄清楚。任何人都可以帮助我解决这个问题吗?

org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver$1
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:839)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause 

java.lang.NoClassDefFoundError: org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver$1
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.findBestExceptionHandlerMethod(AnnotationMethodHandlerExceptionResolver.java:176)
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.doResolveException(AnnotationMethodHandlerExceptionResolver.java:131)
    org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:136)
    org.springframework.web.servlet.DispatcherServlet.processHandlerException(DispatcherServlet.java:987)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:811)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause 

java.lang.ClassNotFoundException: org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver$1
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.findBestExceptionHandlerMethod(AnnotationMethodHandlerExceptionResolver.java:176)
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.doResolveException(AnnotationMethodHandlerExceptionResolver.java:131)
    org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:136)
    org.springframework.web.servlet.DispatcherServlet.processHandlerException(DispatcherServlet.java:987)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:811)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

提前致谢。 贾纳尔丹。

I am new to spring and iBatis.I am trying to integrate both and i have placed all the needed jars.But still it is throwing the following exception.
I think i miised a corresponding jar.But i am unable to figure it.Can any one please help me regarding this.

org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver$1
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:839)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause 

java.lang.NoClassDefFoundError: org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver$1
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.findBestExceptionHandlerMethod(AnnotationMethodHandlerExceptionResolver.java:176)
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.doResolveException(AnnotationMethodHandlerExceptionResolver.java:131)
    org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:136)
    org.springframework.web.servlet.DispatcherServlet.processHandlerException(DispatcherServlet.java:987)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:811)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause 

java.lang.ClassNotFoundException: org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver$1
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.findBestExceptionHandlerMethod(AnnotationMethodHandlerExceptionResolver.java:176)
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.doResolveException(AnnotationMethodHandlerExceptionResolver.java:131)
    org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:136)
    org.springframework.web.servlet.DispatcherServlet.processHandlerException(DispatcherServlet.java:987)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:811)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

Thanks in advance.
Janardhan.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜点 2024-11-06 16:01:16

我假设您使用的是 spring-3.0 (因为旧版本中不存在此类),因此缺少的类位于 spring-webmvc-3.xxjar 中,例如:

http://repo1.maven.org/maven2/org/springframework/spring- webmvc/3.0.5.RELEASE/

I assume you are using spring-3.0 (as this class doesn't exist in older versions), so the missing class is in spring-webmvc-3.x.x.jar, e.g.:

http://repo1.maven.org/maven2/org/springframework/spring-webmvc/3.0.5.RELEASE/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文