I have been getting this Exception for a while now. I used to get this
Castor-0.9.9
and I upgrded to Castor-1.0M1. I still get the same exception.
Any ideas why? This only happens internittently. Works fine for some of
the updates.
20 11:40:08 [ MW Command 627714] ERROR
org.exolab.castor.jdo.engine.DatabaseImpl - This transaction has been
aborted and rolled back: Nested er
ror: java.lang.ClassCastException: java.sql.Timestamp:
java.sql.Timestamp
org.exolab.castor.jdo.TransactionAbortedException: Nested error:
java.lang.ClassCastException: java.sql.Timestamp: java.sql.Timestamp
at
org.castor.persist.AbstractTransactionContext.prepare(AbstractTransactionContext.java:1225)
at
org.exolab.castor.jdo.engine.DatabaseImpl.commit(DatabaseImpl.java:523)
at org.tigr.htc.persist.CastorJDO.update(CastorJDO.java:180)
Thanks
Sreenath
On Fri, 2006-01-20 at 18:16 +0100, Ralf Joachim wrote:
> Hi Manuel,
>
> have a look at:
>
> http://castor.codehaus.org/api/org/exolab/castor/jdo/Database.html#load(java.lang.Class,%20java.lang.Object,%20java.lang.Object)
>
> if this is what you wanted to.
>
> Regards
> Ralf
> Castor JDO, committer
>
>
> Manuel Castrillon schrieb:
> > Hello all.
> >
> > I have made a wrapper for Castor but when I preform a load I am faced
> > with the following dilemma.
> >
> > A new instance of my Object is created when I do load(), I realize that
> > this would not be a problem in C++ because I could pass by
> > reference...but in Java I really do not know how to go about this.
> >
> > Something like Cloneable would be nice but it is private... Here is my code:
> >
> >
> >
> > CastorWrapper castorWrapper = new CastorWrapper();
> > Cable c= new Cable();
> >
> >
> > //set required parameters
> >
> > c=castorWrapper.doLoad(db1,pk,c);
> >
> >
> >
> > public class CastorWrapper {
> >
> > public Cable doLoad(Database db, Object pk, Cable genObj)
> > throws Exception
> > {
> > &nbs! p; //Cable clone=(Cable)genObj.clone(); //would be perfect!!!!
> >
> > try {
> > //Ideally this would be the exact same instance, but obviously NOT
> > genObj=(Cable)db.load(genObj.getClass(),pk);
> > }
> > catch (PersistenceException pe) {
> > log4jCat.error("DB load failed.", pe);
> > db.rollback();
> > }
> > return genObj;
> > }
> >
> > }
> >
> >
> >
> > All suggestions would be greatly appreciated....
> >
> >
> >
> > Regards,
> >
> > Manuel
> >
> >
> >
> >
> >
> >
> >
> > Verschicken Sie romantische, coole und witzige Bilder per SMS!
> > Jetzt bei WEB.DE FreeMail: *http://f.web.de/?mc=021193*
> >
>
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------