Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 178231 - Code editor unexpectedly stops to recognize taglibs
Code editor unexpectedly stops to recognize taglibs
Product: web
Classification: Unclassified
Component: HTML Editor
PC Windows Vista
: P2 (vote)
: 6.x
Assigned To: Marek Fukala
Depends on:
  Show dependency treegraph
Reported: 2009-12-07 05:42 UTC by averri
Modified: 2010-01-27 04:18 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT

Complete project, in order to reproduce the issue. (535.24 KB, application/octet-stream)
2009-12-10 07:15 UTC, averri

Note You need to log in before you can comment on or make changes to this bug.
Description averri 2009-12-07 05:42:32 UTC
The code completion fails when using JSF tags (example: Richfaces).

I'm using a Maven based web project with Facelets and Richfaces. 

The code editor stops to recognize the Richfaces tags when editing the corresponding ".xhtml" file.
Comment 1 Jindrich Sedek 2009-12-08 08:01:12 UTC
Could you attach sample project or at least pom.xml of your maven project and some XHTML file where you can reproduce the problem?

I've created new Web Maven Application in NetBeans
added rich faces dependency:
and configured maven repository based on this wiki:
and I can see rich faces components in HTML cc correctly
Comment 2 kpolice 2009-12-08 08:43:11 UTC
The version of richfaces you are trying is old, try the latest one 3.3.2.SR1


The code completion works just fine in 6.8 RC1 with all JSF tags I have tried but in RC2 only the standard tags are recognized. It happens with any XHTML file.
Comment 3 Marek Fukala 2009-12-08 09:46:14 UTC
I also cannot make it work, but because of the library is never downloaded properly. Even following the jsedek's steps there is still a small "-" sign at the library in the library node. The editing support cannot work without the local file.

Reporter, can you confirm that you have the file downloaded locally?

BTW as for it used to work in RC1 but not now... that's really strange since there were very few changes between if any related to the jsf support. Can you please doublecheck the SAME configuration doesn't work in FCS and does in RC1?

Comment 4 Marek Fukala 2009-12-08 10:02:13 UTC
OK, adding the proper repositories directly to the pom.xml in the project and forcing to download them by "Download Missing Libraries" action on Libraries node helped.

Now the all the three richfaces-api/impl/ui-3.3.2.SR1.jar are downloaded locally, properly indexed and all the JSF support works fine including the completion.

The truth is that I am using dev build, but it should be almost identical to FCS, jsedek will hopefuly verify the 3.3.2 version on real FCS build.

Reporter, please attach your project if you can still reproduce. Closing as worksforme.
Comment 5 Jindrich Sedek 2009-12-09 02:12:36 UTC
I've tried the newest version of rich faces on FCS and it works well for me as well
Comment 6 averri 2009-12-10 07:15:30 UTC
Created attachment 92384 [details]
Complete project, in order to reproduce the issue.

The attached file contains the Maven project related to the issue.
Comment 7 averri 2009-12-10 07:18:29 UTC
Dear Netbeans team,

I would like to request you to re-check this issue. I'm sending my project attached, and you can try to reproduce the issue with Netbeans 6.8-RC2.

Instructions to reproduce the error:

1) It's a Maven based web project, so you will need to install Maven (I'm using v2.2.1).

2) Open the project with Netbeans 6.8-RC2 and then open the file 'web pages/admin/cadastro-evento.xhtml'. At this moment, everything is fine, Netbeans will recognize all the Richfaces tags.

3) Do a 'clean and build' project using right mouse button.

4) After the 'clean and build' has finished, go to the end of line 19, hit 'Enter' to write a new line.

5) Save the file.

6) Remove the line you have entered in item (4).

7) Save the file.

At this moment, Netbeans will not recognize the Richfaces any more.

TIPS.: If you have problem in downloading library dependencies with Maven, please let me know. I don't know if all dependencies could be found in repositories.
Comment 8 Marek Fukala 2009-12-10 08:18:00 UTC
Reproducible using the reporters steps.

