This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 188765 - Unable to read "META-INF/c.tld" from JAR file
Summary: Unable to read "META-INF/c.tld" from JAR file
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Martin Fousek
URL:
Keywords: USABILITY
: 207582 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-07-19 14:15 UTC by jyeary
Modified: 2013-03-15 12:18 UTC (History)
11 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Image displaying errror message (94.37 KB, image/png)
2010-07-19 14:15 UTC, jyeary
Details
patch for extending JSP parser CP (719 bytes, patch)
2013-03-04 06:06 UTC, Martin Fousek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jyeary 2010-07-19 14:15:37 UTC
Created attachment 100914 [details]
Image displaying errror message

If you create a Maven Web Application project for Java EE6 it does not contain all of the required dependencies for JSP/JSTL support. The result is an error being displayed on the editor which indicates the following:

Unable to read "META-INF/c.tld" from JAR File "file://javaee-web-api-6.0.jar":org.apache.jasper.JasperException: PWC6169: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV

This can be easily fixed by adding the following dependency,

<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>

I propose adding this dependency with a note so that users can start coding using JSTL without issues from a default project.
Comment 1 jyeary 2010-07-19 14:35:20 UTC
Also, it is not apparent what the issue is with auto-complete without the library.
Comment 2 jyeary 2010-07-19 14:38:57 UTC
I added the scope of provided and it seems to work, but should be validated.
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
<scope>provided</scope>
</dependency>
Comment 3 Petr Jiricka 2010-07-21 13:04:55 UTC
Hi, I am not sure JSTL should be present by default - I think it is better to use a minimal set of APIs and expand it as needed, rather than the other way around. However, you are right that adding JSTL library should be easier. For Ant projects, it is very easy (you go to the Libraries customizer and add JSTL from the list of libraries bundled with the IDE), but for Maven, it is not (you can add it using the NetBeans' built-in Maven repository browser, or by copy/pasting from mvnrepository.com).

We may want to make the task of adding libraries to Maven projects simpler, though I am not sure how exactly. Cc'ing Dafe and David in case they have some ideas.

Either way, this sounds like an enhancement request rather than a defect.
Comment 4 jyeary 2010-07-21 13:45:47 UTC
I would agree that it is more of an enhancement per se. The real issue for me is usability. If a new NB user creates a Maven Web project, it creates a default jsp page. If they try to add any taglibs from the auto-complete, it will add them without a warning that the pom.xml should be updated to use them. As a result, the auto-complete functions do not work. I don't want users to become disillusioned about the ease of use that NB offers.

Perhaps it is more of a general issue, such that if you add functionality from auto-complete like JSF, JSTL, etc., it should add the dependencies to the pom.xml file automatically.

The same issue does not exist with a NB ant project since the libraries from GlassFish are added automatically, but the same issue exists if you use Tomcat for deployment. You would need to add the JSTL 1.1 library to your project to get it to work.
Comment 5 Petr Jiricka 2010-07-21 13:58:29 UTC
Ok, now I see what you mean by the auto-complete. Yes, this is something that could be addressed on the side of the JSP editor, reassigning.
Comment 6 Martin Fousek 2012-05-04 13:54:55 UTC
*** Bug 207582 has been marked as a duplicate of this bug. ***
Comment 7 marcincinik 2012-07-12 08:53:53 UTC
I am still facing the same issue in v7.1.2. Adding taglibs as a dependency did not help which renders JSP editor completely useless.
Comment 8 pns 2013-02-22 18:28:31 UTC
This is still happening in 7.3 and as has been said, adding the taglibs dependency doesn't fix it.
Comment 9 pns 2013-02-23 14:47:55 UTC
(In reply to comment #8)
> This is still happening in 7.3 and as has been said, adding the taglibs
> dependency doesn't fix it.

After much experimenting and searching I finally found a way to solve this.

Adding the following dependency solves the issue:

<dependency>
    <groupId>org.glassfish.web</groupId>
    <artifactId>javax.servlet.jsp.jstl</artifactId>
    <version>1.2.2</version>
    <scope>provided</scope>
</dependency>
Comment 10 Petr Jiricka 2013-03-02 23:13:02 UTC
Thanks a lot, that may be important information. Adding Martin F and Martin J - what do you guys think should be the real solution? Thanks.
Comment 11 Martin Janicek 2013-03-03 09:12:37 UTC
(In reply to comment #10)
> Thanks a lot, that may be important information. Adding Martin F and Martin J -
> what do you guys think should be the real solution? Thanks.

I'm not sure I understand the whole problem. Maven web project is missing some dependencies and thus JSP parser isn't able to resolve JSTL classes? Then we should add these dependencies to the project pom during the creation or is there any technical/logical reason against it?...

BTW: I remember that I have seen similar error badge to the one from the attachement even in my semestral project (!) so the issue has to be there for a long time and affect almost everyone.. we should really fix it
Comment 12 Martin Fousek 2013-03-04 06:05:35 UTC
I would prefer to not include dependency if possible since dependencies like this come from the application server where the app run. In other words we would add Maven dependency because our jspparser is not independent enough.

I vote for fixing this issue by extending JSP parser classpath for JAR required for JSTL processing. This would mean that users can compile their application and JSPs without any error in the IDE and these necessary JARs will be provided by the server once the user deploy the project.

I'm attaching patch. Martin, Petr what do you think about? I would include it into the patch since many users probably can be facing this issue.
Comment 13 Martin Fousek 2013-03-04 06:06:17 UTC
Created attachment 132130 [details]
patch for extending JSP parser CP
Comment 14 Martin Janicek 2013-03-04 07:37:51 UTC
(In reply to comment #12)
> I would prefer to not include dependency if possible since dependencies like
> this come from the application server where the app run. 

Ye, sounds reasonable.

> I'm attaching patch. Martin, Petr what do you think about? I would include it
> into the patch since many users probably can be facing this issue.

Awesome, I just didn't know about such solution, but looks much better than adding additional dependency to the project.
Comment 15 Martin Fousek 2013-03-04 09:13:06 UTC
(In reply to comment #14)
> Ye, sounds reasonable.

Ok, in that case fixed in web-main #deed064ac736.
Marking as patch candidate, I hope this should not broke anything.
Comment 16 Quality Engineering 2013-03-05 01:49:45 UTC
Integrated into 'main-golden', will be available in build *201303042300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/deed064ac736
User: Martin Fousek <marfous@netbeans.org>
Log: #188765 - Unable to read "META-INF/c.tld" from JAR file
Comment 17 Jiri Skrivanek 2013-03-05 11:02:16 UTC
Verified in dev build 201303042300.
Comment 18 Martin Fousek 2013-03-11 14:59:24 UTC
Transplanted:
changeset:   255525:60996fff4aa6
branch:      release73
summary:     #188765 - Unable to read "META-INF/c.tld" from JAR file

changeset:   255526:dec2e4f733ae
branch:      release73
summary:     Spec.version and long description for #188765
Comment 19 Quality Engineering 2013-03-14 21:18:58 UTC
Integrated into 'releases', will be available in build *201303141828* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/60996fff4aa6
User: Martin Fousek <marfous@netbeans.org>
Log: #188765 - Unable to read "META-INF/c.tld" from JAR file
(transplanted from deed064ac736f2f614780d61e856bf7eff208d8f)