https://issues.apache.org/jira/browse/JENA-497

The issue is that you are using sparql.html -- "General SPARQL Service" on the front page.

It is a form to send a query to the server which is not associated with any datasets. You have to use "Target graph URI" or put FROM NAMED? in query and the server will load the data for that query only.

Or you are programmatically sending a query to http://locahost:3030/sparql -- no dataset name -- which is effectively what the form does.

The new dispatch code gets this all wrong. (It's not a commonly used path - especially from the form.)

Workaround : use "Control Panel" -> your dataset -> ....

        Andy

On 02/08/13 07:41, Claude Warren wrote:
Lewis,

I just responded to your later post so if you follow that look at where the
dsRef is being constructed in the servlet configuration code.  I expect
that for some reason the dataset name is missing.  Perhaps it is missing in
your assembler file?

Claude


On Fri, Aug 2, 2013 at 12:06 AM, Lewis John Mcgibbney <
lewis.mcgibb...@gmail.com> wrote:

Hi,
For an in house R&D project, I've recently been working with adding some
functionality to the Fuseki UI.

First I start the server

law@lawx
:~/Downloads/Lewis/code/essem-fuseki/target/essem-fuseki-0.2.8-SNAPSHOT$
./fuseki-server --update --mem /susman
14:15:45 INFO  Server               :: Dataset: in-memory
14:15:45 INFO  Config               :: Home Directory:

/home/law/Downloads/Lewis/code/essem-fuseki/target/essem-fuseki-0.2.8-SNAPSHOT
14:15:45 INFO  Server               :: Dataset path = /susman
14:15:45 INFO  Server               :: Fuseki 0.2.8-SNAPSHOT
2013-08-01T14:15:02-0700
14:15:45 INFO  Server               :: Started 2013/08/01 14:15:45 PDT on
port 3030

Then I manually upload some triples from four different OWL files

14:16:27 INFO  Fuseki               :: [1] POST
http://localhost:3030/susman/upload
14:16:27 INFO  Fuseki               :: [1] Upload: Filename:
AssemblyProcess.owl, Content-Type=text/xml, Charset=null => RDF/XML
14:16:27 INFO  Fuseki               :: [1] Upload: Filename:
AutomobileManufacturing.owl, Content-Type=text/xml, Charset=null => RDF/XML
14:16:27 INFO  Fuseki               :: [1] Upload: Filename:
JoiningProcess.owl, Content-Type=text/xml, Charset=null => RDF/XML
14:16:27 INFO  Fuseki               :: [1] Upload: Filename:
MaterialHandlingEquipment.owl, Content-Type=text/xml, Charset=null =>
RDF/XML
14:16:27 INFO  Fuseki               :: [1] Upload: Graph: default (1148
triple(s))
14:16:27 INFO  Fuseki               :: [1] 200 OK (306 ms)

But I am experiencing a real nasty issue when I attempt to execute a query
via the "Get Results" button. My query is as follows

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX mheq: <

http://eil.stanford.edu:443/svn/eil-repo/Users/Lewis/ontology/MaterialHandlingEquipment.owl#

DESCRIBE ?individual
WHERE {
  ?individual rdf:type mheq:BeltConveyor.
}

I get the following

14:16:44 INFO  Fuseki               :: [2] GET

http://localhost:3030/sparql?query=PREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0APREFIX+mheq%3A+%3Chttp%3A%2F%2Feil.stanford.edu%3A443%2Fsvn%2Feil-repo%2FUsers%2FLewis%2Fontology%2FMaterialHandlingEquipment.owl%23%3E%0D%0ADESCRIBE+%3Findividual%0D%0AWHERE+%7B%0D%0A+%3Findividual+rdf%3Atype+mheq%3ABeltConveyor.++%0D%0A%7D++&default-graph-uri=&output=json&stylesheet=%2Fxml-to-html.xsl
14:16:44 WARN  Fuseki               :: [2] RC = 500 : null
java.lang.NullPointerException
     at

org.apache.jena.fuseki.servlets.SPARQL_ServletBase.mapRequestToService(SPARQL_ServletBase.java:311)
     at

org.apache.jena.fuseki.servlets.SPARQL_ServletBase.execCommonWorker(SPARQL_ServletBase.java:153)
     at

org.apache.jena.fuseki.servlets.SPARQL_ServletBase.doCommon(SPARQL_ServletBase.java:78)
     at
org.apache.jena.fuseki.servlets.SPARQL_Query.doGet(SPARQL_Query.java:64)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
     at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
     at

org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1448)
     at

org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:82)
     at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:294)
     at

org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
     at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
     at

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

org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
     at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
     at

org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
     at

org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
     at

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

org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
     at org.eclipse.jetty.server.Server.handle(Server.java:370)
     at

org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
     at

org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
     at

org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949)
     at

org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011)
     at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
     at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
     at

org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
     at

org.eclipse.jetty.server.nio.BlockingChannelConnector$BlockingChannelEndPoint.run(BlockingChannelConnector.java:298)
     at

org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
     at

org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
     at java.lang.Thread.run(Thread.java:724)
14:16:44 INFO  Fuseki               :: [2] 500 Server Error (3 ms)

So line 311 of SPARQL_ServletBase.mapRequestToService(DatasetRef dsRef,
String uri, String serviceName) looks like this...

         if ( dsRef.name.length() >= uri.length() )

A confession here is that I've come to the list before I begin debugging
this in Eclipse... which is where I am working on the code.
Has anyone had problems with "Getting Results" within the Fuseki WebApp
before e.g. has anyone seen a NPE around SPARQL_ServletBase before?
A quick look through the archives did not bring anything up for me so I'm
sending it here in parallel with DEBUG'ing the code myself.

Thanks in advance

Best
Lewis


--
*Lewis*





Reply via email to