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.
To reproduce: - create a new web project with Spring Web MVC framework selected - create a new Java class - try to refactor the new class to some other name. - the following exception happens when click on Preview or Refactor button. java.lang.ClassCastException: org.netbeans.editor.ext.ExtSyntaxSupport at org.netbeans.modules.spring.beans.editor.SpringXMLConfigEditorUtils.getDocumentRoot(SpringXMLConfigEditorUtils.java:168) at
The bug is from today (4/22/08)'s main resposity. Not sure if it is also in 6.1
Created attachment 60673 [details] Full exception
Created attachment 60674 [details] Sample project to reproduce the bug
You can use either the described steps or the attached project to reproduce the bug. If you use the attached project, try to rename the Java class Tester. That'll get you the exception.
Occurs in 6.1rc2 as well.
What, no XMLSyntaxSupport for XML files? Something bad must have happened in the XML area.
Not reproducible for me with the trunk sources from about two hours ago. Will also try the release61 branch.
I can reproduce with the the nightly trunk installer build 080425.
what's more, the same scenario passes properly in a Java application project in 6.1 rc2.
Cause (and workaround) found: After creating a new web project, navigate to the project properties -> Spring framework customizer -> Configuration files section. This list incorrectly lists the index.jsp as a spring configuration file. Once you remove the index.jsp and retry the action, it works. Does this need to be release noted?
Just find it too :-) I think we should try to fix it for 6.1. Rohan, I guess simplest if I take this, agreed?
Sure. Reassigning.
OK, not for 6.1 anymore, so let's target for patch 1. Fixed in trunk. 57c39194c34b
*** Issue 132391 has been marked as a duplicate of this issue. ***
verified
Integrated into 'main-golden', available in NB_Trunk_Production #164 build Changeset: http://hg.netbeans.org/main/rev/57c39194c34b User: Andrei Badea <abadea@netbeans.org> Log: #133893: Refactoring(Rename) fails with ClassCastException
The fix has been ported into the release61_fixes branch. http://hg.netbeans.org/release61_fixes/rev/b408b8cb84dc
*** Issue 136050 has been marked as a duplicate of this issue. ***