hi..
back to my problems..
I have a class Commande that has many LigneDeCommande and one Client.
LigneDeCommande has many Produit, Produit has a Price.
Let's assume there's at least one Client c1 and one Produit p1 in db ; when
first inserting a Commande for c1, containing LigneDeCommande relative to
p1, all WORKS FINE.. data are written to db.
BUT when i RETRY just next i got an EXCEPTION in method setQuantite of
LigneDeCommande : the Produit contained in LigneDeCommande is found null,
although it is well instantiated (i checked it in cons.)..
On top of that what i can't understand at all is that exception is thrown on
the specified line below :
oqlQuery = db.getOQLQuery("select c from estore.Client c");
res = oqlQuery.execute();
Commande cmd = new Commande(null, 0, ldcVec);
if ( res.hasMore() ){ // <-- throw exception
cmd.setClient((Client)res.next());
}
and this line has NOTHING to do with LigneDeCommande.setQuantite(int q)
so what's the problem with this???
below the StackTrace (same as in my previous msg) :
java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
at estore.LigneDeCommande.setQuantite(LigneDeCommande.java:50)
at java.lang.reflect.Method.invoke(Native Method)
at org.exolab.castor.persist.FieldMolder.setValue(FieldMolder.java:307)
at org.exolab.castor.persist.ClassMolder.load(ClassMolder.java:672)
at org.exolab.castor.persist.LockEngine.load(LockEngine.java:361)
at
org.exolab.castor.persist.TransactionContext.load(TransactionContext.java:545)
at
org.exolab.castor.persist.TransactionContext.load(TransactionContext.java:479)
at org.exolab.castor.persist.ClassMolder.load(ClassMolder.java:742)
at org.exolab.castor.persist.LockEngine.load(LockEngine.java:361)
at
org.exolab.castor.persist.TransactionContext.load(TransactionContext.java:545)
at
org.exolab.castor.persist.TransactionContext.load(TransactionContext.java:479)
at org.exolab.castor.persist.ClassMolder.load(ClassMolder.java:742)
at org.exolab.castor.persist.LockEngine.load(LockEngine.java:361)
at
org.exolab.castor.persist.TransactionContext.load(TransactionContext.java:545)
at org.exolab.castor.persist.QueryResults.fetch(QueryResults.java:229)
at
org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImpl.java:573)
at
org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImpl.java:556)
at estore.EstoreMain.populateCmds(EstoreMain.java:51)
at estore.EstoreMain.goGoGo(EstoreMain.java:30)
at estore.EstoreMain.main(EstoreMain.java:171)
--
gilles dodinet
_________________________________________________________________
T�l�chargez MSN Explorer gratuitement � l'adresse
http://explorer.msn.fr/intl.asp
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev