2011-09-14 71 views
0

我正在使用jboss-5.1.0.GA和j2sdk1.4.2_06。org.apache.jasper.JasperException:無法初始化TldLocationsCache:java.util.zip.ZipException:無效項CRC

我的應用程序已成功部署,但在瀏覽我的應用程序時出現錯誤。

http://localhost:8080/esm/

提供了以下錯誤,請幫助。

org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: java.util.zip.ZipException: invalid entry CRC (expected 0x47d80677 but got 0x7815789e) 
    org.jboss.web.tomcat.service.jasper.TagLibCache.init(TagLibCache.java:106) 
    org.jboss.web.tomcat.service.jasper.TagLibCache.getLocation(TagLibCache.java:83) 
    org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:549) 
    org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:428) 
    org.apache.jasper.compiler.Parser.parseDirective(Parser.java:491) 
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1438) 
    org.apache.jasper.compiler.Parser.parse(Parser.java:137) 
    org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255) 
    org.apache.jasper.compiler.ParserController.parse(ParserController.java:103) 
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:171) 
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:333) 
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:313) 
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:300) 
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585) 
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312) 
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322) 
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249) 
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 


root cause 

org.apache.jasper.JasperException: java.util.zip.ZipException: invalid entry CRC (expected 0x47d80677 but got 0x7815789e) 
    org.jboss.web.tomcat.service.jasper.TagLibCache.scanJar(TagLibCache.java:343) 
    org.jboss.web.tomcat.service.jasper.TagLibCache.processTldsInFileSystem(TagLibCache.java:268) 
    org.jboss.web.tomcat.service.jasper.TagLibCache.processTldsInFileSystem(TagLibCache.java:261) 
    org.jboss.web.tomcat.service.jasper.TagLibCache.init(TagLibCache.java:101) 
    org.jboss.web.tomcat.service.jasper.TagLibCache.getLocation(TagLibCache.java:83) 
    org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:549) 
    org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:428) 
    org.apache.jasper.compiler.Parser.parseDirective(Parser.java:491) 
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1438) 
    org.apache.jasper.compiler.Parser.parse(Parser.java:137) 
    org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255) 
    org.apache.jasper.compiler.ParserController.parse(ParserController.java:103) 
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:171) 
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:333) 
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:313) 
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:300) 
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585) 
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312) 
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322) 
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249) 
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 
root cause 
java.util.zip.ZipException: invalid entry CRC (expected 0x47d80677 but got 0x7815789e) 
    java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:381) 
    java.util.zip.ZipInputStream.read(ZipInputStream.java:148) 
    java.util.jar.JarInputStream.read(JarInputStream.java:177) 
    java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:92) 
    java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:70) 
    java.util.jar.JarInputStream.getNextEntry(JarInputStream.java:118) 
    java.util.jar.JarInputStream.getNextJarEntry(JarInputStream.java:149) 
    org.jboss.web.tomcat.service.jasper.TagLibCache.scanJar(TagLibCache.java:324) 
    org.jboss.web.tomcat.service.jasper.TagLibCache.processTldsInFileSystem(TagLibCache.java:268) 
    org.jboss.web.tomcat.service.jasper.TagLibCache.processTldsInFileSystem(TagLibCache.java:261) 
    org.jboss.web.tomcat.service.jasper.TagLibCache.init(TagLibCache.java:101) 
    org.jboss.web.tomcat.service.jasper.TagLibCache.getLocation(TagLibCache.java:83) 
    org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:549) 
    org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:428) 
    org.apache.jasper.compiler.Parser.parseDirective(Parser.java:491) 
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1438) 
    org.apache.jasper.compiler.Parser.parse(Parser.java:137) 
    org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255) 
    org.apache.jasper.compiler.ParserController.parse(ParserController.java:103) 
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:171) 
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:333) 
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:313) 
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:300) 
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585) 
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312) 
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322) 
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249) 
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 

感謝answe,但即使加入之後,我得到的錯誤。

org.apache.jasper.JasperException:無法編譯類JSP:在線路發生

錯誤:在生成的java文件 方法getJspApplicationContext(ServletContext中)54是未定義的類型JspFactory 177在生成的java文件 在類型的方法_jspx_meth_bean_005fmessage_005f1(JspTag,PageContext中)mainMenu_jsp不適用於參數(FormTag,PageContext中)

:在線路發生

錯誤

回答

1

web-inf/lib我Jar文件已損壞。

因此得到了異常:

org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: java.util.zip.ZipException: invalid entry CRC (expected 0x47d80677 but got 0x7815789e) 

要解決這個問題:

嘗試提取(-xvf)或上市(-tf)出web-inf/lib所有的罐子。

任何在列表或提取時給出zip例外的jar文件都是損壞的。

1

需要在jboss5 default/deployers/jboss.deployer/web.xml添加

<init-param> 
    <param-name>engineOptionsClass</param-name> 
    <param-value> 
     org.jboss.web.tomcat.service.jasper.JspServletOptions</param-value> 
</init-param> 

之後添加

<init-param> <param-name>engineOptionsClass</param-name> 
    <param-value>org.jboss.web.tomcat.tc5.jasper.JspServletOptions 
    </param-value> 
</init-param> 
+0

添加後我得到這個錯誤,請幫助java.lang.ClassNotFoundException:org.jboss.web.tomcat.tc5.jasper.JspServletOptions –