plt-tud / r43ples

Revision Management for the Semantic Web
Other
19 stars 16 forks source link

NullPointer when querying Virtuoso over R43ples #48

Open depressiveRobot opened 9 years ago

depressiveRobot commented 9 years ago

I get the following error when I try to query a Virtuoso tied to R43ples:

query via curl:

curl -X "POST" "http://localhost:9998/r43ples/sparql" \
    -H "Content-Type: application/x-www-form-urlencoded" \
    --data-urlencode "query=select (count(*) as ?count) from <urn:testData> where {?s ?p ?o .}"

error log:

27.10.2015 11:27:17 de.tud.plt.r43ples.webservice.Endpoint - SPARQL request (format=*/*, join_option=) ->
 select (count(*) as ?count) from <urn:testData> where {?s ?p ?o .}
27.10.2015 11:27:22 de.tud.plt.r43ples.triplestoreInterface.VirtuosoInterface - CREATE SILENT GRAPH <http://eatld.et.tu-dresden.de/r43ples-revisions>
27.10.2015 11:27:22 de.tud.plt.r43ples.triplestoreInterface.TripleStoreInterface - Create sdd graph from null
27.10.2015 11:27:22 de.tud.plt.r43ples.triplestoreInterface.VirtuosoInterface - CREATE SILENT GRAPH <http://eatld.et.tu-dresden.de/r43ples-revisions>
27.10.2015 11:27:22 de.tud.plt.r43ples.webservice.ExceptionMapper -
java.lang.NullPointerException
    at sun.misc.MetaIndex.mayContain(MetaIndex.java:243)
    at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:830)
    at sun.misc.URLClassPath.getResource(URLClassPath.java:199)
    at sun.misc.URLClassPath.getResource(URLClassPath.java:251)
    at java.lang.ClassLoader.getBootstrapResource(ClassLoader.java:1305)
    at java.lang.ClassLoader.getResource(ClassLoader.java:1144)
    at java.lang.ClassLoader.getResource(ClassLoader.java:1142)
    at java.lang.ClassLoader.getSystemResource(ClassLoader.java:1267)
    at java.lang.ClassLoader.getSystemResourceAsStream(ClassLoader.java:1370)
    at de.tud.plt.r43ples.management.JenaModelManagement.readTurtleFileToJenaModel(JenaModelManagement.java:23)
    at de.tud.plt.r43ples.triplestoreInterface.TripleStoreInterface.init(TripleStoreInterface.java:35)
    at de.tud.plt.r43ples.triplestoreInterface.TripleStoreInterfaceSingleton.get(TripleStoreInterfaceSingleton.java:41)
    at de.tud.plt.r43ples.management.Interface.getSelectConstructAskResponseClassic(Interface.java:92)
    at de.tud.plt.r43ples.management.Interface.sparqlSelectConstructAsk(Interface.java:46)
    at de.tud.plt.r43ples.webservice.Endpoint.getSparqlResponse(Endpoint.java:439)
    at de.tud.plt.r43ples.webservice.Endpoint.sparql(Endpoint.java:319)
    at de.tud.plt.r43ples.webservice.Endpoint.sparqlPOST(Endpoint.java:213)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:164)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:181)
    at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:158)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:101)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
    at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:305)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:288)
    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1110)
    at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:381)
    at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:219)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
    at java.lang.Thread.run(Thread.java:745)
Oct 27, 2015 11:27:22 AM org.glassfish.jersey.server.ServerRuntime$Responder mapException
SEVERE: An exception has been thrown from an exception mapper class de.tud.plt.r43ples.webservice.ExceptionMapper.
java.lang.NullPointerException
    at de.tud.plt.r43ples.webservice.ExceptionMapper.toResponse(ExceptionMapper.java:41)
    at org.glassfish.jersey.server.ServerRuntime$Responder.mapException(ServerRuntime.java:572)
    at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:453)
    at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:313)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:288)
    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1110)
    at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:381)
    at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:219)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
    at java.lang.Thread.run(Thread.java:745)

Oct 27, 2015 11:27:22 AM org.glassfish.jersey.server.ServerRuntime$Responder mapException
SEVERE: An exception was not mapped due to exception mapper failure. The HTTP 500 response will be returned.
java.lang.NullPointerException
    at sun.misc.MetaIndex.mayContain(MetaIndex.java:243)
    at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:830)
    at sun.misc.URLClassPath.getResource(URLClassPath.java:199)
    at sun.misc.URLClassPath.getResource(URLClassPath.java:251)
    at java.lang.ClassLoader.getBootstrapResource(ClassLoader.java:1305)
    at java.lang.ClassLoader.getResource(ClassLoader.java:1144)
    at java.lang.ClassLoader.getResource(ClassLoader.java:1142)
    at java.lang.ClassLoader.getSystemResource(ClassLoader.java:1267)
    at java.lang.ClassLoader.getSystemResourceAsStream(ClassLoader.java:1370)
    at de.tud.plt.r43ples.management.JenaModelManagement.readTurtleFileToJenaModel(JenaModelManagement.java:23)
    at de.tud.plt.r43ples.triplestoreInterface.TripleStoreInterface.init(TripleStoreInterface.java:35)
    at de.tud.plt.r43ples.triplestoreInterface.TripleStoreInterfaceSingleton.get(TripleStoreInterfaceSingleton.java:41)
    at de.tud.plt.r43ples.management.Interface.getSelectConstructAskResponseClassic(Interface.java:92)
    at de.tud.plt.r43ples.management.Interface.sparqlSelectConstructAsk(Interface.java:46)
    at de.tud.plt.r43ples.webservice.Endpoint.getSparqlResponse(Endpoint.java:439)
    at de.tud.plt.r43ples.webservice.Endpoint.sparql(Endpoint.java:319)
    at de.tud.plt.r43ples.webservice.Endpoint.sparqlPOST(Endpoint.java:213)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:164)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:181)
    at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:158)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:101)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
    at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:305)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:288)
    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1110)
    at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:381)
    at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:219)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
    at java.lang.Thread.run(Thread.java:745)

config:

## Triplestore settings

## Triplestore settings
# tdb, virtuoso, http, http_virtuoso
triplestore.type = virtuoso
triplestore.url = docker.local:1111
triplestore.user = dba
triplestore.password = dba

## SPARQL Endpoint settings
#http.url = http://localhost:5820/myDB/query
#http.user = admin
#http.password = admin

## Web Service Settings
service.host = localhost
service.port = 9998
service.path = /r43ples

## SSL settings
ssl.keystore = ssl/keystoreR43ples
ssl.password = r43ples

## R43ples settings
# Named Graph for storing revision trees
revision.graph = http://eatld.et.tu-dresden.de/r43ples-revisions
# Named Graph for storing the SDD
sdd.graph = http://eatld.et.tu-dresden.de/r43ples-sdd
# Default content of SDD
#sdd.graph.defaultContent = sdd.ttl

I am using R43ples 0.8.7.

stephanhensel commented 9 years ago

Please try to uncomment the following part of the config file:

#sdd.graph.defaultContent = sdd.ttl

This should fix the error.

depressiveRobot commented 9 years ago

Nope, it does not!

## Triplestore settings

## Triplestore settings
# tdb, virtuoso, http, http_virtuoso
triplestore.type = virtuoso
triplestore.url = docker.local:1111
triplestore.user = dba
triplestore.password = dba

## SPARQL Endpoint settings
#http.url = http://localhost:5820/myDB/query
#http.user = admin
#http.password = admin

## Web Service Settings
service.host = localhost
service.port = 9998
service.path = /r43ples

## SSL settings
ssl.keystore = ssl/keystoreR43ples
ssl.password = r43ples

## R43ples settings
# Named Graph for storing revision trees
revision.graph = http://eatld.et.tu-dresden.de/r43ples-revisions
# Named Graph for storing the SDD
sdd.graph = http://eatld.et.tu-dresden.de/r43ples-sdd
# Default content of SDD
sdd.graph.defaultContent = sdd.ttl
stephanhensel commented 9 years ago

Is it the same error as before? Are there any graphs in your virtuoso created by R43ples?