I want to resolve this exception on loading rdf into database at
com.complexible.stardog.StardogException: There was a fatal failure during preparation of fe180f82-1d44-4df0-b6b0-caeb5ec45e61 org.openrdf.rio.RDFParseException: IRI included an unencoded space: ‘32’ [line 1]
someone has guided me to set DatabaseOptions.STRICT_PARSING
i.e., Control whether Stardog parses RDF strictly (true, the default) or loosely (false)
You have an encoding issue with one of your URLs. You have a space where it should be urlencoded as %20.
You can find the offending lines with
grep '<.* .*>' "c:/2Salles1.rdf"
and replace the space with %20 by hand or use sed. I see you’re using windows so you’ll have to use Cygwin or the equivalent in powershell or whatever it is Windows people use to do something like that.
I have not fixed it. But when I upload it by web interface, it uploads the triple store from c:/2Salles1.rdf perfectly. But with java api it does not do so. I dont see any white spaces in URLs
I'm not sure if this will help, but Windows uses backslashes in file paths, so chances are good that you actually want
new FileInputStream("c:\\2Salles1.rdf"). Especially since you say it loads fine in the webconsole, it seems like the problem could be in the java command itself.
thanks for your advice, but it has not worked. It just tried it but again the same error
Is your data set large/sensitive, or would you be able to share it here?
rdf file is not allowed to upload
I apologize for not noticing this earlier. You are attempting to upload an RDF/XML file, but the format you are passing in to the IO object is that of N-Triples. Instead of
thanks dear stephen, it works very well.
thanks once again for your time and precious advice