You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Camel Christophe <cc...@cls.fr> on 2011/02/28 09:53:49 UTC

[Fuseki] Null pointer exception

Hello again,

 

I just deploy the Fuseki server (the last one from the svn trunk) with
an SDB store on a postgres database connection. The configuration is as
follows:

 

[] ja:loadClass "com.hp.hpl.jena.sdb.SDB" .

sdb:DatasetStore  rdfs:subClassOf  ja:RDFDataset .

sdb:Model rdfs:subClassOf  ja:Model .

 

<#dataset> rdf:type sdb:DatasetStore ;

   ## Number of concurrent connections allowed to this dataset.

   ## joseki:poolSize     5 ;         

   sdb:store <#store> .

 

<#store> rdf:type sdb:Store  ;

   rdfs:label "SDB" ;

   sdb:layout         "layout2/index" ;

   sdb:connection 

    [  rdf:type sdb:SDBConnection ;

       sdb:sdbType        "postgresql" ;

       sdb:sdbHost        "hidden" ;       

       sdb:sdbName        " hidden" ;

       sdb:sdbUser        " hidden" ;

       sdb:sdbPassword    " hidden" ;

       sdb:driver         "org.postgresql.Driver" ;

    ]

    .

 

Then I tried to injest an ontology. But it failed. The exception trace
is as follows

 

09:41:11 INFO  Fuseki               :: Dataset from assembler

09:41:12 INFO  Fuseki               :: Update enabled

09:41:12 INFO  Fuseki               :: Fuseki 0.2.0-SNAPSHOT

09:41:12 INFO  Fuseki               :: Jetty 7.x.y-SNAPSHOT

09:41:12 INFO  Fuseki               :: Dataset = /dataset

09:41:12 INFO  Fuseki               :: Started 2011/02/28 09:41:12 CET
on port 3030

09:41:17 INFO  Fuseki               :: [1] POST
http://localhost:3030/dataset/data?graph=http%3A%2F%2Fwww.w3.org%2F2004%
2F02%2Fskos%2Fcore

09:41:18 ERROR SDB_QC               :: Null bridge

java.lang.NullPointerException

        at com.hp.hpl.jena.sdb.compiler.SDB_QC.exec(SDB_QC.java:65)

        at com.hp.hpl.jena.sdb.compiler.OpSQL.exec(OpSQL.java:53)

        at
com.hp.hpl.jena.sdb.engine.QueryEngineSDB.eval(QueryEngineSDB.java:117)

        at
com.hp.hpl.jena.sparql.engine.QueryEngineBase.evaluate(QueryEngineBase.j
ava:138)

        at
com.hp.hpl.jena.sparql.engine.QueryEngineBase.createPlan(QueryEngineBase
.java:109)

        at
com.hp.hpl.jena.sparql.engine.QueryEngineBase.getPlan(QueryEngineBase.ja
va:97)

        at
com.hp.hpl.jena.sdb.engine.QueryEngineSDB$QueryEngineFactorySDB.create(Q
ueryEngineSDB.java:142)

        at
com.hp.hpl.jena.sparql.engine.QueryExecutionBase.getPlan(QueryExecutionB
ase.java:297)

        at
com.hp.hpl.jena.sparql.engine.QueryExecutionBase.startQueryIterator(Quer
yExecutionBase.java:272)

        at
com.hp.hpl.jena.sparql.engine.QueryExecutionBase.execResultSet(QueryExec
utionBase.java:279)

        at
com.hp.hpl.jena.sparql.engine.QueryExecutionBase.execSelect(QueryExecuti
onBase.java:123)

        at
com.hp.hpl.jena.sdb.util.StoreUtils.containsGraph(StoreUtils.java:112)

        at
com.hp.hpl.jena.sdb.store.DatasetStoreGraph._containsGraph(DatasetStoreG
raph.java:69)

        at
com.hp.hpl.jena.sparql.core.DatasetGraphCaching.containsGraph(DatasetGra
phCaching.java:60)

        at
org.openjena.fuseki.servlets.SPARQL_REST$Target.exists(SPARQL_REST.java:
130)

        at
org.openjena.fuseki.servlets.SPARQL_REST_RW.doPost(SPARQL_REST_RW.java:6
9)

        at
org.openjena.fuseki.servlets.SPARQL_REST.dispatch(SPARQL_REST.java:187)

        at
org.openjena.fuseki.servlets.SPARQL_REST.perform(SPARQL_REST.java:170)

        at
org.openjena.fuseki.servlets.SPARQL_ServletBase.doCommon(SPARQL_ServletB
ase.java:76)

        at
org.openjena.fuseki.servlets.SPARQL_REST.service(SPARQL_REST.java:156)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

        at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:534)

        at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:47
5)

        at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.
java:224)

        at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.
java:921)

        at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403
)

        at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.j
ava:184)

        at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.j
ava:856)

        at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java
:117)

        at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.ja
