facebook

Unable to initialize TldLocationsCache: error in opening Zip

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #239221 Reply

    I’m seeing this error at the top of a JSP that’s including a jsp:

    Unable to initialize TldLocationsCache: error in opening Zip file. NOTE: No JSP line number was available so line 1 was used for the marker.

    
    <%@ include file="/WEB-INF/jsp/include.jsp"%>
    

    I have checked the forums and read the following

    http://www.myeclipseide.com/modules.php?op=modload&name=PNphpBB2&file=viewtopic&t=9440

    which resolved the problem. However my project is also a web project with spring capabilities enabled. I am using eclipse 3.1.0 myeclipse 4.0.1 on XP. However this problem reoccurs eveytime i restart the ide or do a project clean etc which is becoming a bit confusing when error reporting and also a little annoying. Is there a perminent work around to this ?

    cheers

    #239338

    Riyad Kalla
    Member

    This error is actually somewhat generic and can be caused by a few factors, please have a look at the following threads:

    https://www.genuitec.com/forums/topic/closed-myeclipse-does-not-recognize-tld-files-in-jar/&highlight=

    and:

    http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-3347-highlight-tldlocationscache.html

    #239358

    Hi

    I have taken a look at the the links you suggest, which kind of hint at either a corrupted jar or an incorrectly configured application. However this problem occurs if i use the wizard to create a web project and the wizard to add spring capabilities. Does this suggest that one of the jars is corrupt. If so does thatn mean i need to reinstall myeclispe or replace the default jars? When i started my project i followed the spring mvc tutorial from the spring website, using the above wizards and the problem occured then with the basic example, so i guess it could easily be recreated. Not to worry its not to much of a problem to remove validation markers evertime, and i will have a go at replacing the default myeclipse spring jars with the jars from spring.

    thanks again

    Andy

    #239368

    Riyad Kalla
    Member

    Andy,
    Let me take a whack at that project that has problems, see if I can figure out what is going on. Please export it to a zip and email it to support@genuitec.com ATTN Riyad with a link to this thread.

    #239529

    Riyad Kalla
    Member

    Andy,
    I took a look at the project and was unable to get it working, odly enough, I created a new web project, added JSTL libs to it and created the JSP files in the same location, using copy-paste to move the contents over and viola… it worked fine.

    There could be something stale in the workspace or a stray setting in the project, but this workaround might heklp you get working fast.

    #239930

    Paul
    Participant

    Riyad,

    I’ve also been going around on this (or something similiar) for the last week or so – and following a few threads on here that seem to detail similiar issues. Like most of the others, I’m working on a Spring project – mine was created using MyEclipse’s wizard (1st created new web project, then added spring capabilities, then hibernate…).

    I seem to alternate between two different errors, depending on the steps I take below. They are either Unable to initialize TldLocationsCache: error in opening zip file OR Unable to initialize TldLocationsCache: invalid END header (bad central directory offset)

    As a sanity check I created a couple of test projects to try and figure this out. It seems to occur only when adding ‘Spring Capabilities’ using the MyEclipse wizard. The basic steps:

    1) Create a web project, and add two files to the web-root: index.jsp, and taglibs.jsp.
    The taglibs.jsp contains:
    <%@ page language=”java” import=”java.util.*” pageEncoding=”UTF-8″%>
    <%@ taglib prefix=”c” uri=”http://java.sun.com/jstl/core&#8221; %>
    <%@ taglib prefix=”fmt” uri=”http://java.sun.com/jstl/fmt&#8221; %>

    To index.jsp, I simply added:
    <%@ include file=”taglibs.jsp” %>

    2) I manually validate index.jsp, and no errors.
    3) Right-Click on the project, add Spring Capabilities. I chose just core, and web – and accepted defaults of “Adding checked libraries to build path” and “Tag Library Location at /WebRoot/WEB-INF”. I also created a new aplication-context.xml file in webroot/WEB-INF.
    4) W/o adding any Spring related taglib declarations to taglibs.jsp or index.jsp, I went back to those files. Initially there is no error, until I started editing the file or force validation. The above error is then displayed, and only on the <%@ include … location.

    I’m on Linux, Eclipse Version: 3.1.0 Build id: I20050627-1435, and MyEclipse 4.0.2.

    #239967

    Riyad Kalla
    Member

    pwoods,
    Thank you for the detailed steps, a few notes:

    1) You didn’t add JSTL 1.0 to your project, which is what you are referencing here in your taglibs.jsp file, so I added them in my project.

    4) Yes, I was able to reproduce, this, I will file this as a high priority item right now.

    #239969

    Riyad Kalla
    Member

    It seems this was discovered and fixed and will be in our 4.0.3 release.

    #240058

    Paul
    Participant

    @support-rkalla wrote:

    pwoods,
    Thank you for the detailed steps, a few notes:

    1) You didn’t add JSTL 1.0 to your project, which is what you are referencing here in your taglibs.jsp file, so I added them in my project.

    My steps apparently weren’t detailed enough – I had them in mine as well 🙂

    @support-rkalla wrote:

    4) Yes, I was able to reproduce, this, I will file this as a high priority item right now.

    Thanks for the followup – I’m just glad someone else was able to see this. Any idea on when the 4.0.3 release will be out?

    A feature request – have you thought about making your available JSP templates (or any others for that matter) dependent on features currently enabled/added to the current project? For example, if my project has been toggled for Spring through myeclipse, but Struts hasn’t – don’t show me the Struts JSP templates, keep just the vanilla or Spring related ones. If I’ve added JSTL 1.0 or 1.1 (they’re different URIs) files to my project, allow JSPs with those already declared. This is a pretty small thing, but could be one of those nice touches.

    #240071

    This was a very timely post.
    I have run into the same issue.
    Please tell me when 4.0.3 will be available.

    Thank you all so much.

    #240084

    Riyad Kalla
    Member

    4.0.3 should be out by the end of the week.

    A feature request – have you thought about making your available JSP templates (or any others for that matter) dependent on features currently enabled/added to the current project? For example, if my project has been toggled for Spring through myeclipse, but Struts hasn’t – don’t show me the Struts JSP templates, keep just the vanilla or Spring related ones. If I’ve added JSTL 1.0 or 1.1 (they’re different URIs) files to my project, allow JSPs with those already declared. This is a pretty small thing, but could be one of those nice touches.

    Yes, it just boils down to prioritization and resource management. I don’t envy the guys that have to decide what gets worked on and what doesn’t, our list of things todo are ALL excellent items, it’s a tricky business.

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: Unable to initialize TldLocationsCache: error in opening Zip

You must be logged in to post in the forum log in