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.
|Summary:||Spurious warning "Unable to load tag handler class"|
|Component:||JSP Parser||Assignee:||issues@javaee <issues>|
|OS:||Windows 10 x64|
|Issue Type:||DEFECT||Exception Reporter:|
Description RayDeCampo 2016-10-25 14:21:41 UTC
When upgrading from NB 8.1 to 8.2 I started to get warnings 'Unable to load tag handler class "[class name]" for tag "<[prefix]:[tagname]>"' in my projects. This warning does not appear when using 8.1. The warning does not appear on all of the JSP pages, I have not been able to discern a pattern. However, when developing the example sited below I noticed that the warning disappeared after opening the project in 8.1, closing 8.1 and opening in 8.2. However a clean and build restored the warning in 8.2. I have developed an example project which exhibits the issue. It is available using: svn export https://github.com/RayDeCampo/netbeans-bugs/trunk/netbeans-templates-link-bug Or whatever other method you prefer to access github. The file index.jsp in the project exhibits the problematic warning.
Comment 1 dylanett 2017-06-14 12:37:42 UTC
I was having this same issue, and it looks like the problem may have been that I still had the <taglib> declaration in my web.xml. This is no longer required and can be removed. When I removed it the error went away and the code highlighting started to work again.
Comment 2 RayDeCampo 2017-06-14 13:07:48 UTC
I tried the trick mentioned by dylanett without success. I noticed that I linked to the wrong example project in the description. Please see: svn export https://github.com/RayDeCampo/netbeans-bugs/trunk/jsptags
Comment 3 PavelCibulka 2017-11-10 07:17:13 UTC
This bug was introduced in 8.2. Modifying web.xml doesn't change anything. It is interesting that Netbeans suggests tag name when you are writing its name. Then you get message that they can't load tag handler class.
Comment 4 stardog 2017-11-22 16:49:00 UTC
Please please please can we fix this bug? This bug causes code suggestions and auto-complete to stop working on 8.2 and really slows down JSP development in the IDE.
Comment 5 ivsky 2019-07-17 04:33:44 UTC
I solved this issue by including the right encoding as the first line of all JSP pages: Ex.: <%@page contentType="text/html" pageEncoding="UTF-8"%> After that, all errors ('Unable to load tag handler class') were gone. Hope this helps someone!
Comment 6 RayDeCampo 2019-07-22 19:30:41 UTC
Thanks ivsky, that was very helpful. I noticed that it was sufficient to add <%@page pageEncoding="UTF-8"%> when appropriate. I still had a few pages for which this did not help. These pages used <%include> directives to include the source of other pages. Note that the other pages did not use tags at all. Converting these to <jsp:include> style includes solved the problem, although I had to shutdown, clear the NetBeans cache and restart to see the file get the green square. I was working with NetBeans 11.1.