10

I'm trying to refactor a package name (pretty near the root of the project hierarchy), and I'm getting the following error (flash builder 4):

A fatal error occurred while performing the refactoring

An unexpected exception occurred while creating a change object.  See the error log for more details.

The log file looks like this....

!ENTRY org.eclipse.ltk.ui.refactoring 4 10000 2010-09-30 10:57:25.134
!MESSAGE Internal Error
!STACK 0
java.lang.reflect.InvocationTargetException
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
    at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.run(RefactoringWizardDialog2.java:330)
    at org.eclipse.ltk.ui.refactoring.RefactoringWizard.createChange(RefactoringWizard.java:583)
    at org.eclipse.ltk.ui.refactoring.RefactoringWizard.computeUserInputSuccessorPage(RefactoringWizard.java:422)
    at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.computeSuccessorPage(UserInputWizardPage.java:74)
    at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.getNextPage(UserInputWizardPage.java:114)
    at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.nextOrPreviewPressed(RefactoringWizardDialog2.java:495)
    at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.access$2(RefactoringWizardDialog2.java:492)
    at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2$1.widgetSelected(RefactoringWizardDialog2.java:691)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:143)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:155)
    at com.adobe.flexbuilder.as.editor.ui.navigator.FlexPackageExplorerRenameAction.renamePackage(FlexPackageExplorerRenameAction.java:171)
    at com.adobe.flexbuilder.as.editor.ui.navigator.FlexPackageExplorerRenameAction.run(FlexPackageExplorerRenameAction.java:143)
    at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:168)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at com.adobe.flexbuilder.standalone.FlexBuilderApplication.start(FlexBuilderApplication.java:109)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Caused by: java.lang.StackOverflowError
    at com.adobe.flexbuilder.codemodel.mxml.MXMLData$2.getMXMLVersion(MXMLData.java:501)
<-- snipped 1022 additional identical lines..-->
    at com.adobe.flexbuilder.codemodel.mxml.MXMLData$2.getMXMLVersion(MXMLData.java:501)
Root exception:
java.lang.StackOverflowError
    at com.adobe.flexbuilder.codemodel.mxml.MXMLData$2.getMXMLVersion(MXMLData.java:501)
<-- snipped 1022 additional identical lines..-->
    at com.adobe.flexbuilder.codemodel.mxml.MXMLData$2.getMXMLVersion(MXMLData.java:501)

Any ideas what is wrong...and what I can do to fix it ? I queried google for it, and didn't turn up anything useful with the parameters I tried.

reidLinden
  • 4,020
  • 4
  • 31
  • 46
  • Does this happen with every refactoring you try? Do you have errors in your code that this might happen? Maybe try to reinstall Flash Builder.. (also I guess this is rather a superuser issue?) – poke Sep 30 '10 at 18:54
  • OUCH! Reinstall Flash Builder? I would hope that would be a last resort. – crackedcornjimmy Sep 30 '10 at 18:57
  • no, further toward the leafs, I can refactor...I am able to refactor an individual file, as well as an edge-most package. – reidLinden Sep 30 '10 at 18:57
  • as a matter of fact, I am able to do the refactors everywhere, but in a single edge-most package...however, all rootward/parent packages are also unable to be refactored – reidLinden Sep 30 '10 at 19:07
  • every single leaf node (file) in that package is able to be refactored. I was hoping one would fail...and leave me with an easy option. No such luck. – reidLinden Sep 30 '10 at 19:21
  • 1
    more weirdness. If I create a new package, OUTSIDE of the entire structure I'm trying to refactor, and move all the content leafs of the failing terminal-package to it, then delete that failing package...I am able to perform the base refactor at will. However, upon re-creating the deleted package (named "orderEntry"), and moving the files back into it....I am once again unable to refactor! (the good news, is I've got the refactor that I NEEDED to get done accomplished..the bad news, I can't do it again, unless I just through all those hoops again!) I'd still like to get this solved, FYI... – reidLinden Sep 30 '10 at 20:21
  • This also happens to me. Exact same error in log. – Jonathan Dumaine Jan 21 '11 at 22:36

3 Answers3

3

You can try to Restart Eclipse. Oddly that fixes a number of issues in Eclipse that happen all of a sudden with no normal explanation.

Kirk
  • 16,182
  • 20
  • 80
  • 112
RZMars
  • 125
  • 8
1

Increase the thread size of the JVM you run your IDE in?

I believe in Eclipse you could do it by adding -Xss with some value to eclipse.ini within your Eclipse installation. The setting is a JVM setting so should be added in the -vmargs section, it might be next to -Xmx which is there by default.

Grzegorz Oledzki
  • 23,614
  • 16
  • 68
  • 106
0

This may not be the best answer, but..I recommend you to try a different IDE like IntelliJ.

I've used Flash Builder before. It had always gave me problem. Usually it's because plug-in incompatible. Running tomcat in it sometimes gives me this "undead" java process that just won't die.

I'm using IntelliJ 9 now. It's autocomplete is less complete than Flash Builder, but it has a much better refactoring feature and..much MUCH better integration with other tools (like Maven).

ming_codes
  • 2,870
  • 25
  • 24
  • thanks for the thought. I've been keeping the idea (hah) of IntelliJ in reserve. I may get there, but I'd have to convince quite a chain of folks that its the best idea, so..... – reidLinden Mar 18 '11 at 12:19