This query gives me exception:

Exception in thread "AWT-EventQueue-0"
com.hp.hpl.jena.rdf.model.LiteralRequiredException:
http://www.semanticweb.org/t/ontologies#Smith



  "SELECT  * " +

                   " WHERE {" + " {"+ "select  (max(?score) as ?highScore)"
+ " { ?student std:Englishscore ?score" +
" }" +
"  } " +
        "?student std:Englishscore ?highScore"   +

          "}";


             Query query2 = QueryFactory.create(queryString2);
QueryExecution qexec = QueryExecutionFactory.create(query2, model) ;
ResultSet results2 = qexec.execSelect() ;

       Literal l2=results2.next().get("student").asLiteral();
        Literal l3=results2.next().get("highScore").asLiteral();
String s=l3.toString();
        JOptionPane.showMessageDialog(null,"high score is" + s );

Reply via email to