You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Glaucio Jannotti <gj...@uol.com.br> on 2002/11/30 06:32:00 UTC
Problem with JDO Query
I have problem with a simple Query using JDO Engine.
The operation of save persistent class has working, the problem only occurs in the Query execution.
The code is the bellow:
Vector Lista = new Vector();
Query Consulta = Manager.newQuery(Paciente.class);
Lista = (Vector) Consulta.execute();
for (int I = 0; I < Lista.size(); I++)
{
System.out.println(((Paciente) Lista.get(I)).getNome());
}
The error of java is : NullPointerException.
I debuged the code and see what the Lista Vector has size() after the line "Lista = (Vector) Consulta.execute()".
What´s wrong in this code ?
The JDO Query is working ?
Can I made a Query in my JDO system using Broker.Query ?
[]´s
Glaucio Jannotti