日食与 JSP: java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo.(Ljava/lang/String;ZLjava/lang/String;ZZ)V

发布于 2024-07-07 13:16:47 字数 3067 浏览 6 评论 0原文

我正在使用 Eclipse 3.4 和 WTP 3.0.2 并运行一个相当大的动态 Web 项目。 我已经设置了该项目,以便可以通过 http://127.0.0.1:8080/share/ 访问它 但每当我这样做时,我都会收到以下错误:

  java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo.(Ljava/lang/String;ZLjava/lang/String;ZZ)V
  at org.apache.jasper.compiler.TagLibraryInfoImpl.createAttribute(TagLibraryInfoImpl.java:572)
  at org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:401)
  at org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:248)
  at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:162)
  at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:423)
  at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
  at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1552)
  at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
  at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
  at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
  at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155)
  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
  at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
  at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
  at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
  at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
  at java.lang.Thread.run(Unknown Source)

由于上述文件都不是我自己的,因此很难指出问题的原因。 有什么想法从哪里开始寻找吗?

I'm using Eclipse 3.4 with WTP 3.0.2 and running a fairly large Dynamic Web Project. I've set up the project so that I can access it at http://127.0.0.1:8080/share/ but whenever I do, I get the following error:

  java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo.(Ljava/lang/String;ZLjava/lang/String;ZZ)V
  at org.apache.jasper.compiler.TagLibraryInfoImpl.createAttribute(TagLibraryInfoImpl.java:572)
  at org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:401)
  at org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:248)
  at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:162)
  at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:423)
  at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
  at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1552)
  at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
  at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
  at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
  at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155)
  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
  at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
  at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
  at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
  at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
  at java.lang.Thread.run(Unknown Source)

As none of the above files is my own, pointing out the cause of the problem is quite hard. Any ideas where to start looking?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

千と千尋 2024-07-14 13:16:47

我最终回答了我自己的问题:问题是我添加到 Tomcat 的必要 JAR 中有一个冲突的 servlet.jar。 当我删除它时,错误消失了。

I ended up answering my own question: the problem was that among the necessary JARs that I had added to Tomcat was a conflicting servlet.jar. When I removed this, the error disappeared.

烟─花易冷 2024-07-14 13:16:47

您是否在“首选项->Tomcat->高级->Tomcat基础”中设置了Tomcat路径?

尝试清理该路径(恢复到默认配置),并检查是否可以解决问题。

Did you set a Tomcat path in "Preferences->Tomcat->Advanced->Tomcat base" ?

Try to clean that path (getting back to default configuration), and check if that does solve the problem.

写给空气的情书 2024-07-14 13:16:47

最有可能的是eclipse中的tomcat插件导致了冲突问题,我设法通过获取相同版本的jar文件并在eclipse中的tomcat插件中覆盖它来解决问题。

most probably the tomcat plugin in the eclipse cause the conflict problem, i manage to solve the problem by getting the same version jar file and override it in the tomcat plugin in the eclipse.

御弟哥哥 2024-07-14 13:16:47

我遇到了类似的问题,并且通过确保我的应用程序所采用的类路径中具有正确版本的 servlet.jar 并且我保留了旧的 J2EE.jar 来解决了这个问题 文件在类路径中,这导致了主要问题。 因此,我将其从类路径中删除,以确保它使用默认文件。

I had similar problem and I had fixed this problem by Ensuring that i have correct version of servlet.jar in the classpath that is being taken by my application and also i had kept old J2EE.jar file in the classpath and that was causing the main problem. Hence I removed it from the classpath to ensure that it uses by default files.

烟火散人牵绊 2024-07-14 13:16:47

我在运行 Eclipse Helios 时遇到了同样的问题,使用 Maven 处理依赖项并使用 Jetty 作为网络服务器。 更新到 Spring 3.1 后我突然遇到了这个问题,但仅限于我的本地开发机器。

我首先删除了本地 Maven 存储库中的 spring 和 jetty 文件夹并更新了依赖项,但这并没有改善情况。

然后我刚刚删除了jetty附带的servlet-api和servlet-api-2.5文件夹(但保留了其他所有内容),我就让它工作了。

所有人都为类路径的魔力欢呼。

I had the same problem running Eclipse Helios, with Maven handling dependencies and using Jetty as webserver. After updating to Spring 3.1 I suddenly got this problem, but only on my local development machine.

I first deleted the spring and jetty folders in my local maven repository and updated the dependencies, but that didn't improve the situation.

Then I just deleted the servlet-api and servlet-api-2.5 folders that comes with jetty (but leaving everything else), I got it to work.

All hail the magic of the classpath.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文