Unable to read TLD “META-INF/c.tld” from JAR file

Unable to read TLD “META-INF/c.tld” from JAR file的

今天重新open project,以前是用jdk1.5、tomcat5开发、部署的,

本次使用jdk1.6、tomcat6部署,结果总是报错,启动时正常,

在通过浏览器访问项目时,出错,

错误信息如下;

Java代码 复制代码
  1. 2008-9-22 10:29:23 org.apache.catalina.core.StandardWrapperValve invoke   
  2.   
  3. 严重: Servlet.service() for servlet jsp threw exception   
  4.   
  5. 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   
  6.   
  7.          at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)   
  8.   
  9.          at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)   
  10.   
  11.          at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)   
  12.   
  13.          at org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:334)   
  14.   
  15.          at org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:367)   
  16.   
  17.          at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:475)   
  18.   
  19.          at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1433)   
  20.   
  21.          at org.apache.jasper.compiler.Parser.parse(Parser.java:133)   
  22.   
  23.          at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)   
  24.   
  25.          at org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)   
  26.   
  27.          at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:153)   
  28.   
  29.          at org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)   
  30.   
  31.          at org.apache.jasper.compiler.Compiler.compile(Compiler.java:294)   
  32.   
  33.          at org.apache.jasper.compiler.Compiler.compile(Compiler.java:281)   
  34.   
  35.          at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)   
  36.   
  37.          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)   
  38.   
  39.          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)   
  40.   
  41.          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)   
  42.   
  43.          at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)   
  44.   
  45.          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)   
  46.   
  47.          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)   
  48.   
  49.          at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)   
  50.   
  51.          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)   
  52.   
  53.          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)   
  54.   
  55.          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)   
  56.   
  57.          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)   
  58.   
  59.          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)   
  60.   
  61.          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)   
  62.   
  63.          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)   
  64.   
  65.          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)   
  66.   
  67.          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)   
  68.   
  69.          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)   
  70.   
  71.          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)   
  72.   
  73.          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)   
  74.   
  75.          at java.lang.Thread.run(Thread.java:619)   
  76.   
  77. …  
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.

你可能感兴趣的:(java,apache,C++,c,C#)