Community
Participate
Working Groups
The splash screen appears and also the workspace selection dialog, then the SDK crashes and produces the log below. Since it might be something with the network: I am currently connected with T-Mobile in Germany but the same error occurs if I cut the connection completely and work offline. !SESSION 2010-07-26 16:58:55.883 ----------------------------------------------- eclipse.buildId=I20100718-2237 java.version=1.6.0_21 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE Command-line arguments: -os win32 -ws win32 -arch x86 !ENTRY org.eclipse.ui 4 4 2010-07-26 16:59:11.657 !MESSAGE unsupported: ****MC: bad pie: navigate/ !ENTRY org.eclipse.osgi 4 0 2010-07-26 16:59:13.047 !MESSAGE An error occurred while automatically activating bundle org.eclipse.core.net (39). !STACK 0 org.osgi.framework.BundleException: Exception in org.eclipse.core.internal.net.Activator.start() of bundle org.eclipse.core.net. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:417) at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:265) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:106) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:453) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216) at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393) at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:33) at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:466) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.activateProxyService(IDEWorkbenchAdvisor.java:284) at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.postStartup(IDEWorkbenchAdvisor.java:264) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2448) at org.eclipse.ui.internal.Workbench.access$3(Workbench.java:2329) at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:539) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:525) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) 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:369) 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:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407) Caused by: org.eclipse.e4.core.di.InjectionException: Unable to process "WorkbenchWindow.engine": no actual value was found for the argument "IPresentationEngine". at org.eclipse.e4.core.internal.di.InjectorImpl.reportUnresolvedArgument(InjectorImpl.java:354) at org.eclipse.e4.core.internal.di.InjectorImpl.resolveRequestorArgs(InjectorImpl.java:343) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:93) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:74) at org.eclipse.e4.core.contexts.ContextInjectionFactory.inject(ContextInjectionFactory.java:72) at org.eclipse.ui.internal.Workbench.createWorkbenchWindow(Workbench.java:1149) at org.eclipse.ui.internal.Workbench.getActiveWorkbenchWindow(Workbench.java:1123) at org.eclipse.ui.internal.progress.ProgressManagerUtil.getNonModalShell(ProgressManagerUtil.java:353) at org.eclipse.ui.internal.progress.ProgressManagerUtil.getDefaultParent(ProgressManagerUtil.java:343) at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:950) at org.eclipse.equinox.internal.security.ui.storage.UICallbackProvider$2.run(UICallbackProvider.java:95) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:179) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4584) at org.eclipse.equinox.internal.security.ui.storage.UICallbackProvider.execute(UICallbackProvider.java:90) at org.eclipse.equinox.internal.security.storage.JavaEncryption.init(JavaEncryption.java:88) at org.eclipse.equinox.internal.security.storage.JavaEncryption.decrypt(JavaEncryption.java:175) at org.eclipse.equinox.internal.security.storage.SecurePreferencesRoot.getModulePassword(SecurePreferencesRoot.java:276) at org.eclipse.equinox.internal.security.storage.SecurePreferencesRoot.getPassword(SecurePreferencesRoot.java:224) at org.eclipse.equinox.internal.security.storage.SecurePreferences.get(SecurePreferences.java:262) at org.eclipse.equinox.internal.security.storage.SecurePreferencesWrapper.get(SecurePreferencesWrapper.java:106) at org.eclipse.core.internal.net.ProxyType.loadProxyAuth(ProxyType.java:529) at org.eclipse.core.internal.net.ProxyType.createProxyData(ProxyType.java:148) at org.eclipse.core.internal.net.ProxyType.getProxyData(ProxyType.java:137) at org.eclipse.core.internal.net.ProxyManager.migrateInstanceScopePreferences(ProxyManager.java:453) at org.eclipse.core.internal.net.ProxyManager.checkMigrated(ProxyManager.java:418) at org.eclipse.core.internal.net.ProxyManager.initialize(ProxyManager.java:277) at org.eclipse.core.internal.net.Activator.start(Activator.java:179) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774) ... 38 more Root exception: org.eclipse.e4.core.di.InjectionException: Unable to process "WorkbenchWindow.engine": no actual value was found for the argument "IPresentationEngine". at org.eclipse.e4.core.internal.di.InjectorImpl.reportUnresolvedArgument(InjectorImpl.java:354) at org.eclipse.e4.core.internal.di.InjectorImpl.resolveRequestorArgs(InjectorImpl.java:343) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:93) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:74) at org.eclipse.e4.core.contexts.ContextInjectionFactory.inject(ContextInjectionFactory.java:72) at org.eclipse.ui.internal.Workbench.createWorkbenchWindow(Workbench.java:1149) at org.eclipse.ui.internal.Workbench.getActiveWorkbenchWindow(Workbench.java:1123) at org.eclipse.ui.internal.progress.ProgressManagerUtil.getNonModalShell(ProgressManagerUtil.java:353) at org.eclipse.ui.internal.progress.ProgressManagerUtil.getDefaultParent(ProgressManagerUtil.java:343) at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:950) at org.eclipse.equinox.internal.security.ui.storage.UICallbackProvider$2.run(UICallbackProvider.java:95) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:179) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4584) at org.eclipse.equinox.internal.security.ui.storage.UICallbackProvider.execute(UICallbackProvider.java:90) at org.eclipse.equinox.internal.security.storage.JavaEncryption.init(JavaEncryption.java:88) at org.eclipse.equinox.internal.security.storage.JavaEncryption.decrypt(JavaEncryption.java:175) at org.eclipse.equinox.internal.security.storage.SecurePreferencesRoot.getModulePassword(SecurePreferencesRoot.java:276) at org.eclipse.equinox.internal.security.storage.SecurePreferencesRoot.getPassword(SecurePreferencesRoot.java:224) at org.eclipse.equinox.internal.security.storage.SecurePreferences.get(SecurePreferences.java:262) at org.eclipse.equinox.internal.security.storage.SecurePreferencesWrapper.get(SecurePreferencesWrapper.java:106) at org.eclipse.core.internal.net.ProxyType.loadProxyAuth(ProxyType.java:529) at org.eclipse.core.internal.net.ProxyType.createProxyData(ProxyType.java:148) at org.eclipse.core.internal.net.ProxyType.getProxyData(ProxyType.java:137) at org.eclipse.core.internal.net.ProxyManager.migrateInstanceScopePreferences(ProxyManager.java:453) at org.eclipse.core.internal.net.ProxyManager.checkMigrated(ProxyManager.java:418) at org.eclipse.core.internal.net.ProxyManager.initialize(ProxyManager.java:277) at org.eclipse.core.internal.net.Activator.start(Activator.java:179) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:417) at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:265) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:106) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:453) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216) at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393) at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:33) at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:466) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.activateProxyService(IDEWorkbenchAdvisor.java:284) at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.postStartup(IDEWorkbenchAdvisor.java:264) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2448) at org.eclipse.ui.internal.Workbench.access$3(Workbench.java:2329) at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:539) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:525) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) 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:369) 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:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407) !ENTRY org.eclipse.osgi 4 0 2010-07-26 16:59:13.078 !MESSAGE Application error !STACK 1 java.lang.NoClassDefFoundError: An error occurred while automatically activating bundle org.eclipse.core.net (39). at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.activateProxyService(IDEWorkbenchAdvisor.java:284) at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.postStartup(IDEWorkbenchAdvisor.java:264) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2448) at org.eclipse.ui.internal.Workbench.access$3(Workbench.java:2329) at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:539) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:525) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) 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:369) 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:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
Bug 287720 looks a little bit like this. You said on the list this only fails with Sun/Oracle Java 6 Update 20 or 21? Did you run successfully with other VM versions? Is this a problem that just started happening in a recent Eclipse 4.0 build or it failed in every 4.0 build you have tried?
The problem is that the proxy stuff asks for an active workbench window before it is created by our startup code. Remy, should we be moving the following: "initializationDone = true;" from Workbench.java line 1338 to some other place?
Kai, can you try a new workspace? Does it happen with a new workspace as well?
(In reply to comment #2) > Remy, should we be moving the following: > "initializationDone = true;" > from Workbench.java line 1338 to some other place? It's probably "safe" but postStartup() spec's that the workbench windows are expected to be up and running when the method has been called. Getting a 'null' would not really make sense.
(In reply to comment #4) > It's probably "safe" but postStartup() spec's that the workbench windows are > expected to be up and running when the method has been called. Getting a 'null' > would not really make sense. Well then it looks like we're not honoring that contract, since the workbench windows are not up and running when the code asks for the active workbench window: at org.eclipse.ui.internal.Workbench.createWorkbenchWindow(Workbench.java:1149) at org.eclipse.ui.internal.Workbench.getActiveWorkbenchWindow(Workbench.java:1123) at org.eclipse.ui.internal.progress.ProgressManagerUtil.getNonModalShell(ProgressManagerUtil.java:353)
(In reply to comment #5) > (In reply to comment #4) > > It's probably "safe" but postStartup() spec's that the workbench windows are > > expected to be up and running when the method has been called. Getting a 'null' > > would not really make sense. > > Well then it looks like we're not honoring that contract That's correct. From a preliminary investigation, this seems to be because we require some services from the application that are not available at that time since we bring up the 3.x workbench first before bringing up the e4 workbench.
I put a breakpoint in the WorkbenchWindow constructor to see where we instantiate it on startup, and it looks like it's not very well-defined because it happens in response to an event handler that triggers from a random place (during createGUI). I don't see how we can fix this problem other than by something that has only a local effect in ProgressManagerUtil (e.g. return null for the parent shell).
Created attachment 175257 [details] ProgressManagerUtil patch v1 (In reply to comment #7) > I don't see how we can fix this problem other than by something that has only a > local effect in ProgressManagerUtil (e.g. return null for the parent shell). Agreed. It is too risky to try to fix the startup code at this point.
@Boris, it is the same with a brand new workspace @John, it happens with all Eclipse 4.0 Early Adopter SDKs I have tested so far. JDK 6 Update 20 and 21 are the only JDKs I currently have on my machine. The same happens with RC3, the log is almost the same. I am wondering why I seem to be the only one who experiences this behavior...
(In reply to comment #9) > I am wondering why I seem to be the only one who experiences this behavior... You seem to have some kind of proxy setting that leads to a prompt for a password on startup. Do you get a password prompt when you start Eclipse 3.6? Szymon, can you tell (by looking at the stack trace) how Kai's configuration differs from ours? Is there a workaround that would avoid the failing password prompt?
@Boris, but currently I am using no proxy settings (in IE and Firefox) since I am not behind a firewall. Which proxy settings is a fresh Eclipse 4.0 SDK picking up then?
Kai, Could you please try the following: 1. Open a 3.6 version of Eclipse (one that has no startup problems) 2. Open the preferences dialog and go to General>Security>Secure Storage 3. On the Contents tab near the bottom, note the location of the Equinox secure storage. It should be: <user home>/.eclipse/org.eclipse.equinox.security/secure_storage 4. Quit Eclipse 3.6 5. Rename the secure storage file or move it to another location 6. Start Eclipse 4.0 When you're done trying out Eclipse 4.0, you may want to put the secure storage file back where it was so that you have your passwords again when in 3.6. Sorry for the inconvenience, but unfortunately we've discovered this too late for the release and will have to document this as a workaround. We'll fix it in the 4.1 stream as soon as possible, after the release.
Boris and I were able to reproduce this. => 1. Identifying the problem Start Eclipse 4.0 using a new workspace. If Eclipse instance shuts down after displaying the workspace chooser dialog, check the log file (workspace/.metadata/.log). If it contains a line like: An error occurred while automatically activating bundle org.eclipse.core.net then you probably hitting this bug. => 2. What's happening? The problem is triggered by setting proxy authentication information. The information is written in the secure storage; on Eclipse startup proxy information is needed very early, way before normal workbench services are available. When proxy processing tries to retrieve the encrypted data, the Dysplay#syncExec() call triggers access to non-initialized Workbench which does not go well. => 3. Is there a workaround? The easiest thing to do is to delete or rename the secure storage file. => 3a. If you have an Eclipse 3.x, it can be done via its Preferences dialog: Preferences -> General -> Security -> Secure Storage; "Contents" tab. The secure storage can be deleted by pressing "Delete" button on that page; alternatively, see the "Storage location" field and use the operating system to rename the secure storage file. => 3b. The default location of the secure storage is calculated using Java "user.home" variable: @user.home + ".eclipse\org.eclipse.equinox.security\secure_storage". For instance, on WinXP: C:\Documents and Settings\<user_name>\.eclipse\org.eclipse.equinox.security\secure_storage The operating system than can be used to rename the "secure_storage" file.
Created attachment 175343 [details] Relevant portion of the call stack
The workaround (I just renamed the secure_storage) works well! Thanks a lot!
This boils down to the problem in the workbench lifecycle: the workbench reports being "ready" while it is not. Another, more generic, consequence is the interval in the startup when we have nothing at all on the screen: the splash screen is taken down, but renderers haven't yet produced any actual UI elements. In more details: In 3.x the Workbench#init() method is expected to restore or open at least one window. However, in e4 the WorkbenchWindow is created much later, in fact, as a response to #showTab() call on some random tab. Also, the state of the Workbench after the #init() call does not allow WorkbenchWindow to be created as elements are missed from the context (filled later by renderers). The sequence is: Workbench#runUI() createSplashWrapper() <= splash screen is up init() <= UI is initialized and expected to appear on screen Platform.endSplash(); <= splash screen is down advisor.postStartup(); <= this is there this specific error happen The lifecycle needs to provide initial rendering in the Workbench#init(). Right now, the supposedly initialized workbench misses critical pieces that are filled in by renderers. (IPresentationEngine and IResourceUtilities are the two items I immediately tripped over; there are more.)
Eric, did you have a chance to look into this?
How about we try to turn this on its head. Rather than trying to maintain the existing startup *code*, why not see if we can start up like an e4 RCP app and then after the rendering is done to issue the events / calls in the correct order. In this scenario we would: - Show the splash - Load the model (as many of the compatibility artifacts as we can should be created in synch with the rendering cycle (i.e. WorkbenchWindow, WorkbenchPart...). - Hide the splash - Once the model is loaded we would 'fake' the current startup cycle, making any necessary calls / sending any necessary events... While i recognize that this may introduce some regressions we'll end up in a much better position. The 3.x startup code is *too complex* and needs to be replaced... What issues (aside from the ones on this defect) are we likely to encounter with this approach ??
Just notes from last time. We were only able to get the SDK up if we allowed the Workbench, WorkbenchWindow, and Perspective to initialize the model. When we tried the other way (building the legacy objects around a model) we weren't able to get past the activators of JDT UI (and parts of debug). On top of that, it was not RCP (3.x) compatible at all, since the RCP lifecycle has a number of programmatic hooks that provide in effect large parts of the model for that application. PW
Created attachment 180958 [details] Patch to control whether to use delta & to do a 'direct' load/save The idea is to be able to save the current model state and reload it on startup. Then we can address the issues of trying to instantiate the compatibility elements as part of the rendering stage.
*** Bug 332447 has been marked as a duplicate of this bug. ***
This is my first time with 4.1 (eclipse-SDK-4.1M7-win32.zip). I believe I have also run into this problem with the current release for 4.1M7. The "caused by" in my log file is the same as the initial report. The work around (renaming secure storage file) did work, I am now seeing the workbench. My secure storeage file was created when I started to use GIT. Deleting it is not an option for me. Regards Bill Blalock
(In reply to comment #8) > Created attachment 175257 [details] > ProgressManagerUtil patch v1 I've released this patch so that ProgressManagerUtil won't inadvertently try to create workbench windows. The bug of postStartup() being called at an inopportune time is still there.
To reproduce the problem, I had Eclipse create the secure_storage file for me and then also went to 'General > Network Connections' and added some garbage to the HTTPS setting asking it to require authentication. I then proceeded to the 'General > Security > Secure Storage' preference page and unchecked the 'Windows Integration' checkbox in the 'Password' tab. Unfortunately, the workaround I committed no longer works because it seems Equinox has changed the way they get a modal shell. Instead of going to the ProgressManagerUtil they have changed the code to ask the workbench for its active workbench window directly, walking through the same code path that the workaround was trying to get it to avoid. org.eclipse.e4.core.di.InjectionException: Unable to process "WorkbenchWindow.engine": no actual value was found for the argument "IPresentationEngine". at org.eclipse.e4.core.internal.di.InjectorImpl.reportUnresolvedArgument(InjectorImpl.java:377) at org.eclipse.e4.core.internal.di.InjectorImpl.resolveRequestorArgs(InjectorImpl.java:372) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:97) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:78) at org.eclipse.e4.core.contexts.ContextInjectionFactory.inject(ContextInjectionFactory.java:72) at org.eclipse.ui.internal.Workbench.createWorkbenchWindow(Workbench.java:1172) at org.eclipse.ui.internal.Workbench.getActiveWorkbenchWindow(Workbench.java:1146) at org.eclipse.equinox.internal.security.ui.storage.StorageUtils.getShell(StorageUtils.java:27) at org.eclipse.equinox.internal.security.ui.storage.StorageLoginDialog.<init>(StorageLoginDialog.java:58) at org.eclipse.equinox.internal.security.ui.storage.DefaultPasswordProvider.getPassword(DefaultPasswordProvider.java:44) at org.eclipse.equinox.internal.security.storage.PasswordProviderModuleExt.getPassword(PasswordProviderModuleExt.java:35) at org.eclipse.equinox.internal.security.storage.SecurePreferencesRoot.getModulePassword(SecurePreferencesRoot.java:259) at org.eclipse.equinox.internal.security.storage.SecurePreferencesRoot.getPassword(SecurePreferencesRoot.java:224) at org.eclipse.equinox.internal.security.storage.SecurePreferences.get(SecurePreferences.java:262) at org.eclipse.equinox.internal.security.storage.SecurePreferencesWrapper.get(SecurePreferencesWrapper.java:106) at org.eclipse.core.internal.net.ProxyType.loadProxyAuth(ProxyType.java:537) at org.eclipse.core.internal.net.ProxyType.createProxyData(ProxyType.java:138) at org.eclipse.core.internal.net.ProxyType.getProxyData(ProxyType.java:127) at org.eclipse.core.internal.net.PreferenceManager.migrateInstanceScopePreferences(PreferenceManager.java:292) at org.eclipse.core.internal.net.PreferenceManager.migrate(PreferenceManager.java:260) at org.eclipse.core.internal.net.ProxyManager.checkMigrated(ProxyManager.java:404) at org.eclipse.core.internal.net.ProxyManager.initialize(ProxyManager.java:269) at org.eclipse.core.internal.net.Activator.start(Activator.java:181) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:299) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440) at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:462) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216) at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400) at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35) at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:473) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.activateProxyService(IDEWorkbenchAdvisor.java:290)
Created attachment 196126 [details] Workbench patch v2 Change Workbench's getActiveWorkbenchWindow() method to not try to create a workbench window if the rendering engine isn't available.
(In reply to comment #25) > Created attachment 196126 [details] > Workbench patch v2 Patch released to CVS HEAD. Problem goes away in my inner. Will try again with tonight's build tomorrow.
(In reply to comment #26) > Patch released to CVS HEAD. Problem goes away in my inner. Will try again with > tonight's build tomorrow. Looks okay now with I20110519-2200. The secure storage prompt will come up properly.
One possible way to get code to run after the application is up and running is to implement the StartupMonitor interface and register it as a service with OSGi. Its applicationRunning() method is the way we know that the renderer has completed its rendering process so we could put the postStartup() call in there.
*** Bug 320021 has been marked as a duplicate of this bug. ***
Another test case to demonstrate this issue. Add the following line of code: PlatformUI.getWorkbench().getActiveWorkbenchWindow(); To PerspectiveRegistry.postConstruct() method. Launch a runtime workbench and you will get an InjectionException caused by a NullPointerException in StandardTrim.createStatusLine(). The WorkbenchWindow retrieved from the context is null.
Created attachment 244929 [details] Eclipse project to reproduce the InjectionException I am trying to migrate Eclipse 3.x application to Eclipse 4.x and currently I experiment with Eclipse 4.4. I have followed tutorials that present the migration and currently I am trying to use the Compatibility Layer to run the application with Eclipse 4.4. The attached project represents the minimal example that causes the exception in my application and is similar to the exception encountered in this bug. In my situation it is triggered when invoking openWorkbenchWindow(PERSPECTIVE_ID, null) of IWorkbench: org.eclipse.e4.core.di.InjectionException: Unable to process "PartServiceImpl.engine": no actual value was found for the argument "IPresentationEngine". Can it be caused by missing dependencies, or should the window opening be modified. Would be great to know if this is an actual bug or if the code should be changed.
(In reply to Kris Slowinski from comment #31) > Created attachment 244929 [details] > Eclipse project to reproduce the InjectionException This is a different problem. Could you please open a new bug and we can discuss there. PW
I opened a new bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=439319
This works for me in Luna. Please re-open if you find it reproducible there and we'll get to the bottom of it. PW
The contract for the advisor.postStartup() call back is supposed to have a workbench window open and restored which is not the case as of today Luna's release. because when calling : PlatformUI.getWorkbench().getActiveWorkbenchWindow(), I'll get a null value from org.eclipse.ui.internal.Workbench.getActiveWorkbenchWindow() : // rendering engine not available, can't make workbench windows, see bug // 320932 if (e4Context.get(IPresentationEngine.class) == null) { return null; } Shall I reopen this bug or create a new one for this specific issue ?