hi I am trying to run eclipse pdt on ubuntu 8.04 with sun java 1.6 - the workbench screen loads up for a while and freezes, I get an ".SWTError: XPCOM error -2147467262" after that. Any idea how to get ride of it?
You could try launching eclipse with the -clean tag. That might sort it out. Check out the following:
http://www.eclipsezone.com/eclipse/forums/t61566.html
Alternatively, you can delete the .snap file that exists in your workspace folder. Note this will result in loss of workspace state, but you can recover by reimporting projects, setting up your perspectives again etc... This is really a last resort.
I found that Eclipse wasn't working with the JVM that comes with Ubuntu. Try downloading the Sun JVM and change eclipse to launch with the -vm flag set to the path of the sun JVM.
EDIT: Sorry I see now that you have the sun JVM, you need to launch Eclipse with the -vm flag set.
I got this exact same error from eclipse.
It occurred at launch time, in the case of creating a new workspace as well as the case of opening an existing workspace. However, I noticed that some existing workspaces launched just fine and others did not. New workspaces would get created on disk, but would always fail with this error.
In the cases where I got this error, the .metadata/.log file shows the following:
A bunch of RuntimeExceptions saying "Widget disposed too early!"
Then this:
!ENTRY org.eclpse.osgi 4 0 2009-07-18 20:19:46.003
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTError: XPCOM error -2147467262
at org.eclipse.swt.browser.Mozilla.error(Mozilla.java:1597)
at org.eclipse.swt.browser.Mozilla.setText(Mozilla.java:1820)
...
(This part matches the question in this thread, down to the same error number)
The message above suggesting double-checking the firefox/XulRunner install seems to have some merit here, since the call stack mentions Mozilla a bunch. It also mentions something about an "Intro". More on that below. Unfortunately I'm not sure what to do about this because the environment I'm working in is so closed off that I can't just go download a fresh eclipse install, fresh mozilla libraries, or anything else of the sort.
- Then this:
!ENTRY org.eclipse.osgi 2 0 2009-07-18 20:19:46.694
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2009-07-18 20:19:46.694
!MESSAGE Bundle reference:file:plugins/org.eclipse.jdt.apt.pluggable.core_1.0.100.v20080407-1345.jar [253] was not resolved.
!SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2009-07-18 20:19:46.694
!MESSAGE Missing imported package org.jdt.internal.compiler.tool_0.0.0.
I painstakingly went through the workspace directories for the working and nonworking workspaces, copying things over one by one to the nonworking workspace until I got something that could launch. I did this first at the "plugin directory" level, then again at the individual file level.
I finally narrowed it down to one file that made the difference. That file's relative path within the workspace is .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs
Here are the contents of the file:
#Fri Jul 17 18:48:26 MDT 2009
eclipse.preferences.version=1
showIntro=false
I'm thinking it's got to be all about that "showIntro=false" preference. When I drop that file into a non-working workspace (brand new or preexisting) then I can launch it. This must be related to an intro screen eclipse wants to display. Eclipse must be trying to load some mozilla/firefox-related libraries in order to render this intro screen, and that's where it's failing. Adding this little preference to skip that step enables Eclipse to start up.
Questions still unresolved on my end:
- Why did this suddenly start happening? It was working one day, then I started getting this error. What might have changed out from under me? The eclipse install is in my home directory, not under the control of a sysadmin. Was it a new jvm?
- How can I make this "showIntro=false" a default at the eclipse-installation level rather than at the workspace level? It is incredibly annoying to have to drop this file into a new workspace after creating it and getting this error immediately.
- How can I attack the root cause and allow eclipse to successfully display the intro screen?
Much thanks to anyone who may give further help on this!
Update: I just got this error code again from another part of eclipse. Not too surprising, since my earlier answer addressed a symptom rather than the cause.
It came up while going through the plugin development "cheat sheets". In a task called "Create a plug-in extension" I got to the step, 'Click the "Add" button to open the "New Extension" wizard'.
That opened an error dialog titled "Problem Occurred" saying,
Unhandled event loop exception
org.eclipse.swt.SWTError
with "OK" and "Details >>" buttons.
Clicking "Details >>" opened another dialog box titled "Internal Error" saying,
An SWT error has occurred.
You are recommended to exit the workbench.
Subsequent errors may happen and may terminate the workbench without warning.
See the .log file for more details.
Do you want to exit the workbench?
with "Yes" and "No" buttons.
The .log file for the workspace in question contained the following:
!ENTRY org.eclipse.ui 4 0 2009-07-19 16:33:40.059
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTError:XPCOM error -2147467262
at org.eclipse.swt.browser.Mozilla.error(Mozilla.java:1597)
at org.eclipse.swt.browser.Mozilla.setStext(Mozilla.java:1820)
at org.eclipse.swt.browser.Browser.setText(Browser.java:737)
at org.eclipse.pde.internal.ui.wizards.extension.PointSelectionPage.setPointDescriptionText(PointSelectionPage.java:603)
...
(I can give more of the stack if that would be helpful, but I'm having to type it longhand since the computer I'm getting this error on isn't connected to the internet)
The error number is the same as earlier, and definitely appears to be related to some kind of Mozilla component eclipse is trying to use. If anybody can shed light on this or give suggestions on fixing or diagnosing the problem I'd really appreciate it!