va:114)

        at org.eclipse.jetty.server.Server.handle(Server.java:352)

        at
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.jav
a:596)

        at
org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConne
ction.java:1069)

        at
org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805)

        at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)

        at
org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)

        at
org.eclipse.jetty.server.nio.BlockingChannelConnector$BlockingChannelEnd
Point.run(BlockingChannelConnector.java:292)

        at
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.ja
va:450)

        at java.lang.Thread.run(Unknown Source)

09:41:18 INFO  Fuseki               :: [1] 500 Server Error

 

There are very few google answers dealing with this case. Also, I do not
know what to do? Is this a problem with SDB ?

 

Thanks.

 

Chris.

 


Re: [Fuseki] Null pointer exception

Posted by Paolo Castagna <ca...@googlemail.com>.
Camel Christophe wrote:
> Yesssss, it works !!!!
> 
> I checked out the sdb trunk, install it in my local maven repository.

Good. That's an option.

Or, as Andy already suggested, you can simply add this to your pom.xml:

  <repositories>
    <repository>
      <id>jena-repo-dev</id>
      <url>http://openjena.org/repo-dev</url>
    </repository>
  </repositories>

and use the 1.3.4-SNAPSHOT version of SDB.

This way you can provide us feedback with any problem you might have using
the SNAPSHOT and we know for sure that the problem has not come from somewhere
else or any change you might have done to the SDB sources.

Checking out SDB from trunk and installing in your local repo, is great and
good too (and, as you have seen, quite easy to do).

All type of feedback and help are welcome.

Paolo

> Then add the dependency to the snapshot version of sdb in the fuseki pom, and package. All this without any problem, incredible :)
> 
> Very good work. Congratulations to all developers.
> 
> -----Message d'origine-----
> De : Andy Seaborne [mailto:andy.seaborne@epimorphics.com] 
> Envoyé : lundi 28 février 2011 10:03
> À : jena-users@incubator.apache.org
> Objet : Re: [Fuseki] Null pointer exception
> 
>> There are very few google answers dealing with this case. Also, I do
>> not know what to do? Is this a problem with SDB ?
> 
> Yes - this is a SDB that is fixed in SVN and in the SDB snapshot at:
> 
> http://www.openjena.org/repo-dev/com/hp/hpl/jena/sdb/
> 
> Sorry about that,
> 
> 	Andy


RE: [Fuseki] Null pointer exception

Posted by Camel Christophe <cc...@cls.fr>.
Yesssss, it works !!!!

I checked out the sdb trunk, install it in my local maven repository. Then add the dependency to the snapshot version of sdb in the fuseki pom, and package. All this without any problem, incredible :)

Very good work. Congratulations to all developers.

-----Message d'origine-----
De : Andy Seaborne [mailto:andy.seaborne@epimorphics.com] 
Envoyé : lundi 28 février 2011 10:03
À : jena-users@incubator.apache.org
Objet : Re: [Fuseki] Null pointer exception

> There are very few google answers dealing with this case. Also, I do
> not know what to do? Is this a problem with SDB ?

Yes - this is a SDB that is fixed in SVN and in the SDB snapshot at:

http://www.openjena.org/repo-dev/com/hp/hpl/jena/sdb/

Sorry about that,

	Andy

Re: [Fuseki] Null pointer exception

Posted by Andy Seaborne <an...@epimorphics.com>.
> There are very few google answers dealing with this case. Also, I do
> not know what to do? Is this a problem with SDB ?

Yes - this is a SDB that is fixed in SVN and in the SDB snapshot at:

http://www.openjena.org/repo-dev/com/hp/hpl/jena/sdb/

Sorry about that,

	Andy

