NullPointerException for SPARQLQueryResults.next

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

NullPointerException for SPARQLQueryResults.next

Alex K.

Hi,

Trying to query an owl through APIs. In case that there is only one result it works fine, otherwise with having more than one results I get the following exception:

java.lang.NullPointerException
    at edu.stanford.smi.protegex.owl.model.query.SPARQLQueryResults.next(Unknown Source)
   
I'm using Protege 3.2 Beta


Sample code is here :

QueryResults qr = owlModel.executeSPARQLQuery(oldquery);
while (qr.hasNext()){
      Map map = qr.next();
           System.out.println(map.toString());
}

Thanks for any help


Alex