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.

Bug 125548 - Find Usages doesn't work - JavaServerFaces Support NullPointerException
Summary: Find Usages doesn't work - JavaServerFaces Support NullPointerException
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: _ potingwu
URL:
Keywords:
Depends on: 116418
Blocks:
  Show dependency tree
 
Reported: 2008-01-18 10:44 UTC by dwaszak
Modified: 2008-03-21 17:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dwaszak 2008-01-18 10:44:50 UTC
When I try to find usages of a class, Netbeans showed message:

"Module JavaServer Faces Support threw java.lang.NullPointerException. Please report a bug against JavaServer Faces
Support module and attach your var/log/messages.log."


Content of messages.log file:

SEVERE [global]
java.lang.NullPointerException
	at org.netbeans.modules.web.jsf.refactoring.Occurrences.getAllOccurrences(Occurrences.java:442)
	at org.netbeans.modules.web.jsf.refactoring.JSFWhereUsedPlugin.prepare(JSFWhereUsedPlugin.java:114)
[catch] at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare(AbstractRefactoring.java:380)
	at org.netbeans.modules.refactoring.api.AbstractRefactoring.prepare(AbstractRefactoring.java:202)
	at org.netbeans.modules.refactoring.spi.impl.ParametersPanel$Prepare.run(ParametersPanel.java:760)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)


The error was repeatable (even if i tried to find usage of different class).

Project is a maven2 web application, created in Eclipse, and opened in NB.


---
Product Version: NetBeans IDE 6.0 (Build 200711261600)
Java: 1.5.0_14; Java HotSpot(TM) Client VM 1.5.0_14-b03
System: Windows XP version 5.1 running on x86; Cp1250; pl_PL (nb)
---
Comment 1 novakm 2008-01-21 15:15:09 UTC
Reassigning to web-jsf for evaluation
Comment 2 _ potingwu 2008-01-22 19:36:58 UTC
I cannot reproduce it on regular NetBeans projects. Please attach your 'Eclipse Maven2' web project for further evaluation.
Comment 3 _ potingwu 2008-01-22 19:52:43 UTC
Does the workaround in issue#116418 work for you? I.e., remove the namespace of your faces-config.xml file.
Comment 4 _ potingwu 2008-01-23 17:34:49 UTC
Still waiting for more information from the reporter to get further investigation.
Comment 5 dwaszak 2008-01-25 12:35:12 UTC
As far as I know this is not an JSF project. 

For sure it does not have faces-config.xml file. 

It is a webapp, built using freemarker templates. 

It is a commercial project (I'm only a consultant) hence I can not attach any sources. 

But I can provide you with most of configuration files - but I need to know which one you would like to see.


Comment 6 _ potingwu 2008-03-21 17:23:13 UTC
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.