LinkedDataFragments / Server.Java

A Triple Pattern Fragments server for Java
MIT License
27 stars 20 forks source link

Template error: “Expected a boolean, but this has evaluated to a number” #42

Closed RubenVerborgh closed 7 years ago

RubenVerborgh commented 7 years ago

https://query.wikidata.org/bigdata/ldf?subject=http%3A%2F%2Fwww.wikidata.org%2Fentity%2FQ58596&object=http%3A%2F%2Fwww.wikidata.org%2Fentity%2FQ355304

mielvds commented 7 years ago

Seems like this is getting into a branch it shouldn't be in. Will try to reproduce, any HDT datadump?

RubenVerborgh commented 7 years ago

@smalyshev might be able to help you out.

smalyshev commented 7 years ago

This seems to happen every time when query returns no results. E.g. the same happens with:

https://query.wikidata.org/bigdata/ldf?subject=http://duck&object=http://duck

BTW, this one:

https://query.wikidata.org/bigdata/ldf?subject=duck

has even less informative error message.

mielvds commented 7 years ago

@smalyshev #43 is a step in the right direction. I'm not sure the last master branch fixes the issues though, still not able to reproduce. What datasource are you using?

mielvds commented 7 years ago

Try https://github.com/LinkedDataFragments/Server.Java/releases/tag/v0.2.1 and let me know

smalyshev commented 7 years ago

@mielvds I notice the version on this tag is still 0.2.0. Also, it requires org.rdfhdt:hdt-jena:jar:2.0 which doesn't seem to be in standard maven repos. I'll try to make a custom build or maybe backport the changes.

mielvds commented 7 years ago

Hi @smalyshev, I've updated the release. The missing artifact is normal, I don't control the maven repo unfortunately (See https://github.com/rdfhdt/hdt-java/issues/32). You'll have to manually build a jar and add it to your local maven repo.

smalyshev commented 7 years ago

The problem with URLs like this:

https://query.wikidata.org/bigdata/ldf?subject=http://duck&object=http://duck

seems to be fixed (don't look on query.wikidata.org yet, it's not deployed, but I did check on local build and it seems to provide good error message). This however:

https://query.wikidata.org/bigdata/ldf?subject=duck

still has just "duck" as error message. Not a huge deal but something more informative than repeating the input.

mielvds commented 7 years ago

So the strange thing is that I cannot reproduce the ?subject=duck issue with an HDT datasource. This is probably an error message created in the BlazeGraph datasource from @hartig, which throws an exception when it receives "duck" as subject ( maybe an invalid IRI?).

I'll close this issue for now, as the other issue seems to be resolved.