Stardog 5 beta - Wildcard construct causing error

Hi,

Finding lots of things today. Dunno if this is a known issue.

construct{
 ?a ?b ?c.
} where {                                                                                          
 ?a ?b ?c.
}

That query is causing an error in stardog when run from the frontend with reasoning disabled. From the logs:

ERROR 2017-05-19 13:27:26,172 [XNIO-1 task-13] com.stardog.http.server.undertow.ErrorHandling:writeError(179): Unexpected error on the server
java.lang.NullPointerException: null
        at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeReadQuery(ProtocolUtils.java:524) ~[stardog-protocols-http-server-5.0-beta.jar:?]
        at com.complexible.stardog.protocols.http.annex.QueryPanelService.executeQuery(QueryPanelService.java:195) ~[stardog-webconsole-annex-5.0-beta.jar:?]
        at com.complexible.stardog.protocols.http.annex.QueryPanelService.post(QueryPanelService.java:120) ~[stardog-webconsole-annex-5.0-beta.jar:?]
        at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$81(ExtractRoutes.java:183) ~[stardog-protocols-http-server-5.0-beta.jar:?]
        at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) ~[shiro-core-1.2.3.jar:1.2.3]
        at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) ~[shiro-core-1.2.3.jar:1.2.3]
        at com.stardog.http.server.undertow.ErrorHandling.lambda$safeDispatch$43(ErrorHandling.java:70) ~[stardog-protocols-http-server-5.0-beta.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_111-internal]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_111-internal]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111-internal]

Cheers,
Håvard

Hi Håvard,

This is a bug that has been reported on here a couple of times actually, and it’s already been fixed! It will be included in the next 5.0 release.

It’s essentially that the webconsole no longer executes CONSTRUCT queries, because a loophole in our web server that was allowing it to send the wrong Accept header was closed up with 5.0. Running them through the CLI should give you no problems though.