When rebuilding my TDB from scratch,
I found a way to reproduce the problem.

1. load a bad syntax file ( attached )
2. load any good file in same named graph

Hope it helps.


2015-02-20 12:24 GMT+01:00 Jean-Marc Vanel <[email protected]>:

> Hi
>
> It seems that the database , or some graph in it , is corrupted.
> That's with :
>  "org.apache.jena" % "apache-jena-libs" % "2.12.1"
>
> On another TDB directory instance , the same file is loaded fine.
>
> The relevant code seems to be:
>     public synchronized String readPrefix(String graphName, String prefix)
> {
>         Node g = NodeFactory.createURI(graphName) ;
>         Node p = NodeFactory.createLiteral(prefix) ;
>
>         Iterator<Tuple<Node>> iter = nodeTupleTable.find(g, p, null) ;
>         try {
>             if ( ! iter.hasNext() )
>                 return null ;
>             Tuple<Node> t = iter.next() ;
>             Node uri = t.get(2) ;
> *            return uri.getURI() ; // uri is probably null !*
>         } finally { Iter.close(iter) ; }
>     }
>
> A user can hope that a better error message is displayed :) .
>
>
> java -cp $JARS tdb.tdbloader --verbose --loc=TDB --graph=av-cobus-onto
> $ONTOS/barter_user.owl.n3
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in
> [jar:file:/home/jmv/deploy/semantic_forms_play-1.0-SNAPSHOT/lib/ch.qos.logback.logback-classic-1.1.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/home/jmv/deploy/semantic_forms_play-1.0-SNAPSHOT/lib/org.slf4j.slf4j-log4j12-1.7.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
> explanation.
> SLF4J: Actual binding is of type
> [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
> Java maximum memory: 259522560
> symbol:http://jena.hpl.hp.com/ARQ#constantBNodeLabels = true
> symbol:http://jena.hpl.hp.com/ARQ#regexImpl = symbol:
> http://jena.hpl.hp.com/ARQ#javaRegex
> symbol:http://jena.hpl.hp.com/ARQ#stageGenerator =
> com.hp.hpl.jena.tdb.solver.StageGeneratorDirectTDB@1049a04
> symbol:http://jena.hpl.hp.com/ARQ#strictSPARQL = false
> symbol:http://jena.hpl.hp.com/ARQ#enablePropertyFunctions = true
> Exception in thread "main" java.lang.NullPointerException
> * at
> com.hp.hpl.jena.tdb.store.DatasetPrefixesTDB.readPrefix(DatasetPrefixesTDB.java:88)*
> at
> com.hp.hpl.jena.sparql.graph.GraphPrefixesProjection.get(GraphPrefixesProjection.java:96)
> at
> com.hp.hpl.jena.sparql.graph.GraphPrefixesProjection.set(GraphPrefixesProjection.java:74)
> at
> com.hp.hpl.jena.shared.impl.PrefixMappingImpl.setNsPrefix(PrefixMappingImpl.java:70)
> at
> com.hp.hpl.jena.tdb.store.bulkloader.BulkLoader$DestinationGraph.prefix(BulkLoader.java:361)
> at
> org.apache.jena.riot.lang.LangTurtleBase.emitPrefix(LangTurtleBase.java:492)
> at
> org.apache.jena.riot.lang.LangTurtleBase.directivePrefix(LangTurtleBase.java:164)
> at
> org.apache.jena.riot.lang.LangTurtleBase.directive(LangTurtleBase.java:140)
> at
> org.apache.jena.riot.lang.LangTurtleBase.runParser(LangTurtleBase.java:79)
> at org.apache.jena.riot.lang.LangBase.parse(LangBase.java:42)
> at
> org.apache.jena.riot.RDFParserRegistry$ReaderRIOTLang.read(RDFParserRegistry.java:182)
> at org.apache.jena.riot.RDFDataMgr.process(RDFDataMgr.java:906)
> at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:687)
> at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:666)
> at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:654)
> at
> com.hp.hpl.jena.tdb.store.bulkloader.BulkLoader.loadTriples$(BulkLoader.java:129)
> at
> com.hp.hpl.jena.tdb.store.bulkloader.BulkLoader.loadNamedGraph(BulkLoader.java:102)
> at com.hp.hpl.jena.tdb.TDBLoader.loadNamedGraph$(TDBLoader.java:253)
> at com.hp.hpl.jena.tdb.TDBLoader.loadGraph$(TDBLoader.java:232)
> at com.hp.hpl.jena.tdb.TDBLoader.loadGraph(TDBLoader.java:174)
> at com.hp.hpl.jena.tdb.TDBLoader.load(TDBLoader.java:111)
> at tdb.tdbloader.loadNamedGraph(tdbloader.java:113)
> at tdb.tdbloader.exec(tdbloader.java:102)
> at arq.cmdline.CmdMain.mainMethod(CmdMain.java:102)
> at arq.cmdline.CmdMain.mainRun(CmdMain.java:63)
> at arq.cmdline.CmdMain.mainRun(CmdMain.java:50)
> at tdb.tdbloader.main(tdbloader.java:44)
>
>
> --
> Jean-Marc Vanel
> Déductions SARL - Consulting, services, training,
> Rule-based programming, Semantic Web
> http://deductions-software.com/
> +33 (0)6 89 16 29 52
> Twitter: @jmvanel , @jmvanel_fr ; chat: irc://irc.freenode.net#eulergui
>



-- 
Jean-Marc Vanel
Déductions SARL - Consulting, services, training,
Rule-based programming, Semantic Web
http://deductions-software.com/
+33 (0)6 89 16 29 52
Twitter: @jmvanel , @jmvanel_fr ; chat: irc://irc.freenode.net#eulergui

Reply via email to