Hello;

I am experiencing a problem. I am trying to retrieve PersonalCustomer from
DB2. PersonalCustomer extends Customer and each have its own tables in DB2.
I am able to retrieve Customer successfully. I am able to retrieve
PersonalCustomer too when I remove the inheritance hierachly both in code
and Castor mapping file. But when PersonalCustomer extends Custoemr and
declare this using "extends" keyword in Castor mapping file I am receiving
following exception when I call hasMore() on result set object:

java.lang.NullPointerException
        at
COM.ibm.db2.jdbc.app.DB2ResultSet.cvtScientific(DB2ResultSet.java:809)
        at
COM.ibm.db2.jdbc.app.DB2ResultSet.getBigDecimal2(DB2ResultSet.java:959)
        at
COM.ibm.db2.jdbc.app.DB2ResultSet.getBigDecimal(DB2ResultSet.java:919)
        at
org.exolab.castor.jdo.engine.SQLTypes.getObject(SQLTypes.java:319)
        at
org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.loadIdentity(SQLEngine.java:
1611)
        at
org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.nextIdentity(SQLEngine.java:
1651)
        at
org.exolab.castor.persist.QueryResults.nextIdentity(QueryResults.java:173)
        at
org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImp
l.java:571)
        at
org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImp
l.java:557)
        at newCastor.Castor2.retrieveCorporateCustomer(Castor2.java:184)
        at newCastor.Castor2.main(Castor2.java:50)
Exception in thread "main"



Weird thing is that my code successfully runs on Oracle. I believe the
problemis with DB2 or its driver.
DB runs on NT and I use "COM.ibm.db2.jdbc.app.DB2Driver".

Any idea?

Best regards,



_____________________________________________________________________
Akin Kaldiroglu                           [EMAIL PROTECTED]
Java Consultant

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to