欢迎来到农夫的博客

半亩方塘一鉴开, 天光云影共徘徊。 问渠哪得清如许? 为有源头活水来!

Java之NoSuchMethodError

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.有这个类,而且有好几个,他们之间发生了冲突。

posted on 2018-03-06 10:57  allTime  阅读(772)  评论(0编辑  收藏  举报

导航