The problem is the 'nekohtml' library which depends on xerces implementation if you exclude the xercesImpl-2.8.1.jar from the libraries everything works fine.

Otherwise there is a clash in the xml parsers:

INFO [null]: Error parsing facelets library descriptor
java.lang.ClassCastException: org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
	at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
	at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)
	at org.netbeans.modules.web.jsf.editor.facelets.mojarra.ConfigManager$ParseTask.getDocument(
	at org.netbeans.modules.web.jsf.editor.facelets.mojarra.ConfigManager$
Caused: com.sun.faces.config.ConfigurationException: Unable to parse document 'jar:file:/Users/marekfukala/.m2/repository/org/richfaces/ui/richfaces-ui/3.3.2.SR1/richfaces-ui-3.3.2.SR1.jar!/META-INF/jsp.taglib.xml': org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
	at org.netbeans.modules.web.jsf.editor.facelets.mojarra.ConfigManager$
	at org.netbeans.modules.web.jsf.editor.facelets.mojarra.ConfigManager$
	at java.util.concurrent.FutureTask$Sync.innerRun(
	at org.netbeans.modules.web.jsf.editor.facelets.mojarra.ConfigManager.getConfigDocuments(
Caused: java.util.concurrent.ExecutionException
	at java.util.concurrent.FutureTask$Sync.innerGet(
	at java.util.concurrent.FutureTask.get(
	at org.netbeans.modules.web.jsf.editor.facelets.mojarra.ConfigManager.getConfigDocuments(
	at org.netbeans.modules.web.jsf.editor.facelets.FaceletsLibrarySupport.parseLibraries(
	at org.netbeans.modules.web.jsf.editor.facelets.FaceletsLibrarySupport.findLibraries(
	at org.netbeans.modules.web.jsf.editor.facelets.FaceletsLibrarySupport.getLibraries(
	at org.netbeans.modules.web.jsf.editor.JsfSupport.getFaceletsLibraries(
Comment 9 Marek Fukala 2009-12-10 08:20:18 UTC
I belive this is not a stopper issue. Can someone from QE express an opinion please?
Comment 10 Marek Fukala 2009-12-10 08:22:58 UTC
BTW Jindro, have you happened to encounter such issue already? I remember showing me similar issue once. Have you filed an issue? Thanks.
Comment 11 Jindrich Sedek 2010-01-18 09:00:27 UTC
Unfortunatelly I remember some problems with xerces in automated tests, but I don't remember filling any issue about it. 

Now I'm able to reproduce the problem using reporters speps in 6.8FCS. 

Thanks a lot, averri!

I'm no more able to reproduce the problem in dailies. Marku did you already fixed it? If we had a fix it would be good to put it into patch1.
Comment 12 Marek Fukala 2010-01-18 09:20:20 UTC
I recon issue #179223 could have done that, even if it looks unlikely and unrelated. Already added to the patch.
Comment 13 Jindrich Sedek 2010-01-19 05:28:04 UTC
I'm still able to reproduce the problem in 68_fixes branch after the fix of issue #179223. It seems there is some other fix that makes it running in trunk
Comment 14 Marek Fukala 2010-01-19 08:21:42 UTC
I admit I'm not aware of any such change which would fix the issue. I've fixed issue #179510 (Avoid service loading while parsing libraries) as an attempt to solve the problem.

Since according to Jindra, the issue is not reproducible in trunk (web-main), I'm going to transplant the fix into the release68 patch 1 branch so Jindra can verify. If it didn't help, I would revert the change. Is that OK for you Petre?
Comment 15 Marek Fukala 2010-01-20 02:15:49 UTC
I've tested the issue on release68_fixes branch and the issue is still reproducible there. After transplanting fix of issue #179510 the issue is not reproducible. 

I've agreed with jsedek I'll push the transplant changeset into the release68_fixes repository and he'll verify it again once there is a build with the change.

Comment 16 Jindrich Sedek 2010-01-27 04:18:35 UTC
verified in 68_fixes build
NetBeans IDE 6.8 (Build 201001261800)

as well as in trunk

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo