The problem encountered this time is still the jar package conflict encountered problems, resulting in the jar package class conflicts so that the method error,java.lang.NoSuchMethodError.
The solution also begins to isolate the jar package, decompile the contents of the jar package and other jar package pairs. It's all in the eye. If there's MAVEN, it's not going to be so much, but.
Another line of projects, the migration to MAVEN can not guarantee that there will not be any moth, it can only be this, will only be the gradual migration of the people.
Later, I wanted to have a way to output the path of the jar where the class is located in Java.
String className = Request.getparameter ("ClassName"); PrintWriter PrintWriter=NewPrintWriter (Response.getwriter ()); if(ClassName = =NULL||Classname.isempty ()) {Printwriter.write ("ClassName shoud be specified"); }Else{Class<?> Clazz =NULL; Try{clazz=Class.forName (className); }Catch(Exception e) {}if(Clazz = =NULL) {printwriter.println (ClassName+ "Not Found"); }Else{Codesource Codesource=Clazz.getprotectiondomain (). Getcodesource (); if(Codesource = =NULL) {printwriter.println (ClassName+ "Location not available"); }Else{String location=codesource.getlocation (). GetPath (); Printwriter.println (ClassName+ "Location:" +Location ); }}} Printwriter.flush ();
This is the core code, originally intended to write an action, see the Internet has to write it into the JSP more convenient.
Problems encountered in telecom projects----->>><2> java.lang.NoSuchMethodError problem Handling