Debugging Sesame 2 repository connection error

77 vaatamist
Liigu esimese lugemata sõnumi juurde

Rich Keller

lugemata,
23. märts 2015, 13:15:4623.03.15
kuni topbrai...@googlegroups.com
I am having trouble creating a Sesame 2 repository connection with TBC-SE v4.6.2. When I establish the connection, I get a popup error window saying ‘unexpected error’, but the window is visible only for a second so I can’t make out any details. In the log, the following error is reported:

!ENTRY org.topbraid.eclipsex 4 0 2015-03-23 09:57:03.571
!MESSAGE ERROR [Thread-16] (ParseErrorLogger.java:32) - [Rio fatal] Illegal predicate value: "4"^^<http://www.w3.org/2001/XMLSchema#integer> (573510, -1)

So apparently a literal is being parsed in the position of a predicate. The full log message is below.  I don’t understand what queries TBC sends to Sesame or exactly what is being parsed when this error appears (in line 573510, so it seems). This makes it difficult to debug. Any suggestions?

Thanks,
Rich

————————————————————————

!ENTRY org.topbraid.eclipsex 4 0 2015-03-23 09:57:03.571
!MESSAGE ERROR [Thread-16] (ParseErrorLogger.java:32) - [Rio fatal] Illegal predicate value: "4"^^<http://www.w3.org/2001/XMLSchema#integer> (573510, -1)


!ENTRY org.topbraid.sesame2 2 0 2015-03-23 09:57:04.043
!MESSAGE Error reported from Sesame
!STACK 0
org.openrdf.repository.RepositoryException: Malformed query result from server
    at org.openrdf.http.client.HTTPClient.getRDF(HTTPClient.java:1169)
    at org.openrdf.http.client.HTTPClient.getStatements(HTTPClient.java:676)
    at org.openrdf.repository.http.HTTPRepositoryConnection.exportStatements(HTTPRepositoryConnection.java:283)
    at org.openrdf.repository.http.HTTPRepositoryConnection.getStatements(HTTPRepositoryConnection.java:269)
    at org.topbraid.sesame2.graph.RepositoryGraph.graphBaseFind(RepositoryGraph.java:95)
    at com.hp.hpl.jena.graph.impl.GraphBase.find(GraphBase.java:268)
    at org.topbraid.core.graph.concurrent.ThreadSafeGraph.threadSafeFind(ThreadSafeGraph.java:250)
    at org.topbraid.core.graph.concurrent.ThreadSafeGraph.find(ThreadSafeGraph.java:240)
    at org.topbraid.core.graph.CachingGraph.addToCache(CachingGraph.java:145)
    at org.topbraid.core.graph.AbstractCachingGraph.find(AbstractCachingGraph.java:127)
    at org.topbraid.core.graph.AbstractCachingGraph.find(AbstractCachingGraph.java:120)
    at org.topbraidcomposer.core.registry.TBCCachingGraph.rebuildCache(TBCCachingGraph.java:114)
    at org.topbraidcomposer.core.registry.TBCCachingGraph.<init>(TBCCachingGraph.java:46)
    at org.topbraidcomposer.editors.utils.AbstractTBCPersonality.createCachingGraph(AbstractTBCPersonality.java:126)
    at org.topbraid.core.io.IO.loadAndRegister(IO.java:322)
    at org.topbraid.core.io.IO.load(IO.java:292)
    at org.topbraidcomposer.core.io.TBCIO.loadModel(TBCIO.java:334)
    at org.topbraidcomposer.core.io.TBCIO.loadModel(TBCIO.java:369)
    at org.topbraidcomposer.core.io.TBCIO$2$1.run(TBCIO.java:420)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.openrdf.rio.RDFParseException: Illegal predicate value: "4"^^<http://www.w3.org/2001/XMLSchema#integer> [line 573510]
    at org.openrdf.rio.helpers.RDFParserBase.reportFatalError(RDFParserBase.java:525)
    at org.openrdf.rio.turtle.TurtleParser.reportFatalError(TurtleParser.java:1107)
    at org.openrdf.rio.turtle.TurtleParser.parsePredicate(TurtleParser.java:394)
    at org.openrdf.rio.turtle.TurtleParser.parsePredicateObjectList(TurtleParser.java:309)
    at org.openrdf.rio.turtle.TurtleParser.parseTriples(TurtleParser.java:299)
    at org.openrdf.rio.trig.TriGParser.parseGraph(TriGParser.java:142)
    at org.openrdf.rio.trig.TriGParser.parseStatement(TriGParser.java:89)
    at org.openrdf.rio.turtle.TurtleParser.parse(TurtleParser.java:184)
    at org.openrdf.rio.turtle.TurtleParser.parse(TurtleParser.java:129)
    at org.openrdf.http.client.HTTPClient.getRDF(HTTPClient.java:1163)
    ... 19 more

