Debugging java.lang.NoSuchMethodError

首先,先是从IBM网站上扒下来的资料。

What is java.lang.NoSuchMethodError ?
This is an Error. It means that when the code was compiled, the method existed in the class. But when the code was run, the method didn't exist.

 
Why java.lang.NoSuchMethodError happens ? 
 This happens when the referenced class used to compile the code and the class in the class path used to run the code are different. This error is caught by the compiler. this error can only occur at run time if the definition of a class has incompatibly changed.
 
How to debug java.lang.NoSuchMethodError ?
User should check for this possibility whether definition of a class has incompatibly changed.



我遇到这个问题的原因:

.class文件相互之间的版本不匹配。 我遇到的现象是, 在调用某个函数时,这个函数不存在。更换匹配完成版本的模块能解决这个问题。

你可能感兴趣的:(method)