Bug 292001 - Starting debugger fails with "The function "getServiceByContractID" returned an error condition (0x80004002)" message
Summary: Starting debugger fails with "The function "getServiceByContractID" returned ...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: ATF (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Jacek Pospychala CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-11 18:23 EDT by Rafal Krzewski CLA
Modified: 2020-05-07 10:51 EDT (History)
1 user (show)

See Also:


Attachments
Eclipse platform configuration (347.46 KB, text/plain)
2009-10-11 18:23 EDT, Rafal Krzewski CLA
no flags Details
Eclipse platform configuration after removing xulrunner 1.8.1.4 / x86_64 (346.29 KB, text/plain)
2009-10-27 17:42 EDT, Rafal Krzewski CLA
no flags Details
Session log (49.00 KB, text/plain)
2009-10-27 17:52 EDT, Rafal Krzewski CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafal Krzewski CLA 2009-10-11 18:23:10 EDT
Created attachment 149327 [details]
Eclipse platform configuration

I've created a simple WTP web application, deployed in on the server.
I am able to view the page in the embedded Mozilla browser and use DOM
Inspector, DOM Source views etc, but launching the debugger, either through
context menu on a html file, or manually created debug configuration for an
URL, does not work for me. I am getting an error message:

The function "getServiceByContractID" returned an error condition  (0x80004002)

I am running GNU/Linux, x86_64, Sun JDK 6.0, Eclipse 3.5, WTP 3.3.1. For more
details please see attached platform configuration report.
Comment 1 Rafal Krzewski CLA 2009-10-11 18:29:08 EDT
I've done a bit of googling and it seems that this error occurs when an application attempts to access Mozilla component that had API version increased  using an obsolete id.

See: http://forums.mozillazine.org/viewtopic.php?f=27&t=1405935
Comment 2 Jacek Pospychala CLA 2009-10-12 10:51:06 EDT
czesc Rafal,

as far as I can see from your configuration details, the problem is XULRunner version. You have 1.8.1.4 whereas ATF requires version 1.9.1.
Could you install XULRunner 1.9.1 as described under following url and let me know if that solves the problem?

http://wiki.eclipse.org/ATF/Installing
Comment 3 Jacek Pospychala CLA 2009-10-12 10:54:22 EDT
btw. I have also added bug 292050 to track more general issue.
Comment 4 Rafal Krzewski CLA 2009-10-12 15:13:10 EDT
It turns out that I have XULRunner installed from two different sources, one
from JBoss Tools, the other from ATF:

Id: org.jboss.tools.xulrunner, Version: 1.0.0.GA-N200908061545-H145
Id: org.jboss.tools.xulrunner.feature.feature.group, Version: 1.8.1.3-20070904
Id: org.jboss.tools.xulrunner.feature.feature.jar, Version: 1.8.1.3-20070904
Id: org.jboss.tools.xulrunner.initializer, Version: 1.0.0.GA-N200908061545-H145
Id: org.mozilla.xulrunner, Version: 1.9.1.0_v20090825-0940
Id: org.mozilla.xulrunner.feature.feature.group, Version:
1.9.1.0_v20090825-1855-57Z379OhF77g7cFR37gN7
Id: org.mozilla.xulrunner.feature.feature.jar, Version:
1.9.1.0_v20090825-1855-57Z379OhF77g7cFR37gN7
Id: org.mozilla.xulrunner.gtk.linux.x86, Version: 1.9.1.0_v20090825-0940
Id: org.mozilla.xulrunner.gtk.linux.x86_64, Version: 1.8.1.4-20080112

Apparently version 1.8.1.4, provided by JBoss tools is preferred to ATF
provided one because it matches my machine architecture. I'll try uninstalling
it and see if it helps.
Comment 5 Rafal Krzewski CLA 2009-10-12 15:36:41 EDT
No luck. An attempt to run the debugger results in the following error:

org.eclipse.swt.SWTError: XPCOM error -2147467259
at org.eclipse.swt.browser.Mozilla.error(Mozilla.java:2068)
at org.eclipse.swt.browser.Mozilla.create(Mozilla.java:457)
at org.eclipse.swt.browser.Browser.<init>(Browser.java:119)
at org.eclipse.atf.mozilla.ide.ui.browser.MozBrowserEditor.createPartControl(MozBrowserEditor.java:586)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:662)
...

Trying to open internal web browser view provided by WTP (or was it Platform itself?) fails with 
Internal browser is not available: XPCOM error -2147467259
error message.

