Community
Participate
Working Groups
Using Eclipse SDK 3.7 RC4: (1) Help > About > Installation Details > Installed Software (2) Select one of the listed features (3) Click Uninstall .. (4) In the wizard the appears click on the feature within the list (5) watch this exception: java.lang.ClassCastException: org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement cannot be cast to org.eclipse.equinox.internal.p2.ui.model.AvailableIUElement at org.eclipse.equinox.internal.p2.ui.dialogs.ResolutionStatusPage.setDetailText(ResolutionStatusPage.java:139) at org.eclipse.equinox.internal.p2.ui.dialogs.ResolutionResultsWizardPage$1$1.selectionChanged(ResolutionResultsWizardPage.java:124) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:164) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:162) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2188) at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1211) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1241) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:239) at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:233) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:403) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.equinox.p2.ui.ProvisioningUI.openUninstallWizard(ProvisioningUI.java:264) at org.eclipse.equinox.internal.p2.ui.actions.UninstallAction.performAction(UninstallAction.java:54) at org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction$1$1.run(ProfileModificationAction.java:86) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3563) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3212) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) 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:344) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Created attachment 197727 [details] ResolutionStatusPage I'm not sure what has caused this to be a problem for 3.7 it has barely been touched since 3.6.2. In any case, I've attached a patch which includes a fix and modifies a test (well several to move a method into a super class) to catch this.
Released into head & 3.7 maintenance
*** Bug 349352 has been marked as a duplicate of this bug. ***
*** Bug 350107 has been marked as a duplicate of this bug. ***
*** Bug 351387 has been marked as a duplicate of this bug. ***
*** Bug 354235 has been marked as a duplicate of this bug. ***
*** Bug 365365 has been marked as a duplicate of this bug. ***
REGRESSION: I am seeing this issue again in Eclipse Indigo Service Release 1: VERSION: Version: 3.7.1.r37x_v20110729-9gF7UHOxFtniV7mI3T556iZN9AU8bEZ1lHMcVK Build id: M20110909-1335 MESSAGE: An error has occurred. See error log for more details. org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement cannot be cast to org.eclipse.equinox.internal.p2.ui.model.AvailableIUElement DETAILS FROM LOG: java.lang.ClassCastException: org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement cannot be cast to org.eclipse.equinox.internal.p2.ui.model.AvailableIUElement at org.eclipse.equinox.internal.p2.ui.dialogs.ResolutionStatusPage.setDetailText(ResolutionStatusPage.java:139) at org.eclipse.equinox.internal.p2.ui.dialogs.ResolutionResultsWizardPage$1$1.selectionChanged(ResolutionResultsWizardPage.java:124) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:164) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:162) ... at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
We had problems tagging for the build and the fix did not make it into the 3.7.1 build. I'm not sure if a 3.7.2 build is planned, but the fix does is in the 4.2 and 3.8 builds.
The 'Version' field on this bug still states '3.7' however. I am assuming that field indicates the version of the software the bug is fixed in? If it is indeed only fixed in 3.8 it may help to set that field to that value.
(In reply to comment #10) > The 'Version' field on this bug still states '3.7' however. > > I am assuming that field indicates the version of the software the bug is fixed > in? If it is indeed only fixed in 3.8 it may help to set that field to that > value. No, it means the bug was found in that version. It may be in an older version too, but at least someone has found it in that version anyway.