On 28/02/11 08:53, Camel Christophe wrote:
> Hello again,
>
>
>
> I just deploy the Fuseki server (the last one from the svn trunk) with
> an SDB store on a postgres database connection. The configuration is as
> follows:
>
>
>
> [] ja:loadClass "com.hp.hpl.jena.sdb.SDB" .
>
> sdb:DatasetStore  rdfs:subClassOf  ja:RDFDataset .
>
> sdb:Model rdfs:subClassOf  ja:Model .
>
>
>
> <#dataset>  rdf:type sdb:DatasetStore ;
>
>     ## Number of concurrent connections allowed to this dataset.
>
>     ## joseki:poolSize     5 ;
>
>     sdb:store<#store>  .
>
>
>
> <#store>  rdf:type sdb:Store  ;
>
>     rdfs:label "SDB" ;
>
>     sdb:layout         "layout2/index" ;
>
>     sdb:connection
>
>      [  rdf:type sdb:SDBConnection ;
>
>         sdb:sdbType        "postgresql" ;
>
>         sdb:sdbHost        "hidden" ;
>
>         sdb:sdbName        " hidden" ;
>
>         sdb:sdbUser        " hidden" ;
>
>         sdb:sdbPassword    " hidden" ;
>
>         sdb:driver         "org.postgresql.Driver" ;
>
>      ]
>
>      .
>
>
>
> Then I tried to injest an ontology. But it failed. The exception trace
> is as follows
>
>
>
> 09:41:11 INFO  Fuseki               :: Dataset from assembler
>
> 09:41:12 INFO  Fuseki               :: Update enabled
>
> 09:41:12 INFO  Fuseki               :: Fuseki 0.2.0-SNAPSHOT
>
> 09:41:12 INFO  Fuseki               :: Jetty 7.x.y-SNAPSHOT
>
> 09:41:12 INFO  Fuseki               :: Dataset = /dataset
>
> 09:41:12 INFO  Fuseki               :: Started 2011/02/28 09:41:12 CET
> on port 3030
>
> 09:41:17 INFO  Fuseki               :: [1] POST
> http://localhost:3030/dataset/data?graph=http%3A%2F%2Fwww.w3.org%2F2004%
> 2F02%2Fskos%2Fcore
>
> 09:41:18 ERROR SDB_QC               :: Null bridge
>
> java.lang.NullPointerException
>
>          at com.hp.hpl.jena.sdb.compiler.SDB_QC.exec(SDB_QC.java:65)
>
>          at com.hp.hpl.jena.sdb.compiler.OpSQL.exec(OpSQL.java:53)
>
>          at
> com.hp.hpl.jena.sdb.engine.QueryEngineSDB.eval(QueryEngineSDB.java:117)
>
>          at
> com.hp.hpl.jena.sparql.engine.QueryEngineBase.evaluate(QueryEngineBase.j
> ava:138)
>
>          at
> com.hp.hpl.jena.sparql.engine.QueryEngineBase.createPlan(QueryEngineBase
> .java:109)
>
>          at
> com.hp.hpl.jena.sparql.engine.QueryEngineBase.getPlan(QueryEngineBase.ja
> va:97)
>
>          at
> com.hp.hpl.jena.sdb.engine.QueryEngineSDB$QueryEngineFactorySDB.create(Q
> ueryEngineSDB.java:142)
>
>          at
> com.hp.hpl.jena.sparql.engine.QueryExecutionBase.getPlan(QueryExecutionB
> ase.java:297)
>
>          at
> com.hp.hpl.jena.sparql.engine.QueryExecutionBase.startQueryIterator(Quer
> yExecutionBase.java:272)
>
>          at
> com.hp.hpl.jena.sparql.engine.QueryExecutionBase.execResultSet(QueryExec
> utionBase.java:279)
>
>          at
> com.hp.hpl.jena.sparql.engine.QueryExecutionBase.execSelect(QueryExecuti
> onBase.java:123)
>
>          at
> com.hp.hpl.jena.sdb.util.StoreUtils.containsGraph(StoreUtils.java:112)
>
>          at
> com.hp.hpl.jena.sdb.store.DatasetStoreGraph._containsGraph(DatasetStoreG
> raph.java:69)
>
>          at
> com.hp.hpl.jena.sparql.core.DatasetGraphCaching.containsGraph(DatasetGra
> phCaching.java:60)
>
>          at
> org.openjena.fuseki.servlets.SPARQL_REST$Target.exists(SPARQL_REST.java:
> 130)
>
>          at
> org.openjena.fuseki.servlets.SPARQL_REST_RW.doPost(SPARQL_REST_RW.java:6
> 9)
>
>          at
> org.openjena.fuseki.servlets.SPARQL_REST.dispatch(SPARQL_REST.java:187)
>
>          at
> org.openjena.fuseki.servlets.SPARQL_REST.perform(SPARQL_REST.java:170)
>
>          at
> org.openjena.fuseki.servlets.SPARQL_ServletBase.doCommon(SPARQL_ServletB
> ase.java:76)
>
>          at
> org.openjena.fuseki.servlets.SPARQL_REST.service(SPARQL_REST.java:156)
>
>          at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>
>          at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:534)
>
>          at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:47
> 5)
>
>          at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.
> java:224)
>
>          at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.
> java:921)
>
>          at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403
> )
>
>          at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.j
> ava:184)
>
>          at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.j
> ava:856)
>
>          at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java
> :117)
>
>          at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.ja
> va:114)
>
>          at org.eclipse.jetty.server.Server.handle(Server.java:352)
>
>          at
> org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.jav
> a:596)
>
>          at
> org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConne
> ction.java:1069)
>
>          at
> org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805)
>
>          at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)
>
>          at
> org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
>
>          at
> org.eclipse.jetty.server.nio.BlockingChannelConnector$BlockingChannelEnd
> Point.run(BlockingChannelConnector.java:292)
>
>          at
> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.ja
> va:450)
>
>          at java.lang.Thread.run(Unknown Source)
>
> 09:41:18 INFO  Fuseki               :: [1] 500 Server Error
>
>
>
> There are very few google answers dealing with this case. Also, I do not
> know what to do? Is this a problem with SDB ?
>
>
>
> Thanks.
>
>
>
> Chris.
>
>
>
>