Community
Participate
Eclipse IDE
I have a feature that includes a linux, win32, nl1, and nl2 child features (listed in that order). When installing the feature on a win32 platform, an ArrayStoreException (see trace below) is thrown which causes the feature to be disabled. java.lang.ArrayStoreException at java.util.ArrayList.toArray(ArrayList.java:337) at org.eclipse.update.core.Feature.getRawIncludedFeatureReferences (Feature.java:631) at org.eclipse.update.core.Feature.getIncludedFeatureReferences (Feature.java:1039) at org.eclipse.update.internal.core.ConfiguredSite.configure (ConfiguredSite.java:247) at org.eclipse.update.internal.core.ConfiguredSite.install (ConfiguredSite.java:157) at org.eclipse.update.internal.core.ConfiguredSite.install (ConfiguredSite.java:86) at org.eclipse.update.internal.operations.InstallOperation.execute (InstallOperation.java:72) at com.ibm.rcp.update.UpdateChecker.doInstallOperation (UpdateChecker.java:1155) at com.ibm.rcp.update.UpdateChecker.doDiscreteInstallOperations (UpdateChecker.java:1094) at com.ibm.rcp.update.UpdateChecker.updateSilently (UpdateChecker.java:1045) at com.ibm.rcp.update.UpdateChecker.doCheck(UpdateChecker.java:785) at com.ibm.rcp.update.UpdateManager.doUpdate(UpdateManager.java:251) at com.ibm.rcp.update.UpdateManagerProvider$UpdateProvisioningOperation.launchUpda teManager(UpdateManagerProvider.java:107) at com.ibm.rcp.update.UpdateManagerProvider$UpdateProvisioningOperation.run (UpdateManagerProvider.java:60) at com.ibm.rcp.pagebuilder.requirements.DefaultFeatureHandler.run (DefaultFeatureHandler.java:231) at com.ibm.rcp.pagebuilder.requirements.PageRequirementsManager$RequirementsOperat ion.run(PageRequirementsManager.java:315) at com.ibm.rcp.install.personality.InstallProvisioningPage$CDInstallTask.run (InstallProvisioningPage.java:329) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:113) This is caused by the following: The TargetFeature's included feature refs list contains the following: UpdateSiteIncludedFeatureReference (linux feature), IncludedFeatureReference (win32 feature), UpdateSiteIncludedFeatureReference (nl1 feature), UpdateSiteIncludedFeatureReference (nl2 feature) (in that order). When Feature.getRawIncludedFeatureReferences is called, it tries to create an array of type UpdateSiteIncludedFeatureReference (first listed feature reference) and fails because the second listed feature reference is an IncludedFeatureReference. Note that if the win32 child feature was listed first and you installed on win32, then the array would be an IncludedFeatureReference array and we would not have any problems. I'll attach a screen shot of my debug env.
Created attachment 29451 [details] debug screen shot
Created attachment 29456 [details] patch for Feature Doug, I created this patch that I believe will solve your problem. To try it out get update core source from eclipse CVS and apply this patch to src/org/eclipse/update/core/Feature.java. If you don't have time for this it should be in the next nightly build.
Can we backport this fix to the 3.1.x stream?
Seems simple enough - I think we can.
Fixed in HEAD and backported to 3.1.2.
*** Bug 129372 has been marked as a duplicate of this bug. ***