Yes, he awayls return a null collection. But has data in the database what i have recorded using manager.makepersistente funciontion.
[]īs Glaucio Jannotti ----- Original Message ----- From: <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Monday, December 02, 2002 8:15 PM Subject: RE: RE: Problem with JDO Query It should yes, so the execute is always returning null? Travis ---- Original Message ---- From: gjannotti <[EMAIL PROTECTED]> Sent: 2002-12-02 To: [EMAIL PROTECTED] Subject: RE: Problem with JDO Query I try this, but the same error ocurrs using Colletion or Vector. This function of OJB JDO realy works ? []īs Glaucio Jannotti > You should probably cast the execute () to Collection rather than Vector. > > Collection Lista = (Collection) Consulta.execute(); > > travis > > ---- Original Message ---- > From: Glaucio Jannotti <[EMAIL PROTECTED]> > Sent: 2002-11-29 > To: [EMAIL PROTECTED] > Subject: Problem with JDO Query > > I have problem with a simple Query using JDO Engine. > The operation of save persistent class has working, the prob lem 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 > > > -- > To unsubscribe, e-mail: <mailto:ojb-user- [EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:ojb-user- [EMAIL PROTECTED]> > > --- UOL, o melhor da Internet http://www.uol.com.br/ -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>