On 10/09/12 20:40, Lebling, David (US SSA) wrote:
Andy Seabourne suggested I try the SDB 1.3.5 release candidate once JENA-118 
was identified as a likely culprit.

Here are my findings so far. The tl;dr version is that JENA-118 seems to be 
fixed but I still have a few comments and questions.

Great ... thanks for the response


0. I had to update to the latest Jena release (2.7.3) from our old and dusty 
2.6.4, and by the usual Java dependency cascade updated all the stuff in the 
Jena distro. The newer versions resulted in the following issues:

1. warning about .ttl file contents. I compared mine against the one in the Jena 2.7.3 
distro, including byte-for-byte, and I see nothing that explains this. It is, however, 
"only" a warning.

  WARN [tomcat-http--18] (ErrorHandlerFactory.java:68) - [line: 6, col: 1 ] Bad IRI: 
<c:\X\cornerstone-lte2\config\planStore.ttl#store> Code: 4/UNWISE_CHARACTER in 
PATH: The character matches no grammar rules of URIs/IRIs. These characters are 
permitted in RDF URI References, XML system identifiers, and XML Schema anyURIs.

Two things are bad here:

c:
\

although it's only the \ that is actually causing the warning.

A URI like:

<c:/X/c...>

parses as a URI scheme called "c:" (c.f. http:) which isn't what you mean. The correct [*] URI is file:///c:/. yes - 3 /// - there is an empty host betwen the first two / and the third.

file://host/c:/

\ is not allowed in URIs. try / (good news - MS Windoes accepts / in file names)

[*] for some value of correct as the "file:" RFC is a bit hazy in places.

  WARN [tomcat-http--18] (ErrorHandlerFactory.java:68) - [line: 8, col: 24] Bad IRI: 
<c:\X\cornerstone-lte2\config\planStore.ttl#conn> Code: 4/UNWISE_CHARACTER in 
PATH: The character matches no grammar rules of URIs/IRIs. These characters are 
permitted in RDF URI References, XML system identifiers, and XML Schema anyURIs.
  WARN [tomcat-http--18] (ErrorHandlerFactory.java:68) - [line: 10, col: 1 ] Bad IRI: 
<c:\X\cornerstone-lte2\config\planStore.ttl#conn> Code: 4/UNWISE_CHARACTER in 
PATH: The character matches no grammar rules of URIs/IRIs. These characters are 
permitted in RDF URI References, XML system identifiers, and XML Schema anyURIs.

--- planStore.ttl ---
@prefix sdb:     <http://jena.hpl.hp.com/2007/sdb#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .

<#store> rdf:type sdb:Store ;
     sdb:layout         "layout2" ;
     sdb:connection     <#conn> ;
.
<#conn> rdf:type sdb:SDBConnection ;
     sdb:sdbType        "postgresql" ;
     sdb:sdbHost        "localhost" ;
     sdb:sdbName        "jenaStore" ;
     .
---

2.  SPARQL query it didn't like ("Queries with FROM/FROM NAMED not supported"). 
I realize the FROM UnionGraph (and really the GRAPH ?g) aren't necessary but should they 
be errors? I removed the extraneous/unsupported stuff and the query works.

"Queries with dataset descriptions (FROM/FROM NAMED) not supported" if its the error from SDB that I think it is.

In Fuseki, now passed down any FROM/FROM NAMED in the query - it works with dynamic datasets in TDB.

But SDB does not support the feature. The engine only supports queries on the fixed dataset, possibly with union graph set.


---
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?s
FROM <urn:x-arq:UnionGraph>
WHERE {
   { GRAPH ?g { ?s rdf:type <http://anchor/xxx> }  }
   UNION
   { GRAPH ?g { ?s rdf:type <http://anchor/yyy> }  }
   UNION
   { GRAPH ?g { ?s rdf:type <http://anchor/zzz> }  }  }
---

3. A request, rather than a comment. During my debugging, one thing
Iwas seeing is a long, long pause while Jena goes out to the web after
unsuccessfully looking for a local ontology cached in the
OntDocumentManager (via loadImport). It would have helped during
debugging this if I knew how to set either the OntDocumentManager or the
FileManager to say "all my ontologies are cached in the
OntDocumentManager, so if you see yourself going out to the web, throw
an exception immediately, rather than even trying to connect." The users
of this software will be in an environment where every ontology used is
locally cached.

Is this from code? You can build your own FileManager and not include the URL locator, then it will not go to the web (c.f. Fuseki protects local files by creating a FileManger that does not access local files).

        Andy


Thanks to Andy and everyone else; you have all been extremely helpful.

Dave


Reply via email to