Title: RE: CMP2 java.lang.Short mapping for Oracle 9i

Anthony,
It was a cast Exception..
Unfortunately I have to support existing code, so move to start support Oracle without changing
code is very painful.
I don't know if they fixed all bugs.
BTW, try debug version of jdbc driver(with suffix 'g').
At least You can see what the problem

Boris

From: "Anthony Geoghegan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Re: [JBoss-user] RE: CMP2 java.lang.Short mapping for Oracle 9i
Date: Thu, 5 Sep 2002 10:10:09 +0100
Reply-To: [EMAIL PROTECTED]

I had this problem too.  Luckily it's a new app and I didn't have existing
code to support.  I just changed all the fields to java.lang.Integer type.
That ojdbc14.jar has had a lot of bug fixes applied recently so I don't know
if it's the most stable or not.
It's a cast exception of some sort you get isn't it?

Best Regards,
Anthony Geoghegan.
J2EE Developer
CPS Ireland Ltd.
----- Original Message -----
From: "Boris Tamarkin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, September 04, 2002 10:53 PM
Subject: [JBoss-user] RE: CMP2 java.lang.Short mapping for Oracle 9i


> Thanks David,
> It as a driver issue.
>
> Boris
>
> From: David Ward <[EMAIL PROTECTED]>
> Organization: Distributed Object Technologies, Inc.
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] RE: CMP2 java.lang.Short mapping for Oracle 9i
> Reply-To: [EMAIL PROTECTED]
>
> Just curious if you've tried the 9.2.0.1.0 driver, "ojdbc14.jar"
> Oracle has stopped calling it classes12.zip/jar.  Not sure if the latest
> would work better for you or not...
>
> David
>
> --
>
> Boris Tamarkin wrote:
> > So java.lang.Short can't be mapped with CMP2 for Oracle?
> > It is strange.
> > I tried to replace jdbc-type with INTEGER, but it doesn't work as well.
> > I don't wont to change existing code: replace java.lang.Short type with
> > Integer, because it is already works with
> > mySQL and MSSQL databases  fine. We just need to add support to Oracle.
> > BTW, I have the Oracle 9i version of classes12.jar in lib directory
> >
> > Anyone knows how to resolve this issue with supporting java.lang.Short
> > in CMP2?
> > I have tried to search in forum archives without success.
> > Dan, may be You can help?
> > Thanks,
> >     Boris
> >
> > From: "Saroj Kumar" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Subject: RE: [JBoss-user] CMP2 java.lang.Short mapping for Oracle 9i
> > Date: Wed, 4 Sep 2002 10:42:02 +0530
> > Organization: wipro
> > Reply-To: [EMAIL PROTECTED]
> >
> > Try INTEGER.
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]] On Behalf Of Boris
> > Tamarkin
> > Sent: Wednesday, September 04, 2002 3:44 AM
> > To: '[EMAIL PROTECTED]'
> > Subject: [JBoss-user] CMP2 java.lang.Short mapping for Oracle 9i
> >
> >
> >
> > What correct mapping for "java.lang.Short" should be for Oracle 9i in
> > standardjbosscmp-jdbc.xml file?
> > I have tried
> >             <java-type>java.lang.Short</java-type>
> >             <jdbc-type>NUMERIC</jdbc-type>
> >             <sql-type>NUMBER(5)</sql-type>
> > also
> >             <java-type>java.lang.Short</java-type>
> >             <jdbc-type>SMALLINT</jdbc-type>
> >             <sql-type>SMALLINT</sql-type>
> > also
> >             <java-type>java.lang.Short</java-type>
> >             <jdbc-type>NUMERIC</jdbc-type>
> >             <sql-type>SMALLINT</sql-type>
> > also
> >             <java-type>java.lang.Short</java-type>
> >             <jdbc-type>SMALLINT</jdbc-type>
> >             <sql-type>NUMBER(5)</sql-type>
> > and no success.
> > I got java.lang.ClassCastException in ejbCreate(..., java.lang.Short
> > arg, ....).
> >
> > It happens when using CMP2 on JBoss3.0.0-tomcat4.0.3.
> > Also I tried both SMALLINT and Number(5) types for column in table in
> > Oracle 9i database that corresponds to Short type.
> >
> > with all combinations above.
> > Will appreciate help.
> > Thanks,
> >   Boris
>

Reply via email to