My guess would be that x86 XULRunner refuses to run on my x86_64 machine. 
I see that the issue of x86_64 build of XULRunner is pending (bug 209483), but from reading the comments I got the impression that x86 build was supposed to work.I have checked all .so files in /plugins/org.mozilla.xulrunner.gtk.linux.x86_1.9.1.0_v20090825-0940 directory for linkage problems using ldd, and everthing seems fine - libraries from /lib32 & /usr/lib32 provided by ia32-libs and libc6-i386 packages are referenced.
Comment 6 Jacek Pospychala CLA 2009-10-15 07:36:44 EDT
x86 xulrunner should run fine on x86_64 machine. This can be verified in following steps:
1. Is the org.mozilla.xulrunner.gtk.linux.x86 loaded correctly? If not, Error log view should include a Warning starting with message like One or more plug-ins couldn't have been loaded and then mention org.mozilla.xulrunner.gtk.linux.x86
2. Is the org.eclipse.swt.browser.XULRunnerPath defined and does it point to existing and correct xulrunner directory? It can be checked Eclipse configuration. For example, in the attached one, there was this line:
org.eclipse.swt.browser.XULRunnerPath=/home/rafal/opt/eclipse-jee-galileo/plugins/org.mozilla.xulrunner.gtk.linux.x86_64_1.8.1.4-20080112/xulrunner
Comment 7 Rafal Krzewski CLA 2009-10-27 17:42:34 EDT
Created attachment 150689 [details]
 Eclipse platform configuration after removing xulrunner 1.8.1.4 / x86_64

I've attached my current platform config. 

For quick reference here's the result of running grep -i xulrunner against it:

java.library.path=/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../lib/amd64:/usr/lib64/xulrunner-addons:/usr/java/packages/lib/amd64:/lib:/usr/lib
org.eclipse.swt.browser.XULRunnerPath=/home/rafal/opt/eclipse-jee-galileo/plugins/org.mozilla.xulrunner.gtk.linux.x86_1.9.1.0_v20090825-0940/xulrunner
org.eclipse.atf.mozilla.swt.browser (0.3.0.v200910071917) "Mozilla Browser Xulrunner embedder" [Resolved]
org.mozilla.xulrunner (1.9.1.0_v20090825-0940) "Mozilla Xulrunner" [Resolved]
org.mozilla.xulrunner.gtk.linux.x86 (1.9.1.0_v20090825-0940) "Mozilla Xulrunner for Linux" [Resolved]
Id: org.mozilla.xulrunner, Version: 1.9.1.0_v20090825-0940
Id: org.mozilla.xulrunner.feature.feature.group, Version: 1.9.1.0_v20090825-1855-57Z379OhF77g7cFR37gN7
Id: org.mozilla.xulrunner.feature.feature.jar, Version: 1.9.1.0_v20090825-1855-57Z379OhF77g7cFR37gN7
Id: org.mozilla.xulrunner.gtk.linux.x86, Version: 1.9.1.0_v20090825-0940
Id: org.mozilla.xulrunner, Version: 1.9.1.0_v20090825-0940, Location: reference:file:plugins/org.mozilla.xulrunner_1.9.1.0_v20090825-0940.jar
Id: org.mozilla.xulrunner.gtk.linux.x86, Version: 1.9.1.0_v20090825-0940, Location: reference:file:plugins/org.mozilla.xulrunner.gtk.linux.x86_1.9.1.0_v20090825-0940/

org.eclipse.swt.browser.XULRunnerPath=/home/rafal/opt/eclipse-jee-galileo/plugins/org.mozilla.xulrunner.gtk.linux.x86_1.9.1.0_v20090825-0940/xulrunner points to a correct location 

I cannot see any plugin loading error messages in that file.

One thing that looks suspicious is /usr/lib64/xulrunner-addons directory on java.library.path. This directory exists and contains Mozilla plugins and extensions, but 1) dpkg -S tells me it does not come from any installed Ubuntu package, and I haven't done any local Mozilla builds/installs 2) I'm puzzled how and why does Eclipse or JRE pick it up.
Comment 8 Rafal Krzewski CLA 2009-10-27 17:52:34 EDT
Created attachment 150690 [details]
Session log

Here's a session log. Some exceptions were thrown during startup, however they seem to me to be unrelated to the browser problem. After startup I tried to launch debugger.

Here's a bit that looks interesting:

org.eclipse.swt.SWTError: XPCOM error -2147467259
	at org.eclipse.swt.browser.Mozilla.error(Mozilla.java:2068)
	at org.eclipse.swt.browser.Mozilla.create(Mozilla.java:457)
	at org.eclipse.swt.browser.Browser.<init>(Browser.java:119)
	at org.eclipse.atf.mozilla.ide.ui.browser.MozBrowserEditor.createPartControl(MozBrowserEditor.java:586)

followed by:

org.mozilla.xpcom.XPCOMInitializationException: Must call Mozilla.getInstance().initialize() before using this method
	at org.mozilla.xpcom.Mozilla.getServiceManager(Mozilla.java:869)
	at org.eclipse.atf.mozilla.ide.debug.MozillaDebugPlugin.createDebuggerService(MozillaDebugPlugin.java:163)
	at org.eclipse.atf.mozilla.ide.debug.internal.model.JSDebugTarget.<init>(JSDebugTarget.java:133)