java.lang.NoSuchMethodError: java.lang.NoSuchMethodError
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6200414/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
java.lang.NoSuchMethodError: java.lang.NoSuchMethodError
提问by P Hemans
Running Tomcat 7 through eclipse The error reported is:
通过eclipse运行Tomcat 7 报的错误是:
javax.servlet.ServletException: java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[Lorg/eclipse/jdt/core/compiler/IProblem;
at org.apache.jasper.compiler.JDTCompiler.acceptResult(JDTCompiler.java:341)
I have tried both jasper-jdt-6.0.13.jar and tomcat-6.0.16-jasper-jdt.jar and both report the same error. In a way I shouldn't be surprised because I ran:
我试过 jasper-jdt-6.0.13.jar 和 tomcat-6.0.16-jasper-jdt.jar 都报同样的错误。在某种程度上我不应该感到惊讶,因为我跑了:
jar tf tomcat-6.0.16-jasper-jdt.jar
and it doesn't have the class org.eclipse.jdt.internal.compiler.CompilationResult in it. But this site http://www.java2s.com/Code/Jar/STUVWXYZ/Downloadtomcat6016jasperjdtjar.htmsays it does!!
Can someone tell me what the correct jar file is and where to get it from?
It seems to be a recurring theme. http://www.findjar.comlists a number of jars that purport to have this class - but do not.
并且它没有类 org.eclipse.jdt.internal.compiler.CompilationResult 。但是这个网站http://www.java2s.com/Code/Jar/STUVWXYZ/Downloadtomcat6016jasperjdtjar.htm说确实如此!!
有人能告诉我正确的 jar 文件是什么以及从哪里获取它吗?这似乎是一个反复出现的主题。http://www.findjar.com列出了许多声称有此类的 jar - 但没有。
OK, Found it in jasper-compiler-jdt-5.5.23.jar
好的,在 jasper-compiler-jdt-5.5.23.jar 中找到
采纳答案by P Hemans
Found it in jasper-compiler-jdt-5.5.23.jar
在 jasper-compiler-jdt-5.5.23.jar 中找到它