!ENTRY org.topbraidcomposer.core 4 0 2015-03-23 09:57:04.547
!MESSAGE Could not load /DW/atmonto.s2r or one of its imports.
The most recent URI was http://<SERVER OMITTED HERE>/openrdf-sesame/repositories/atm
!STACK 0
java.lang.reflect.InvocationTargetException
    at org.topbraidcomposer.core.io.TBCIO$2.run(TBCIO.java:493)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: com.hp.hpl.jena.shared.ClosedException: Sesame reports org.openrdf.repository.RepositoryException: Malformed query result from server (See error log for details)
    at org.topbraid.sesame2.graph.RepositoryGraph.graphBaseFind(RepositoryGraph.java:100)
    at com.hp.hpl.jena.graph.impl.GraphBase.find(GraphBase.java:268)
    at org.topbraid.core.graph.concurrent.ThreadSafeGraph.threadSafeFind(ThreadSafeGraph.java:250)
    at org.topbraid.core.graph.concurrent.ThreadSafeGraph.find(ThreadSafeGraph.java:240)
    at org.topbraid.core.graph.CachingGraph.addToCache(CachingGraph.java:145)
    at org.topbraid.core.graph.AbstractCachingGraph.find(AbstractCachingGraph.java:127)
    at org.topbraid.core.graph.AbstractCachingGraph.find(AbstractCachingGraph.java:120)
    at org.topbraidcomposer.core.registry.TBCCachingGraph.rebuildCache(TBCCachingGraph.java:114)
    at org.topbraidcomposer.core.registry.TBCCachingGraph.<init>(TBCCachingGraph.java:46)
    at org.topbraidcomposer.editors.utils.AbstractTBCPersonality.createCachingGraph(AbstractTBCPersonality.java:126)
    at org.topbraid.core.io.IO.loadAndRegister(IO.java:322)
    at org.topbraid.core.io.IO.load(IO.java:292)
    at org.topbraidcomposer.core.io.TBCIO.loadModel(TBCIO.java:334)
    at org.topbraidcomposer.core.io.TBCIO.loadModel(TBCIO.java:369)
    at org.topbraidcomposer.core.io.TBCIO$2$1.run(TBCIO.java:420)
    at java.lang.Thread.run(Thread.java:745)
Root exception:
com.hp.hpl.jena.shared.ClosedException: Sesame reports org.openrdf.repository.RepositoryException: Malformed query result from server (See error log for details)
    at org.topbraid.sesame2.graph.RepositoryGraph.graphBaseFind(RepositoryGraph.java:100)
    at com.hp.hpl.jena.graph.impl.GraphBase.find(GraphBase.java:268)
    at org.topbraid.core.graph.concurrent.ThreadSafeGraph.threadSafeFind(ThreadSafeGraph.java:250)
    at org.topbraid.core.graph.concurrent.ThreadSafeGraph.find(ThreadSafeGraph.java:240)
    at org.topbraid.core.graph.CachingGraph.addToCache(CachingGraph.java:145)
    at org.topbraid.core.graph.AbstractCachingGraph.find(AbstractCachingGraph.java:127)
    at org.topbraid.core.graph.AbstractCachingGraph.find(AbstractCachingGraph.java:120)
    at org.topbraidcomposer.core.registry.TBCCachingGraph.rebuildCache(TBCCachingGraph.java:114)
    at org.topbraidcomposer.core.registry.TBCCachingGraph.<init>(TBCCachingGraph.java:46)
    at org.topbraidcomposer.editors.utils.AbstractTBCPersonality.createCachingGraph(AbstractTBCPersonality.java:126)
    at org.topbraid.core.io.IO.loadAndRegister(IO.java:322)
    at org.topbraid.core.io.IO.load(IO.java:292)
    at org.topbraidcomposer.core.io.TBCIO.loadModel(TBCIO.java:334)
    at org.topbraidcomposer.core.io.TBCIO.loadModel(TBCIO.java:369)
    at org.topbraidcomposer.core.io.TBCIO$2$1.run(TBCIO.java:420)
    at java.lang.Thread.run(Thread.java:745)


Scott Henninger

lugemata,
23. märts 2015, 18:55:5423.03.15
kuni topbrai...@googlegroups.com
Hello, Rich; Is it the case that the names of some of your property URIs start with numbers, such as <http://example.org/4321>?  In the past we have found that while this causes no problems in TopBraid and other back-ends, it can parse this in Sesame as:
  <http://example.org/> "4321"^^xsd:string

