File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes Error loading JSP: Unable to initialize TldLocationsCache: java.util.zip.ZipException: invalid entry Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Error loading JSP: Unable to initialize TldLocationsCache: java.util.zip.ZipException: invalid entry" Watch "Error loading JSP: Unable to initialize TldLocationsCache: java.util.zip.ZipException: invalid entry" New topic
Author

Error loading JSP: Unable to initialize TldLocationsCache: java.util.zip.ZipException: invalid entry

Dhruvin Shah
Greenhorn

Joined: May 11, 2005
Posts: 1
I am getting this error when i am loading JSP file in Jboss 5.


2011-04-11 16:09:42,750 [ajp-lzhita16.hewitt.com%2F10.100.12.28-8409-3] ERROR com.epicentric.template - Style.execute: Primary file [Grid.jsp] for template [epi:template:default_grid_friendly_id] for style [Grid] either could not be compiled or threw a Runtime Exception: java.util.zip.ZipException: invalid entry size (expected 2504523784 but got 4151 bytes)
org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: java.util.zip.ZipException: invalid entry size (expected 2504523784 but got 4151 bytes)
at org.jboss.web.tomcat.service.jasper.TagLibCache.init(TagLibCache.java:106)
at org.jboss.web.tomcat.service.jasper.TagLibCache.getLocation(TagLibCache.java:83)
at org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:549)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:427)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:490)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1437)
at org.apache.jasper.compiler.Parser.parse(Parser.java:135)
at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:171)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:333)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:313)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:300)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
....

Caused by: org.apache.jasper.JasperException: java.util.zip.ZipException: invalid entry size (expected 2504523784 but got 4151 bytes)
at org.jboss.web.tomcat.service.jasper.TagLibCache.scanJar(TagLibCache.java:343)
at org.jboss.web.tomcat.service.jasper.TagLibCache.processTldsInFileSystem(TagLibCache.java:268)
at org.jboss.web.tomcat.service.jasper.TagLibCache.processTldsInFileSystem(TagLibCache.java:261)
at org.jboss.web.tomcat.service.jasper.TagLibCache.init(TagLibCache.java:101)
... 77 more
Caused by: java.util.zip.ZipException: invalid entry size (expected 2504523784 but got 4151 bytes)
at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:376)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:148)
at java.util.jar.JarInputStream.read(JarInputStream.java:177)
at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:92)
at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:70)
at java.util.jar.JarInputStream.getNextEntry(JarInputStream.java:118)
at java.util.jar.JarInputStream.getNextJarEntry(JarInputStream.java:149)
at org.jboss.web.tomcat.service.jasper.TagLibCache.scanJar(TagLibCache.java:324)
... 80 more


JSP Refrence:
<%@ taglib uri="epi-tags" prefix="epi_html" %>

<epi_html:controllerURL/>

web.xml Refrence:
<taglib>
<taglib-uri>epi-tags</taglib-uri>
<taglib-location>/WEB-INF/taglib/taglib.tld</taglib-location>
</taglib>


I double Checked all the Taglib are present in WEB-ING/taglib/ - Folder

Please someone help me ...Thanks in advance


-Dhruvin.



Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1016
The error message is saying something about zip files.
Check your WEB-INF/lib directory to make sure that there are ONLY valid jar files there.

Basically the container goes searching for tag library definition (tld) files in
- your WEB-INF directory
- your web.xml file
- META-INF folder of jar files in your WEB-INF/lib directory

This error looks like it is having trouble reading a jar file while looking for a tld.
Hence you need to check the files in the WEB-INF/lib directory to make sure they are all valid jar files.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error loading JSP: Unable to initialize TldLocationsCache: java.util.zip.ZipException: invalid entry
 
Similar Threads
JasperException
Unable to initialize TldLocationsCache: null
Error Loading jsp file - Unable to initialize TldLocationsCache: null
Problem accessing jsp page in a struts app
org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: java.util.zip.ZipExceptio