Bug 133893 - Refactoring(Rename) fails with ClassCastException
Refactoring(Rename) fails with ClassCastException
Status: VERIFIED FIXED
Product: javaee
Classification: Unclassified
Component: Spring
6.x
All All
: P1 (vote)
: 6.x
Assigned To: Andrei Badea
issues@javaee
61fixes1-fixed
:
: 132391 136050 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-25 00:35 UTC by Dongmei Cao
Modified: 2008-06-04 08:33 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
Full exception (2.19 KB, text/plain)
2008-04-25 00:37 UTC, Dongmei Cao
Details
Sample project to reproduce the bug (17.41 KB, application/x-compressed)
2008-04-25 00:38 UTC, Dongmei Cao
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dongmei Cao 2008-04-25 00:35:02 UTC
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
Comment 1 Dongmei Cao 2008-04-25 00:36:19 UTC
The bug is from today (4/22/08)'s main resposity. Not sure if it is also in 6.1
Comment 2 Dongmei Cao 2008-04-25 00:37:06 UTC
Created attachment 60673 [details]
Full exception
Comment 3 Dongmei Cao 2008-04-25 00:38:42 UTC
Created attachment 60674 [details]
Sample project to reproduce the bug
Comment 4 Dongmei Cao 2008-04-25 00:40:22 UTC
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.
Comment 5 Rohan Ranade 2008-04-25 05:32:56 UTC
Occurs in 6.1rc2 as well.
Comment 6 Andrei Badea 2008-04-25 18:04:54 UTC
What, no XMLSyntaxSupport for XML files? Something bad must have happened in the XML area.
Comment 7 Andrei Badea 2008-04-25 19:31:40 UTC
Not reproducible for me with the trunk sources from about two hours ago. Will also try the release61 branch.
Comment 8 John Baker 2008-04-25 19:36:24 UTC
I can reproduce with the the nightly trunk installer build 080425. 
Comment 9 Rohan Ranade 2008-04-25 19:42:18 UTC
what's more, the same scenario passes properly in a Java application project in 6.1 rc2.
Comment 10 Rohan Ranade 2008-04-25 19:55:12 UTC
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?
Comment 11 Andrei Badea 2008-04-25 20:00:34 UTC
Just find it too :-) I think we should try to fix it for 6.1. Rohan, I guess simplest if I take this, agreed?
Comment 12 Rohan Ranade 2008-04-25 20:06:05 UTC
Sure. Reassigning.
Comment 13 Andrei Badea 2008-04-25 20:53:02 UTC
OK, not for 6.1 anymore, so let's target for patch 1. Fixed in trunk.

57c39194c34b
Comment 14 Jan Horvath 2008-04-28 17:00:58 UTC
*** Issue 132391 has been marked as a duplicate of this issue. ***
Comment 15 Jan Horvath 2008-04-28 17:38:09 UTC
verified
Comment 16 Quality Engineering 2008-04-29 04:18:12 UTC
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
Comment 17 pslechta 2008-04-29 11:35:49 UTC
The fix has been ported into the release61_fixes branch.

http://hg.netbeans.org/release61_fixes/rev/b408b8cb84dc
Comment 18 Andrei Badea 2008-05-29 11:52:57 UTC
*** Issue 136050 has been marked as a duplicate of this issue. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo