How do I fix a NoSuchMethodError?

前端 未结 29 2928
孤独总比滥情好
孤独总比滥情好 2020-11-21 05:08

I\'m getting a NoSuchMethodError error when running my Java program. What\'s wrong and how do I fix it?

29条回答
  •  礼貌的吻别
    2020-11-21 05:48

    These problems are caused by the use of the same object at the same two classes. Objects used does not contain new method has been added that the new object class contains.

    ex:

    filenotnull=/DayMoreConfig.conf
    16-07-2015 05:02:10:ussdgw-1: Open TCP/IP connection to SMSC: 10.149.96.66 at 2775
    16-07-2015 05:02:10:ussdgw-1: Bind request: (bindreq: (pdu: 0 9 0 [1]) 900 900 GEN 52 (addrrang: 0 0 2000) ) 
    Exception in thread "main" java.lang.NoSuchMethodError: gateway.smpp.PDUEventListener.(Lgateway/smpp/USSDClient;)V
            at gateway.smpp.USSDClient.bind(USSDClient.java:139)
            at gateway.USSDGW.initSmppConnection(USSDGW.java:274)
            at gateway.USSDGW.(USSDGW.java:184)
            at com.vinaphone.app.ttn.USSDDayMore.main(USSDDayMore.java:40)
    
    -bash-3.00$ 
    

    These problems are caused by the concomitant 02 similar class (1 in src, 1 in jar file here is gateway.jar)

提交回复
热议问题