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.
All <h:> items (such as <h:head> or <h:body>) show up as errors (Error Message: "The component library Html Basic does not contain such a component") in a Maven JSF 2.0 project. Reproduce 1. Install fresh nightly Netbeans 6.8 (I used 200911170201) 2. Activate Web and Java SE 3. Add Glassfish v3 Server 4. Create a new Maven Web Application 5. Go to properties > Frameworks (of the newly created project) 6. Add "JSF ServerFaces" 7. Open the index.xhtml file (under "Web Pages") Results: Basic .xhtml file show with 2 errors; 1 for the <h:head> and one for the <h:body> When I put my mouse cursor over the error, I get the message "The component library Html Basic does not contain such a component" Expected Results: No errors Notes: - I first saw this bug in 200911160201 build and is still appearing in 200911170201 build - This bug does NOT happen in 200911091156 build
Additional note: This bug does not occur in native NetBeans Web Application projects (only Maven Web Applications)
I fixed this yesterday - see issue #176891 However the problem with the h:body and h:head being underlined remains since the library descriptor in the currently bundled jsf2.0 impl in glassfish are obsolete (the issue already fixed in Mojarra). I'll keep this issue opened for the jsf-imp.jar update task.
This issue should be P1, since most of XHTML files are full of false errors in maven projects, we should keep this issue open till we get bundled new version of glassfish with new version of Mojara.
Cc'ing Alexey, who will be updating the JSF 2.0.x library.
FYI.... I JUST updated my dev NetBeans to 200911171401 and I updated my JSF 2.0 jar dependencies, in my pom.xml, to the latest version of Mojarra (2.0.2-b05) and I STILL get errors on <h:***>
That's correct - the bundled jsf2.0 library which is used as a fallback when there isn't any jar file providing the descriptors is found on the classpath hasn't been updated yet so it still contains the old descriptors. The only way how you can NOW get rid of the problem is to use a build which contains the fix of issue 176992 (fixed before few hours) and then add a dependency to mojarra2.0.2-05 artifact.
Incorrectly marked missing attribute "contentType" in this code should be also fixed in new version of moraja: ---------------------- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:f="http://java.sun.com/jsf/core"> <f:view contentType="text/html; charset=iso-8859-1"/> </html> ---------------------
(In reply to comment #4) > Cc'ing Alexey, who will be updating the JSF 2.0.x library. Library updated by Nov 18th nightly bits.
The issue is already fixed - the bundled web.jsf20 library has been updated, and the latest GF bundled with IDE already contains the updated Mojarra's descriptors.
This bug STILL exists in 200911220201 (following "Reproduce" steps in the first comment)
Other notes: I was able to make the bug go away if I changed the version number of the dependencies in the the pom.xml FROM: <dependency> <groupId>javax.faces</groupId> <artifactId>jsf-api</artifactId> <version>2.0</version> </dependency> <dependency> <groupId>com.sun.faces</groupId> <artifactId>jsf-impl</artifactId> <version>2.0.2-b02</version> </dependency> TO: <dependency> <groupId>javax.faces</groupId> <artifactId>jsf-api</artifactId> <version>2.0.2-b07</version> </dependency> <dependency> <groupId>com.sun.faces</groupId> <artifactId>jsf-impl</artifactId> <version>2.0.2-b07</version> </dependency> SO.... In my opinion... The default versions of the jsf-impl and jsf-api need to be fixed/updated (set to 2.0.2-b07 (or greater) when adding JSF framework on a Maven Web application) in order to mark this bug fixed.
It looks like this depends on bug 177141. Cc'ing Milos.
com.sun.faces:jsf-impl:2.0.2-b07 seems to be present in the java.net repository so we only need to update the jsf20 lib's pom volume. however I could not find the javax.faces:jsf-api:2.0.2-b07 artifact in the repository.
(In reply to comment #13) > com.sun.faces:jsf-impl:2.0.2-b07 > seems to be present in the java.net repository so we only need to update the > jsf20 lib's pom volume. > > however I could not find the > javax.faces:jsf-api:2.0.2-b07 artifact in the repository. I've found it under com/sun/faces pushed into web-main here the diff for QE to review: http://hg.netbeans.org/web-main/rev/1e6ef46b794d
Verified by QE at web-main.
the fix look ok to me, approved. fixed in release68#31ee994757b8
Verified at the release68 by QE.
Integrated into 'main-golden', will be available in build *200911251400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/1e6ef46b794d User: Alexey Butenko <alexeybutenko@netbeans.org> Log: #177018: Updated pom values
I know this bug has been marked as fixed but I am still having this problem in 7.0 Beta. My dependencies include: <dependency> <groupId>com.sun.faces</groupId> <artifactId>jsf-api</artifactId> <version>2.1.0-SNAPSHOT</version> <type>jar</type> </dependency> </dependency> <dependency> <groupId>com.sun.faces</groupId> <artifactId>jsf-impl</artifactId> <version>2.0.2-b10</version> </dependency> Which according to the comments above should fix this problem. Should this bug be reopened?
I have this problem too with my maven web project. Version: Dev 201011280001. All my xhtml files show error in editor at h:head, and h:body lines. 'Error: Element head from namespace http://java.sun.com/jsf/html not allowed as child of XHTML element "html" in this context ....' Sure, h:head is an not xhtml element, so the message is correct. Same case for h:body. At DOCTYPE line a warning says: 'skipping entity [dtd]' I don't know what this exactly means. The 'solution' is: at this DOCTYPE line click on the warning icon, and switch off the xhtml syntax check. I don't know whether is it the right way.
the original issue has been fixed, what you report is a duplicate of another issue 192486 - Common JSF elements such as h:head and h:body elements are marked as errors