Eclipse & JSP: java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo. <Init> (Ljava / lang / String; ZLjava / lang / String; ZZ) V
I use Eclipse 3.4 with WTP 3.0.2 and run the rather large Dynamic Web Project. I created a project to access it http://127.0.0.1:8080/share/ , but whenever I do this, 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∗72) 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∗63) at org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:303) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.javahaps14) 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∗28) 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, indicating the cause of the problem is quite difficult. Any ideas to start looking for?
In the end, I answered my own question: the problem was that among the required JARs that I added to Tomcat, there was a conflicting servlet.jar. When I deleted this, the error disappeared.
Have you set the Tomcat path to "Preferences-> Tomcat-> Advanced-> Tomcat base"?
Try clearing this path (reverting to the default configuration) and see if this fixes the problem.
Most likely, the tomcat plugin in eclipse causes a conflict problem, I manage to solve the problem by getting the jar file with the same version and redefine it in the tomcat plugin in eclipse.
I had a similar problem, and I fixed this problem, making sure that I have the correct version of servlet.jar in the class path that is running by my application, and I also saved the old J2EE.jar in the class path, and this causes the main a problem. So I removed it from the class to make sure it uses the default files.
I had the same problem running Eclipse Helios, with Maven processing dependencies and using Jetty as a web server. After upgrading to Spring 3.1, I unexpectedly got this problem, but only on my local development machine.
First, I deleted the Spring folders and the dock in my local maven repository and updated the dependencies, but this did not improve the situation.
Then I just deleted the servlet-api and servlet-api-2.5 folders that come with the berth (but leaving everything else), I got it to work.
Everyone applauds the magic of the class.