Some of the most common problems that hit when working with data sources include the following:
Capitalization. Unlike the rest of XPCOM, data source interface methods are stated in InitCaps, not in initCaps. Thus it is GetResource() not getResource().
Asynchronous loading. If the nsIRDFDataSource interface's GetDataSource() methods is used to create a data source instead of GetDataSourceBlocking(), the data source loads “in the background.” In that case, any statements manipulating that data source immediately after its object is created are at risk. The risk is that the data source has not finished loading yet, and so not all anticipated facts may yet be present.
Syntax problems in test data.