If you could check whether this is the case, we can take a closer look for how to address the problem.

-- Scott
--
You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbrai...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Ansell

lugemata,
23. märts 2015, 19:41:2623.03.15
kuni topbrai...@googlegroups.com
Hi Scott,

Definitely file a bug with Sesame (and assign to me) if you have
testcases where the Rio parsers have bugs.

Thanks,

Peter

Holger Knublauch

lugemata,
23. märts 2015, 20:59:1923.03.15
kuni topbrai...@googlegroups.com
Hi Peter,

I do remember that we introduced a work-around to such a scenario
(literal as predicate) 3 years ago, by adding

// Return no results if subject is a Literal or predicate is
not a URI
// (this may happen in SPARQL queries)
if(subject instanceof Literal || (predicate != null &&
!(predicate instanceof URI))) {
return new NiceIterator<Triple>();
}

in the TopBraid RepositoryGraph.graphBaseFind mentioned in the stack
trace below. At this stage I cannot see how it could possibly still
place a literal as predicate into an SPO query, so I can only speculate
that this may be data living on the database.

Thanks
Holger

Scott Henninger

lugemata,
24. märts 2015, 00:17:1324.03.15
kuni topbrai...@googlegroups.com
An update: We do have a way to reproduce the issue reported by Rich. Basically, we can
create a RDF file with a URI such as <http://support.tq.com/unnamed#1>. This all works OK
in Composer and we can export the file to a Sesame repository. However when we try to
create a connector to that repository the...

[Rio fatal] Illegal
predicate value: "4"^^<http://www.w3.org/2001/XMLSchema#integer>


...error occurs, where "4" is replaced by "1" in the <http://support.tq.com/unnamed#1>.
We are tracking down the error now and will update this group when we have more information.

-- Scott

Peter Ansell

lugemata,
24. märts 2015, 00:58:3524.03.15
kuni topbrai...@googlegroups.com
Hi Holger,

Ahh, Sesame doesn't support Generalized RDF so those cases would need
to be filtered out if they come out of a Jena Model where it is
supported.

Thanks,

Peter

Rich Keller

lugemata,
24. märts 2015, 12:28:3024.03.15
kuni topbrai...@googlegroups.com
Thanks all, for the discussion and the experiment Scott performed. It seems likely you have identified the problem, but I'm not sure where the suspect URI is coming from in my files. I certainly didn't (intentionally) create a predicate starting with a number. When I query both the TBC repository and the Sesame repository (which is based on the same input files that TBC reads) neither returns any suspect predicates. However, I do have a resource with a URI of the form: <http://support.tc.com/on/NAS#4AAair>.  (This URI is used as a subject, not a predicate.)

I am in the dark about how the TBC connector is programmatically set up and what exactly is being parsed when the error surfaces. Doesn't TBC issue SPARQL queries against Sesame to retrieve whatever data it needs? Why is a large file being parsed?

Rich

Rich Keller

lugemata,
3. apr 2015, 12:02:5703.04.15
kuni topbrai...@googlegroups.com
Just a followup on this issue. I searched for and removed all the resources that started with a numeric character and reloaded a fresh Sesame repository. But I got the same type of error (below) as when trying to establish the TBC connector before. This leads me to wonder whether the leading numeric character on the resource URL is actually the problem.

Scott: Any further progress on your side?

Rich

eclipse.buildId=unknown
java.version=1.7.0_67
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US

Error
Fri Apr 03 08:56:45 PDT 2015
ERROR [Thread-13] (ParseErrorLogger.java:32) - [Rio fatal] Illegal predicate value: "1"^^<http://www.w3.org/2001/XMLSchema#integer> (5265898, -1)

Holger Knublauch

lugemata,
3. apr 2015, 23:32:0703.04.15
kuni topbrai...@googlegroups.com
Hi Rich,

sorry if this had been clarified already, but can you confirm that you are using a matching Sesame server version: TopBraid expects Sesame 2.6, as they may have changed their communication protocol between versions.

Thanks,
Holger

Rich Keller

lugemata,
6. apr 2015, 12:40:3606.04.15
kuni topbrai...@googlegroups.com
Holger: No, we are using 2.7.8. Rich

Mark Graham

lugemata,
7. apr 2015, 16:39:2607.04.15
kuni topbrai...@googlegroups.com
Hi Rich/Holger,

TBC will work with and up to Sesame version 2.6.2 presently. Also, a code change is planeed to make this compatible with 2.7.8 in a future release.


Thanks,
Mark
Vasta kõigile
Vasta autorile
Saada edasi
0 uut sõnumit