Unable to read TLD “META-INF/c.tld” from JAR file的
今天重新open project,以前是用jdk1.5、tomcat5开发、部署的,
本次使用jdk1.6、tomcat6部署,结果总是报错,启动时正常,
在通过浏览器访问项目时,出错,
错误信息如下;
解决路径;
在project-name/WEB-INF/lib下jsp-api.jar,就算是在eclipse中Build Path下接触此文件,引入tomcat6中的JSP-API.JAR . SERVLET-API.JAR,
也是不可以的,最后删除project下的此jar,问题解决。
引文如下;
本次使用jdk1.6、tomcat6部署,结果总是报错,启动时正常,
在通过浏览器访问项目时,出错,
错误信息如下;
- 2008-9-22 10:29:23 org.apache.catalina.core.StandardWrapperValve invoke
- 严重: Servlet.service() for servlet jsp threw exception
- org.apache.jasper.JasperException: /index.jsp(2,0) Unable to read TLD "META-INF/c.tld" from JAR file "file:/D:/svnframe/web/WEB-INF/lib/standard-1.1.2.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV
- at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
- at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
- at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
- at org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:334)
- at org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:367)
- at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:475)
- at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1433)
- at org.apache.jasper.compiler.Parser.parse(Parser.java:133)
- at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
- at org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
- at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:153)
- at org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
- at org.apache.jasper.compiler.Compiler.compile(Compiler.java:294)
- at org.apache.jasper.compiler.Compiler.compile(Compiler.java:281)
- at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
- at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
- at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
- at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
- at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
- at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
- at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
- at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
- at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
- at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
- at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
- at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
- at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
- at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
- at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
- at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
- at java.lang.Thread.run(Thread.java:619)
- …
2008-9-22 10:29:23 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /index.jsp(2,0) Unable to read TLD "META-INF/c.tld" from JAR file "file:/D:/svnframe/web/WEB-INF/lib/standard-1.1.2.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
at org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:334)
at org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:367)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:475)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1433)
at org.apache.jasper.compiler.Parser.parse(Parser.java:133)
at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:153)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:294)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:281)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
…
解决路径;
在project-name/WEB-INF/lib下jsp-api.jar,就算是在eclipse中Build Path下接触此文件,引入tomcat6中的JSP-API.JAR . SERVLET-API.JAR,
也是不可以的,最后删除project下的此jar,问题解决。
引文如下;
引用
Unable to read TLD “META-INF/c.tld” from JAR file
I installed the lastest version of JasperServer on my my brand new server based on tomcat6 with jdk6 but on the first page I got the message “Unable to read TLD “META-INF/c.tld” from JAR file…”.
My first try was to downgrade tomcat and jdk to a previous version andit seemed to work. I first thought in a bug somewhere in tomcat and after some time (20 minutes of my precious time!!!!!) my attention got capured by a message in catalina.out “.. file geronimo.jar skiped … contains Servet violation spec….. ”
So JasperServer contains in WEB-INF/lib some servlet libraries?!?! Could be possible it’s not a war made by me so somebody could have made some mistake. Listing the files in WEB-INF/lib i found the entire world of web libraries, included jsp-api. Yes this is the problem!
Tomcat excludes genonimo.jar because it contains Servlet api’s but loads jsp-api located in WEB-INF/lib because no checkis made. No jsp can be compiled because jasper (not jasper reports) compiles from a classloader and jsp-api are located in a different classloader.
Removig jsp-api everything works fine again.
I installed the lastest version of JasperServer on my my brand new server based on tomcat6 with jdk6 but on the first page I got the message “Unable to read TLD “META-INF/c.tld” from JAR file…”.
My first try was to downgrade tomcat and jdk to a previous version andit seemed to work. I first thought in a bug somewhere in tomcat and after some time (20 minutes of my precious time!!!!!) my attention got capured by a message in catalina.out “.. file geronimo.jar skiped … contains Servet violation spec….. ”
So JasperServer contains in WEB-INF/lib some servlet libraries?!?! Could be possible it’s not a war made by me so somebody could have made some mistake. Listing the files in WEB-INF/lib i found the entire world of web libraries, included jsp-api. Yes this is the problem!
Tomcat excludes genonimo.jar because it contains Servlet api’s but loads jsp-api located in WEB-INF/lib because no checkis made. No jsp can be compiled because jasper (not jasper reports) compiles from a classloader and jsp-api are located in a different classloader.
Removig jsp-api everything works fine again.