Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JENA-1366: Fuseki embedded as a standalone server #265

Merged
merged 3 commits into from
Jun 25, 2017

Conversation

afs
Copy link
Member

@afs afs commented Jun 21, 2017

No description provided.

@kinow
Copy link
Member

kinow commented Jun 24, 2017

Planning to test it this weekend, but in case I take too long, the pull request is only adding code, that seems good to me. I want to give it a try so that I learn what it is doing, and can also perhaps help with the documentation later :-)

Copy link
Member

@kinow kinow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty much everything worked. Here's what I did.

$ git fetch -p --all ; git checkout pr/265
$ mvn clean install -Pdev -skipTests
$ cd jena-fuseki2/jena-fuseki-basic
$ ./run-sparqler

Then went to http://localhost:3030, and all good. Quickly clicked on the menu items, trying to validate/parse the default queries...

Looked at the console and got the following when using the RDF data validator.

23:07:11 WARN  Request              :: Exception in validationRequest
org.apache.jena.riot.RiotException: No source specified
	at org.apache.jena.riot.RDFParserBuilder.build(RDFParserBuilder.java:459)
	at org.apache.jena.fuseki.validation.html.DataValidatorHTML.executeHTML(DataValidatorHTML.java:97)
	at org.apache.jena.fuseki.validation.DataValidator.executeHTML(DataValidator.java:36)
	at org.apache.jena.fuseki.validation.ValidatorBase.execute(ValidatorBase.java:119)
	at org.apache.jena.fuseki.validation.ValidatorBase.doPost(ValidatorBase.java:60)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
	at org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.java:99)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.Server.handle(Server.java:564)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
	at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
	at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
	at java.lang.Thread.run(Thread.java:748)

Then I thought there could be something wrong with the default Turtle. Tried with the first example from https://www.w3.org/TR/turtle/, and left the checkbox selected to Turtle. Still same problem.

@base <http://example.org/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rel: <http://www.perceive.net/schemas/relationship/> .

<#green-goblin>
    rel:enemyOf <#spiderman> ;
    a foaf:Person ;    # in the context of the Marvel universe
    foaf:name "Green Goblin" .

<#spiderman>
    rel:enemyOf <#green-goblin> ;
    a foaf:Person ;
    foaf:name "Spiderman", "Человек-паук"@ru .

The problem seems to happen here

if ( uri == null && path == null && content == null && inputStream == null && javaReader == null )

However, I'm not sure with that's expected behaviour or bug... I have the impression we want to validate it, but without having a file/stream/reader. Just the content?

Does that make sense?

Hope that helps
Bruno

@kinow
Copy link
Member

kinow commented Jun 24, 2017

Double checked the messages displayed to user, all look goods, no typos or confusing text. Very simple to understand how to use it. The provided shell scripts are helpful too, as well as comments in Java and shell in case users want to customize it.

shellcheck complains only about some strings not quoted in the run-sparqler script.

kinow@localhost:~/Development/java/jena/jena/jena-fuseki2/jena-fuseki-basic/sparqler$ shellcheck run-sparqler 

In run-sparqler line 55:
    exec java $JVM_ARGS $FUSEKI_LOG -jar $FUSEKI_JAR $SPARQLER_ARGS
              ^-- SC2086: Double quote to prevent globbing and word splitting.
                        ^-- SC2086: Double quote to prevent globbing and word splitting.
                                         ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In run-sparqler line 59:
    nohup java $JVM_ARGS $FUSEKI_LOG -jar $FUSEKI_JAR $SPARQLER_ARGS > nohup.log 2>&1 &
               ^-- SC2086: Double quote to prevent globbing and word splitting.
                         ^-- SC2086: Double quote to prevent globbing and word splitting.
                                          ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                      ^-- SC2086: Double quote to prevent globbing and word splitting.

@afs
Copy link
Member Author

afs commented Jun 24, 2017

shellcheck needs to try harder :-)

I'll fix $FUSEKI_JAR. The others are supposed to expand to zero, one or more exec arguments.

@afs
Copy link
Member Author

afs commented Jun 24, 2017

Error No source specified fixed.

@kinow
Copy link
Member

kinow commented Jun 24, 2017

Everything working now 👍

@asfgit asfgit merged commit d983310 into apache:master Jun 25, 2017
asfgit pushed a commit that referenced this pull request Jun 25, 2017
@afs afs deleted the fuseki-basic branch June 25, 2017 14:37
@afs
Copy link
Member Author

afs commented Jun 25, 2017

Thanks!

The module structure of Fuseki2 is now a bit messy, but tolerable. What the right structure is can wait; it needs to balance usefulness (not too many module) with detailed structure (each different aspect a module).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants