Community
Participate
Working Groups
Build ID: 1.2.0.20081221-2301 I'm starting a RAP application and receive an ArrayStoreException almost immediately (see below). Likely this is due to some extension that does not provide a class with the correct type. IMHO this case should be checked and ignored (or failed upon) with a log entry that enables the client to find out what he is doing wrong. java.lang.ArrayStoreException at java.lang.System.arraycopy(Native Method) at java.util.ArrayList.toArray(ArrayList.java:304) at org.eclipse.ui.internal.services.WorkbenchServiceRegistry.getSourceProviders(WorkbenchServiceRegistry.java:140) at org.eclipse.ui.internal.services.SourceProviderService.readRegistry(SourceProviderService.java:104) at org.eclipse.ui.internal.Workbench$38.runWithException(Workbench.java:1598) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:32) at org.eclipse.rwt.internal.lifecycle.UICallBackManager.addSync(UICallBackManager.java:135) at org.eclipse.swt.widgets.Display$2.run(Display.java:652) at org.eclipse.rwt.internal.lifecycle.UICallBackServiceHandler.runNonUIThreadWithFakeContext(UICallBackServiceHandler.java:457) at org.eclipse.rwt.lifecycle.UICallBack.runNonUIThreadWithFakeContext(UICallBack.java:44) at org.eclipse.swt.widgets.Display.syncExec(Display.java:650) at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:110) at org.eclipse.ui.internal.Workbench.initializeDefaultServices(Workbench.java:1594) at org.eclipse.ui.internal.Workbench.init(Workbench.java:1294) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2309) at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:2200) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:425) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:333) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:408) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:157) at com.yoxos.server.build.rap.BuildWorkbench.createUI(BuildWorkbench.java:17) at org.eclipse.rwt.internal.lifecycle.EntryPointManager.createUI(EntryPointManager.java:92) at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:228) at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:116) at java.lang.Thread.run(Thread.java:613)
Any steps to reproduce?
I don't think we can do anything about this - this is the original workbench code. Moving to Platform/UI.
The reason for this error was: I had both the rap workbench plug-in and the rcp workbench plug-in in my target platform, and they both provided a CurrentSelectionSourceProvider. Only their super classes where not the same. Obviously this is a problem on my side, but tracking it down would have gone a lot faster with a type check + error message in a way like this: "Plug-in \"org.eclipse.ui.workbench\" provided class \"CurrentSelectionSourceProvider\" which is not a subclass of \"AbstractSourceProvider\""
Created attachment 125850 [details] Patch v01 Patch to do the check and log if the class is of wrong type
Prakash, we don't want to widen the scope of the extension point. I think we should add logging in getSourceProviders() around where we do createExecutableExtension(*) so that we can log the incorrect class and throw it away. PW
Created attachment 126524 [details] Patch v02 (In reply to comment #5) > Prakash, we don't want to widen the scope of the extension point. I think we > should add logging in getSourceProviders() around where we do > createExecutableExtension(*) so that we can log the incorrect class and throw > it away. Done that way
(In reply to comment #6) > Created an attachment (id=126524) [details] > Patch v02 Released to HEAD >20090225 Thanx, Prakash. PW
Verified in I20090310-0100