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.
When creating a web project from existing sources the jsp parser throws an exception and the status bar shows the message "PWC6180: Unable to initialize TldLocationsCache" and no code completion can be done for the taglib. When creating a completly new NetBeans Web project, with no initial frameworks, and then add the JSTL lib everything works fine, this exception is never thrown and the jsp editor can code complete tags from the taglib.
Created attachment 54610 [details] screenshot showing the error log in status bar
Hi, is it the project with exsisting sources a specific project? Or it doesn't work for any web project from existing sources?
Hi, sorry for the late response. It is specific web project created outside netbeans. It seems that it is complaining about some of the the tld files residing in WEB-INF/tags. Some of these tld's might be faulty, but NetBeans 5.5.1 managed to parse the tld's that are not faulty and make the tags present in code completion, in NetBeans 6.0 parsing of all taglibs are interrupted and no tags at all are shown in the JSP's editors code completion feature.
How can I reprodue this issue? Is it possible to attach your project please? Please notice that the cache of tag libraries has been rewritten (for more info see issue #123370).
No, it's impossible since it's a proprietary project, another issue is that it's just too big to be attached here. But, as mentioned earlier, the error seems to appear when one or more tag lib descriptors(tld) for custom tags are faulty. In our project they reside in WEB-INF/tags. When one of these are faulty this also affects the jsp code completion for taglibs that are correct defined, such as the JSTL and others. I tried this by creating a web project with JSTL included, then jsp taglib code completion works fine, but when I add custom tags with faulty tld the jsp taglib code completion is not working, not even for JSTL. The strange thing here is that when our project is deployed in tomcat, in my scenario, the app works great in spite of the faulty tld and understand the custom tags anyway. Seems there is something in the NetBeans jsp parser that makes it go wrong. Just a guess.
Thanks for your report - I will look at it.
I tried to reproduce this problem - and in fact you are right. Here is what I did: - create new Web project with Struts framework and all the TLD files - invalidate any of those TLD files (e.g. remove opening root tag) - invoke code completion => error occurs during TLD files reparsing (e.g. "PWC6178: XML parsing error on file /WEB-INF/struts-bean.tld: (line 4, col 6)") Are these steps correct? Well, the question now is what NB should do. I think that probably the best behaviour would be to inform user that an error occured during parsing (there could be problems with I18N here). Any comments/suggestions? Few notes: - I don't think that this issue could be a regression because there were no changes in this area (the only possibility is that jasper's behaviour in NB 5.5 would be different, NB 6.0 uses new version). - corrupted TLD file is not marked as invalid - but I think it should be
Because it's not a regression and because of invalid TLD file - changing priority to P3.
moving opened issues from TM <= 6.1 to TM=Dev
This may be related - i am getting the message "Could not add one or more tag libraries" for the following (simplified) example: <?xml version="1.0" encoding="UTF-8"?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jsp/jstl/core" version="2.0"> <jsp:output doctype-root-element="html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" /> </jsp:root>
Product Version: NetBeans IDE Dev (Build 20110411-95fa2f6ba3a6) Java: 1.6.0_23; Java HotSpot(TM) 64-Bit Server VM 19.0-b09 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) Userdir: C:\Projects\netbeans\web-main\nbbuild\testuserdir Code completion works for me in case of Comment #7 steps. The only issue left is: incorrect TLT file should be marked with error badge. Decreasing priority to P4.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss
I seem to be experiencing this problem under 8.2. The error message is: Unable to read TLD "META-INF/tld/struts-html.tld" from JAR file "file/C:/Program%20Files/NetBeans%208.2/enterprise/modules/ext/struts/struts-taglib-1.3.10.jar: org.apache.jasper.JasperException: PW6112: Failed to load or instantiate TagExtraInfo class org.apache.struts.taglib.html.MessagesTei
Forget my last post please - have fixed it.
Perhaps I should have said that the fix was to put <%@page pageEncoding="UTF-8"%> at the top of the page