Eclipse和JSP:java.lang.NoSuchMethodError:javax.servlet.jsp.tagext.TagAttributeInfo。<init>(Ljava / lang / String; ZLjava / lang / String; ZZ)V

内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用

  • 回答 (2)
  • 关注 (0)
  • 查看 (141)

我正在使用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)

因为上述文件都不是我自己的,所以指出问题的原因是非常困难的。任何想法从哪里开始寻找?

提问于
用户回答回答于

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

用户回答回答于

您是否在“Preferences-> Tomcat-> Advanced-> Tomcat base”中设置了Tomcat路径?

尝试清理该路径(返回默认配置),并检查是否确实解决了问题。

扫码关注云+社区

领取腾讯云代金券