Project development, call WebService, method call reported Java.Lang.NoSucheMethod ..., remember is jar bundle conflict, MAVEN project, a look, this pile of jar package ... With Eclipse's Pom visual interface, Dependency hierarchy see a lot of packet conflicts, starting with the WebService-dependent jar, and following this line of thought, a meal ruled out.
Online Search a few articles, combed the next problem-solving ideas:
1. This method is missing from the class you are tuning, possibly due to the incorrect version of the jar package
2, the project depends on the jar package, A and B packages have the same class (such as Class A), your goal is to call a package a class, the result was loaded after the B package covered, the result of inadvertently called B package a class
3, although the project has only a package, but your application server (container) contains B package, they contain the same class. I know from the Internet that the issue of Cxfwebservice in weblogic9.2
Since this is the case, do not start from the first guessing jar package conflict, but from the lack of methods of the class to start, trace its way.
First look at the wrong things I've come across:
Javax.servlet.ServletException:java.lang.NoSuchMethodError: **.**.client.clientbean.servicesoap.getorderbyid ( jzljava/util/list;) L**/**/client/clientbean/order;
This sentence has a classpath, in addition to the stack information provided in the exception, should be able to quickly locate which package in which class. Take a look in the class and there is no method you want to call (here is Getorderbyid). There are few cases in which there is no method in the package and the method is not expected to be invoked when writing code.
If so, see if the same package exists in the other package, the same class. I encountered today is such a mistake: Oom bag has servicesoap,order package and servicesoap, in the judgment Oom package unused, after, decisive row, the bug solved.
To increase the breadth and depth of knowledge, patient analysis should be the way to quickly solve bugs, everyone.