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.
Select a class name in a Java source file. Right Click Find Usages. Hit "Find" You get a dialog box with a list of errors/warnings. One warning : Module Web Refactoring threw java.lang.NullPointerException. Please report a bug against Web Refactoring module and attach your var/log/messages.log. Note that most other refactorings / finds seem to have to go through this error too. If the warning is ignored, the correct things appear to happen.
Created attachment 53037 [details] var/log/messages.log file associated with error.
Could you please attach your web.xml or an example of a web.xml file where this happens? Judging from the stacktrace it looks like the servlets in your web.xml file don't have a servlet class element at all, which is required. In any case, the NPE needs to be avoided in web/refactoring.
There are indeed some <servlet> entries in web.xml which don't mention <servlet-class> For instance : <servlet> <servlet-name>docs</servlet-name> <jsp-file>/WEB-INF/index.jsp</jsp-file> <load-on-startup>1</load-on-startup> </servlet> A quick look at http://java.sun.com/dtd/web-app_2_3.dtd - snippet : Used in: web-app --> <!ELEMENT servlet (icon?, servlet-name, display-name?, description?, (servlet-class|jsp-file), init-param*, load-on-startup?, run-as?, security-role-ref*)> appears to me to imply that <jsp-file> is a valid alternative to <servlet-class> ?
Fixed in trunk. You're right in that the jsp-file element is a valid alternative, hence I'm upgrading this to P2. Thanks for reporting and following up on this. Checking in WebRefactoringFactory.java; /cvs/web/refactoring/src/org/netbeans/modules/web/refactoring/WebRefactoringFactory.java,v <-- WebRefactoringFactory.java new revision: 1.21; previous revision: 1.20 done Checking in WebXmlRefactoring.java; /cvs/web/refactoring/src/org/netbeans/modules/web/refactoring/WebXmlRefactoring.java,v <-- WebXmlRefactoring.java new revision: 1.5; previous revision: 1.4 done Checking in rename/RenameItem.java; /cvs/web/refactoring/src/org/netbeans/modules/web/refactoring/rename/RenameItem.java,v <-- RenameItem.java new revision: 1.3; previous revision: 1.2 done
*** Issue 122897 has been marked as a duplicate of this issue. ***
*** Issue 127326 has been marked as a duplicate of this issue. ***
*** Issue 125749 has been marked as a duplicate of this issue. ***
*** Issue 131044 has been marked as a duplicate of this issue. ***
*** Issue 131556 has been marked as a duplicate of this issue. ***
Verified. Product Version: NetBeans IDE Dev (Build 200809180201) Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11 System: Linux version 2.6.24-19-generic running on i386; UTF-8; en_US (nb)