1. 概述

mvc项目 接口报500 localhost 错误日志

07-Jan-2019 17:12:43.664 SEVERE [catalina-exec-21] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [mvc] in context with path [] threw exception [Handler processing failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.nestedIfOptional()Lorg/springframework/core/MethodParameter;] with root cause
 java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.nestedIfOptional()Lorg/springframework/core/MethodParameter;
    at org.springframework.web.method.annotation.RequestParamMethodArgumentResolver.supportsParameter(RequestParamMethodArgumentResolver.java:137)
    at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.getArgumentResolver(HandlerMethodArgumentResolverComposite.java:135)
    at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.supportsParameter(HandlerMethodArgumentResolverComposite.java:106)
    at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:156)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest$original$pSbDYkME(InvocableHandlerMethod.java:128)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest$original$pSbDYkME$accessor$WWKseQDM(InvocableHandlerMethod.java)
    at org.springframework.web.method.support.InvocableHandlerMethod$auxiliary$Zy6Vi8vw.call(Unknown Source)
    at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.intercept(InstMethodsInter.java:93)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:814)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:737)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:969)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:871)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
    at org.apache.catalina.core.StandardHostValve.invoke$original$umjsuVOU(StandardHostValve.java:141)
    at org.apache.catalina.core.StandardHostValve.invoke$original$umjsuVOU$accessor$UtkajdYr(StandardHostValve.java)
    at org.apache.catalina.core.StandardHostValve$auxiliary$qySWmFHL.call(Unknown Source)
    at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.intercept(InstMethodsInter.java:93)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
    at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2458)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

2. 分析

百度看到有说jar冲突的 受启发

查看pom文件 引入了两个公司的jar

<dependency>
                <groupId>xx</groupId>
                <artifactId>xx-util</artifactId>
                <version>${xx.version}</version>
            </dependency>
            <dependency>
                <groupId>xx-arch</groupId>
                <artifactId>xx-okHttp</artifactId>
                <version>${xx.version}</version>
            </dependency>

进入 上面那个jar A的pom 文件 发现 已经对下面那个jar B 进行了封装 重复了

3. 解决方案

去掉上面那个jar A,   reboot  ok了

java.lang.NoSuchMethodError 报500的更多相关文章

  1. 【原】tomcat 7 启动报错:java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig的解决

    现象: tomcat 7 启动报错:java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig() ...

  2. tomcat7 启动项目报错 java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()

    JDK版本:jdk1.8.0_77 Tomcat 版本:apache-tomcat-7.0.47 异常重现步骤: 1.完成项目部署 2.启动Tomcat 异常头部信息:java.lang.NoSuch ...

  3. cxf 报错:java.lang.NoSuchMethodError: org.apache.ws.commons.schema.XmlSchemaCollection.read(Lorg/w3c/dom/Document;Ljava/lang/String;)

    由于没有仔细查看官方提供的文档,由jdk版本不一致导致的出错: http://cxf.apache.org/cxf-316-release-notes.html 自己使用的是jdk1.8. 报Exce ...

  4. tomcat 7 启动报错:java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig的解决

    现象: tomcat 7 启动报错:java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig() ...

  5. 报错:Sqoop2 Exception: java.lang.NoSuchMethodError Message: org.apache.hadoop.security.authentication.client.Authenticator

    报错过程: 进入sqoop2之后, 输入命令:show connector,报错 报错现象: Exception has occurred during processing command Exce ...

  6. SpringBoot报错:java.lang.NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String;

    错误:java.lang.NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String ...

  7. pagehelper调用mybatis报错java.lang.NoSuchMethodError:org.apache.ibatis.reflection.MetaObject.forObject

    最近在升新的基础框架到spring cloud,启动时pagehelper报错,如下: java.lang.NoSuchMethodError:org.apache.ibatis.reflection ...

  8. Spring boot Unable to start embedded Tomcat报错 java.lang.NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()

    Spring boot Unable to start embedded Tomcat 报错 java.lang.NoSuchMethodError: javax.servlet.ServletCon ...

  9. spring Boot启动报错Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.getAnnotationAttributes

    spring boot 启动报错如下 org.springframework.context.ApplicationContextException: Unable to start web serv ...

随机推荐

  1. eclipse代码中使用到Launcher获取类加载器,找不到启动器类。

    解决:移除系统依赖的jar包,重新导入. 只需要在project build path中先移除JRE System Library,再添加库JRE System Library,重新编译后就一切正常了 ...

  2. 安装vue后报错 bash: vue: command not found

    今天参照之前写的vue的环境搭建一个新的项目  http://www.cnblogs.com/stella1024/p/7570884.html 安装完vue,并提示成功: $ npm install ...

  3. POJ 1221

    #include <iostream> #define MAXN 500 using namespace std; unsigned dp[MAXN][MAXN]; int main() ...

  4. 用asp.net core 2.0 + EFCore.Sqlite做个小网站

    许久没用C#写程序.听说进来发生大事,.NetCore2.0发布了,于是便学习了下,本站也应运而生. 大多数的地方按照官方的文档起步走就可以了,这里谈谈遇到的几个坑. 首先,本站是基于ASP.NetC ...

  5. 安装Hive-0.10.0-CDH4.5.0所遇异常

    Note: 虚拟机访问Win7中mysql(root用户+密码) hive出现异常1: FAILED: Error in metadata: java.lang.RuntimeException: U ...

  6. diskpart 格式化u盘 制作u盘启动盘方法

    1.cmd 2.diskpart 3.list disk 4.select disk [index]   注:[index] 磁盘索引号 5.clean 6.create partition prim ...

  7. Java之IO(十一)BufferedReader和BufferedWriter

    转载请注明源出处:http://www.cnblogs.com/lighten/p/7074488.html 1.前言 按照字节流的顺序一样,字符流也提供了缓冲字符流,与字节流不同,Java虽然提供了 ...

  8. Java学习之路(十二):IO流<三>

    复习:序列流 序列流可以把多个字节输入整合成一个,从序列流中读取到数据时,将从被整合的第一个流开始读取,读完这个后,然后开始读取第二个流,依次向后推. 详细见上一篇文章 ByteArrayOutput ...

  9. Vue的Computed的使用

    Vue的Computed的使用 相关Html: <!DOCTYPE html> <html lang="en"> <head> <meta ...

  10. SQL中存储过程和函数的区别

    转:https://www.cnblogs.com/jacketlin/p/7874009.html 本质上没区别.只是函数有如:只能返回一个变量的限制.而存储过程可以返回多个. 而函数是可以嵌入在s ...