SELECT ?person ?personLabel WHERE { { SELECT ?person WHERE { BIND(wd:Q23 AS ?person). ?person wdt:P31 wd:Q5. SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } LIMIT 1 } }
Caused by: com.bigdata.rdf.internal.NotMaterializedException: Vocab(2):XSDUnsignedByte(23)
at com.bigdata.rdf.internal.impl.AbstractIV.getValue(AbstractIV.java:993)
at com.bigdata.rdf.sail.Bigdata2Sesame2BindingSetIterator.getBindingSet(Bigdata2Sesame2BindingSetIterator.java:298)
at com.bigdata.rdf.sail.Bigdata2Sesame2BindingSetIterator.hasNext(Bigdata2Sesame2BindingSetIterator.java:140)
... 11 more
Some similar queries have an XSDUnsignedInt instead of the XSDUnsignedByte in the error message.
Removing pretty much anything from the query above – any of the selected variables in either query, the limit, the subquery, the ?person wdt:P31 wd:Q5. triple, the label service – makes the error disappear, so some very strange combination of factors seems to be happening here. The only exception is the BIND() form, which is merely an optimization – without it, the query will take a while before it produces the same error.