Re: Oracle ClassCast Exception

From: Mike Kienenberger (mkienen..laska.net)
Date: Wed Feb 16 2005 - 13:19:31 EST

  • Next message: Cris Daniluk: "RE: Oracle ClassCast Exception"

    =?ISO-8859-1?Q?Jo=E3o_Paulo_Vasconcellos?= <vasconcello..mail.com> wrote:
    > Man, I can't believe how lazy I am...
    > I didn't converted the login from Strting to Integer before passing
    > them to cayenne...
    > Impressive how proud I am, hacking the XML before double-checking my code.
    >
    > All solved.

    Yeah, we've submitted TARs to Oracle before about the inability to handle
    standard type conversions in setObject().
    The whole point of setObject is that it should do obvious conversions for
    you.

    Maybe one day the driver developers will get it right.

    -Mike

    > On Wed, 16 Feb 2005 12:32:46 -0500, Mike Kienenberger
    > <mkienen..laska.net> wrote:
    > > =?ISO-8859-1?Q?Jo=E3o_Paulo_Vasconcellos?= <vasconcello..mail.com>
    wrote:
    > > > Very good shot, I only get problems on tables with DATE fields...
    > > >
    > > > INFO QueryLogger: +++ Connecting: SUCCESS.
    > > > INFO QueryLogger: SELECT t0.DES_EMAIL, t0.DES_SUGESTAO,
    > > t0.NUM_SEQ_FALE_COM_DIX
    > > > AMICO FROM DIXSP.SUGESTAO_WEB t0
    > > > INFO QueryLogger: === returned 0 rows. - took 219 ms.
    > > > INFO QueryLogger: +++ no commit - transaction controlled externally.
    > > > INFO QueryLogger: --- will run 1 query.
    > > > INFO QueryLogger: SELECT t0.DES_EMAIL, t0.DES_SUGESTAO,
    > > t0.NUM_SEQ_FALE_COM_DIX
    > > > AMICO FROM DIXSP.SUGESTAO_WEB t0
    > > > INFO QueryLogger: === returned 0 rows. - took 16 ms.
    > > > INFO QueryLogger: +++ no commit - transaction controlled externally.
    > > >
    > > > All went fine.
    > > >
    > > > Correct me if I am wrong, a quickfix would be to change the default
    types
    > > in
    > > >
    > > > org.objectstyle.cayenne.dba.types.xml
    > > >
    > > > from DATE to TIMESTAMP, correct?
    > >
    > > TIMESTAMP is an Oracle 9 type, so that won't help you even if it's
    > > date-related. types.xml should already be correct for Oracle 8.
    > > I think you'll have to see what's going on at
    AbstractType.setJdbcObject().
    > > I don't see why it's date related since you're only doing setObject
    calls on
    > > NUMBER fields.
    > >
    > >
    >
    >
    > --
    > Joćo Paulo Vasconcellos
    > ICQ: 123-953-864



    This archive was generated by hypermail 2.0.0 : Wed Feb 16 2005 - 13:18:51 EST