As Dave said, wrong PREFIX declaration. >> >> "Select *" + "where { ?x rdf:type std:StudentExpert }"; >> Moreover, your String concatenation will lead to
Select *where { ?x rdf:type std:StudentExpert } i.e. there is a missing whitespace before "where". -- Lorenz Bühmann AKSW group, University of Leipzig Group: http://aksw.org - semantic web research center