Closed Bug 303452 Opened 20 years ago Closed 20 years ago

NS_ERROR_FACTORY_NOT_REGISTERED when trying to use nsIRDFService.GetDataSourceBlocking

Categories

(Toolkit Graveyard :: XULRunner, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: andreas.otte, Unassigned)

Details

XULRunner trunk: I'm trying to read the installed locales in a XULRunner application. I used code similar to that used in the firefox switchlocale extension by Benjamin Smedberg which works fine with firefox 1.0. var rs = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); var cds = rs.GetDataSourceBlocking("rdf:chrome"); However with the XULRunner trunk and older versions I get [Exception... "Component returned failure code: 0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED) [nsIRDFService.GetDataSourceBlocking]" nsresult: "0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED)" location: "JS frame :: chrome://venn/content/options.js :: loadLocales :: line 34" data: no] As far as I can tell the RDFService is registered. There is at least one firefox extension (SwitchProxy) which has the same problem reported against Deer Park versions. Did something change with RDF access on the trunk?
The rdf:chrome datasource no longer exists in trunk code, which is why your code fails to work there. You can still read the installed locales, however, using the getLocalesForPackage method in nsIToolkitChromeRegistry, added in bug 299370.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Oops, make that bug 299730.
v.
Status: RESOLVED → VERIFIED
Thanks. What an interesting error message for the missing datasource. Sent me in the wrong direction. Any js sample code out there how to use the new GetLocalesForPackage?
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.