Java之NoSuchMethodError

  最近生产环境出现的一个问题,NoSuchMethodError,之前遇到过,大概明白就是方法冲突。这里总结一下,以备学习之用。

错误代码如下:

2018-03-06 08:49:42,052 StateMachine [INFO] <pool-1-thread-17> Execute the exit action of State [id=3602, description=经理审核, type=ACTIVE, entryAction=null, exitAction=com.purang.service.ApplyAction@1d8210ca]
2018-03-06 08:49:42,090 VipOrderDao [INFO] <pool-1-thread-17> getVipIdSql--------------SELECT MAX(SUBSTR(F13,7)) AS maxVipCode FROM PT646 WHERE F13 LIKE 'CUN999%'
2018-03-06 08:49:42,093 CompanyRelationCommon [INFO] <pool-1-thread-17> queryCompanyAccountSql: SELECT group_concat(A.F1) AS userId FROM PT611 A INNER JOIN PT612 B ON A.F1 = B.F2 WHERE A.F3='1' AND B.F3 = '1460963820548'
2018-03-06 08:49:42,299 CompanyRelationCommon [INFO] <pool-1-thread-17> updateVipCompanyInfo run sql:INSERT INTO 646 (`1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `11`, `12`, `13`, `10`) values ('2120885369581604170', '1460963820548', '天津冀物金属材料有限公司', '1', '1', '1', '20171214101356', '20181213101356', '2', '20180306084942', '20180306084942', 'CUN9999000222', '4801')
2018-03-06 08:49:42,299 CompanyRelationCommon [INFO] <pool-1-thread-17> updateVipCompanyInfo run sql:UPDATE 4220 SET `5`='20171214',`8`='20180306084942',`3`='1',`6`='20181213' WHERE `1`='6489035456463223854'
2018-03-06 08:49:42,299 CompanyRelationCommon [INFO] <pool-1-thread-17> updateVipCompanyInfo run sql:INSERT INTO 4221 (`14`, `4`, `6`, `11`, `12`, `15`, `16`, `10`, `1`, `3`, `9`, `5`, `7`, `2`) values ('20180306084942', '0', '9', '公司与公司增加关联', '1504140194', '20171115', '20171115', '20181213', '-4952877293210257747', '0', '20171214', '8000', '-8151486671848314970', '-2642380714459001050')
2018-03-06 08:49:42,299 CompanyRelationCommon [INFO] <pool-1-thread-17> updateVipCompanyInfo run sql:UPDATE 4220 SET `5`='20171214',`8`='20180306084942',`3`='1',`6`='20181213' WHERE `1`='6489035456463275726'
2018-03-06 08:49:42,299 CompanyRelationCommon [INFO] <pool-1-thread-17> updateVipCompanyInfo run sql:INSERT INTO 4221 (`14`, `4`, `6`, `11`, `12`, `15`, `16`, `10`, `1`, `3`, `9`, `5`, `7`, `2`) values ('20180306084942', '0', '9', '公司与公司增加关联', '1504140194', '20171115', '20171115', '20181213', '-3992637677303253456', '0', '20171214', '8000', '-8151486671848314970', '7263082683045032240')
2018-03-06 08:49:42,302 ClaimCommonUpdateService [INFO] <pool-1-thread-17> updateLinkCustomerByrefresh===> {"companyId":"1460963820548","employeeNo":"1504140194","linkIsClaim":"0","isClaim":"0","devCategory":"B","enterHallTime":"20180202120200","customerAttr":"","refreshAll":true}
2018-03-06 08:49:42,304 AbstractRequest [ERROR] <nioEventLoopGroup-4-3> <com.purang.func.ApproveCompanyRequest@123842bf> java.lang.NoSuchMethodError: com.purang.claim.data.ClaimTableDao.updateCompanyClaimInfo(Lnet/sf/json/JSONArray;Lnet/sf/json/JSONObject;)Lcom/purang/storm/domains/PTable;
java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: com.purang.claim.data.ClaimTableDao.updateCompanyClaimInfo(Lnet/sf/json/JSONArray;Lnet/sf/json/JSONObject;)Lcom/purang/storm/domains/PTable;
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:202)
at com.purang.request.AbstractRequest.exec(AbstractRequest.java:342)
at com.purang.request.RequestInvoker.exec(RequestInvoker.java:111)
at com.purang.bigada.protocol.version.RequestHandler.doRequest(RequestHandler.java:73)
at com.purang.bigada.protocol.version.SubMessageTypePostHandler.dealSubMessageType(SubMessageTypePostHandler.java:17)
at com.purang.bigada.protocol.version.MessageTypeRequestHandler.dealMessageType(MessageTypeRequestHandler.java:12)
at com.purang.bigada.channel.ExternalReadHandler.channelRead0(ExternalReadHandler.java:31)
at com.purang.bigada.channel.ExternalReadHandler.channelRead0(ExternalReadHandler.java:12)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:244)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:110)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.NoSuchMethodError: com.purang.claim.data.ClaimTableDao.updateCompanyClaimInfo(Lnet/sf/json/JSONArray;Lnet/sf/json/JSONObject;)Lcom/purang/storm/domains/PTable;
at com.purang.service.ClaimCommonUpdateService.updateLinkCustomerByrefresh(ClaimCommonUpdateService.java:675)
at com.purang.service.ClaimCommonUpdateService.updateLinkCustomerAddLinkRelation(ClaimCommonUpdateService.java:142)
at com.purang.service.CompanyRelationCommon.insertRelationBelong(CompanyRelationCommon.java:223)
at com.purang.service.CompanyRelationService.dataStorage(CompanyRelationService.java:348)
at com.purang.service.StrategyContext.dataStorage(StrategyContext.java:26)
at com.purang.service.CompanyCommonService.dealProcess(CompanyCommonService.java:644)
at com.purang.service.CompanyCommonService.saveProcess(CompanyCommonService.java:863)
at com.purang.service.CompanyCommonService.nextStepCommonApply(CompanyCommonService.java:396)
at com.purang.service.CompanyRelationService.updateRelation(CompanyRelationService.java:227)
at com.purang.service.CompanyRelationService.approveProcess(CompanyRelationService.java:192)
at com.purang.service.ApplyCompanyService.approveCompany(ApplyCompanyService.java:183)
at com.purang.func.ApproveCompanyRequest.execute(ApproveCompanyRequest.java:31)
at com.purang.request.AbstractRequest.call(AbstractRequest.java:395)
at com.purang.request.AbstractRequest.call(AbstractRequest.java:40)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
... 1 more

这个一个Javaweb项目,该Java web 项目调用自己开发的jar。在调用过程中,发现此错误。

错误可能的原因:

1.有这个类,该类真的没有这个方法。

2.有这个类,而且有好几个,他们之间发生了冲突。

Java之NoSuchMethodError的更多相关文章

  1. Exception in thread "main" java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V

    在学习CGlib动态代理时,遇到如下错误: Exception in thread "main" java.lang.NoSuchMethodError: org.objectwe ...

  2. java.lang.NoSuchMethodError: org.apache.tomcat.util.res.StringManager.getManager(Ljava/lang/Class;)Lorg/apache/tomcat/util/res/StringManager

    问题: 使用Springboot打包为war部署于Tomcat7中报错 java.lang.NoSuchMethodError: org.apache.tomcat.util.res.StringMa ...

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

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

  4. java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.isAsyncStarted()Z 的解决

    jetty 9 嵌入式开发时,启动正常,但是页面一浏览就报错如下: java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest ...

  5. java.lang.NoSuchMethodError:

    Servlet.service() for servlet [springMVC] in context with path [/mobile] threw exception [Handler pr ...

  6. 关于java.lang.NoSuchMethodError: android.widget.RelativeLayout.setBackground的解决办法

    今天用一个安卓4.0.4版本的手机测试手上的项目,发现logcat弹出这样一个提示“java.lang.NoSuchMethodError: android.widget.RelativeLayout ...

  7. hive 使用where条件报错 java.lang.NoSuchMethodError: org.apache.hadoop.hive.ql.ppd.ExprWalkerInfo.getConvertedNode

    hadoop 版本 2.6.0 hive版本 1.1.1 错误: java.lang.NoSuchMethodError: org.apache.hadoop.hive.ql.ppd.ExprWalk ...

  8. 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 ...

  9. Caused by: java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode

    进行 spring mvc jpa整合时.Junit方法测试时. 异常: org.springframework.beans.factory.BeanCreationException: Error ...

  10. 转:Caused by: java.lang.NoSuchMethodError: org.apache.log4j.Category.log

    Caused by: java.lang.NoSuchMethodError: org.apache.log4j.Category.log出现的异常:java.lang.reflect.Invocat ...

随机推荐

  1. javaScript 计算两个日期的天数相差

    一:计算两个日期相差的天数 1 <html> <head> <meta http-equiv="Content-Type" content=" ...

  2. 洛谷P3195 [HNOI2008]玩具装箱TOY 斜率优化

    Code: #include<cstdio> #include<algorithm> using namespace std; const int maxn = 100000 ...

  3. sublim Text3 配置python3环境

    一.安装Sublime Text 3 1.双击下载的.exe文件安装,安装路径不要有中文目录 2.安装Sublime Text 3时,勾选“Add to explorer context menu”, ...

  4. Linux分布式测试

    在使用Jmeter进行性能测试时,如果并发数比较大(比如最近项目需要支持1000并发),单台电脑的配置(CPU和内存)可能无法支持,这时可以使用Jmeter提供的分布式测试的功能. 执行机和调度机做好 ...

  5. 【BZOJ4864】【BJWC2017】神秘物质 - Splay

    题意: Description 21ZZ 年,冬.小诚退休以后, 不知为何重新燃起了对物理学的兴趣. 他从研究所借了些实验仪器,整天研究各种微观粒子.这一天, 小诚刚从研究所得到了一块奇异的陨石样本, ...

  6. php 流

    php:// — 访问各个输入/输出流(I/O streams) 说明 PHP 提供了一些杂项输入/输出(IO)流,允许访问 PHP 的输入输出流.标准输入输出和错误描述符, 内存中.磁盘备份的临时文 ...

  7. 训练1-B

    杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer). 杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍 ...

  8. C#使用 ComboBox 控件

    Combox控件是一个下拉选择的控件,再做上位机的时候会经常用到,这里记录一下我是怎么用. 1.拉出一个combox控件 2.控件属性选为不可编辑,可编辑的话,你选择下拉框的内容后可以改下拉框里的内容 ...

  9. 今天又犯了Java/Scala里面substring的错误

    每次都误以为是 substring(startIndex, length) 其实是 substring(startIndex, endIndex) 嗯 Java/Scala 跟 C++ 是不一样的.

  10. 【前端福利】用grunt搭建自己主动化的web前端开发环境-完整教程

    jQuery在使用grunt,bootstrap在使用grunt,百度UEditor在使用grunt,你没有理由不学.不用! 1. 前言 各位web前端开发者.假设你如今还不知道grunt或者听说过. ...