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 clicking in a EL expression (JSF app), the IDE reports a nullpointer exception: java.lang.NullPointerException at org.netbeans.modules.web.jsf.editor.jspel.JSFBeanCache.getBeans(JSFBeanCache.java:66) at org.netbeans.modules.web.jsf.editor.jspel.JSFELExpression.findContext(JSFELExpression.java:89) at org.netbeans.modules.web.core.syntax.completion.ELExpression.parse(ELExpression.java:195) at org.netbeans.modules.web.jsf.editor.jspel.JSFJSPHyperlinkProvider.isHyperlinkPoint(JSFJSPHyperlinkProvider.java:140) at org.netbeans.lib.editor.hyperlink.HyperlinkOperation.findProvider(HyperlinkOperation.java:279) at org.netbeans.lib.editor.hyperlink.HyperlinkOperation.performHyperlinking(HyperlinkOperation.java:227) at org.netbeans.lib.editor.hyperlink.HyperlinkOperation.mouseMoved(HyperlinkOperation.java:212) at java.awt.AWTEventMulticaster.mouseMoved(AWTEventMulticaster.java:272) at java.awt.Component.processMouseMotionEvent(Component.java:5599) at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3144) at java.awt.Component.processEvent(Component.java:5323) at java.awt.Container.processEvent(Container.java:2010) at java.awt.Component.dispatchEventImpl(Component.java:4021) at java.awt.Container.dispatchEventImpl(Container.java:2068) at java.awt.Component.dispatchEvent(Component.java:3869) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3949) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866) at java.awt.Container.dispatchEventImpl(Container.java:2054) at java.awt.Window.dispatchEventImpl(Window.java:1774) at java.awt.Component.dispatchEvent(Component.java:3869) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) And does not follow the link. When opening the same app/jsp in NB 5.5.1, the editor opens the desired class and go to the correct method.
Which build do you use? Please write a build number. I fixed this similar NPE at 18th October. It should be already fixed.
I'm using NetBeans beta2. I downloading the daily build to try. Thanks.
The bug persists on the daily build (200711071200) java.lang.NullPointerException at org.netbeans.modules.web.jsf.editor.jspel.JSFBeanCache.getBeans(JSFBeanCache.java:74) at org.netbeans.modules.web.jsf.editor.jspel.JSFELExpression.findContext(JSFELExpression.java:103) at org.netbeans.modules.web.core.syntax.completion.ELExpression.parse(ELExpression.java:195) at org.netbeans.modules.web.jsf.editor.jspel.JSFJSPHyperlinkProvider.isHyperlinkPoint(JSFJSPHyperlinkProvider.java:138) at org.netbeans.lib.editor.hyperlink.HyperlinkOperation.findProvider(HyperlinkOperation.java:282) at org.netbeans.lib.editor.hyperlink.HyperlinkOperation.performHyperlinking(HyperlinkOperation.java:230) at org.netbeans.lib.editor.hyperlink.HyperlinkOperation.mouseMoved(HyperlinkOperation.java:215) at java.awt.AWTEventMulticaster.mouseMoved(AWTEventMulticaster.java:272) at java.awt.Component.processMouseMotionEvent(Component.java:5562) at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3153) at java.awt.Component.processEvent(Component.java:5286) at java.awt.Container.processEvent(Container.java:1966) at java.awt.Component.dispatchEventImpl(Component.java:3984) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Component.dispatchEvent(Component.java:3819) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3905) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822) at java.awt.Container.dispatchEventImpl(Container.java:2010) at java.awt.Window.dispatchEventImpl(Window.java:1791) at java.awt.Component.dispatchEvent(Component.java:3819) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Thanks, now it's different stacktrace.
In the new version of NB (6.0 RC1), when i sent a issue report, it was identified duplicated of http://www.netbeans.org/issues/show_bug.cgi?id=115182
The problem occurs when the root node of config file is: <faces-config xmlns="http://java.sun.com/JSF/Configuration"> Changing to <faces-config> solve this problem! It should be nice if a hint (bullet) is shown when this situation occurs. Thanks
Aha, probably I now where is the problem. Is your file valid? I mean, when you hit validation button in the toolbar, does it pass? The problem probably is that the JSFBeansCache rely that all the configuration files are valid and there is a model in memory for them. Unfortunately, when a jsf configuration file is not valid, we are not able to parse it and then there is not model in memory. I'm reopening this issue and will look at this.
I've curious about this, since I had the same problem, and verified my XML when using "<faces-config xmlns="http://java.sun.com/JSF/Configuration">": XML checking started. Checking file:/Users/fernando/Biblioteca/Fontes/jBear/web/WEB-INF/managedbeanspaginas.xml... XML checking finished. XML validation started. Checking file:/Users/fernando/Biblioteca/Fontes/jBear/web/WEB-INF/managedbeanspaginas.xml... XML validation finished. No errors were appointed, although I cannot navigate from JSP to source code (NPE).
As discussed with Petr Pisl, the solution should follow xml specification. Which means that if there is an element defining a namespace, then all subelements without a namespace has the same. Therefore, we will always use the namepsace that appears in the <faces-config> for the comparison. I.e., the getQName() method has been restructured. changeset a4c7ae2ae10c in main details: http://hg.netbeans.org/main?cmd=changeset;node=a4c7ae2ae10c changeset 3ce9b72283dd in main details: http://hg.netbeans.org/main?cmd=changeset;node=3ce9b72283dd Please see also issue#116418.