Armin:

SequenceManagerHighLowImpl is generating the primary key which is stored in
Oracle 9i as NUMBER. Data conversion is required for two other regular
fields. Where exactly is the bug? When will it be fixed? Also is it a common
practice to boundle ojb.jar inside myejb.jar file?

Thank you very much!
Lucy

-----Original Message-----
From: Armin Waibel [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 21, 2003 11:27 AM
To: OJB Users List
Subject: Re: ClassCastException in OJB 0.9.9 with Oracle 9i


Hi Lucy,

there is bug in field conversion when the field
is a primay key. Then it seems that the conversion
was not done in some cases.

regards,
Armin

----- Original Message -----
From: "Lucy Zhao" <[EMAIL PROTECTED]>
To: "'OJB Users List'" <[EMAIL PROTECTED]>
Sent: Friday, February 21, 2003 4:42 PM
Subject: RE: ClassCastException in OJB 0.9.9 with Oracle 9i


> I have three java data types in the object. The mappings are the
following:
> String  - VARCHAR - VARCHAR2
> int     - INTEGER - NUMBER
> boolean - BIT     - NUMBER(1)
> The boolean mapping uses
>
"org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversio
n"
>
> I think they are all correct mappings. But it does seem like a data
> conversion problem. Could it be a bug?
>
> Thanks,
> Lucy
>
> -----Original Message-----
> From: Andrew Gilbert [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 21, 2003 10:17 AM
> To: OJB Users List
> Subject: RE: ClassCastException in OJB 0.9.9 with Oracle 9i
>
>
> What are some specifics for class and meta data in your scenario?
>
> Could it be an issue with the data type your are mapping?
> http://db.apache.org/ojb/jdbc-types.html
>
>
>
> -----Original Message-----
> From: Lucy Zhao [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 21, 2003 10:04 AM
> To: OJB Users List (E-mail)
> Subject: ClassCastException in OJB 0.9.9 with Oracle 9i
>
>
> Would some one please throw some light on this?
>
> In the design, a stateless session bean passes a persistence broker
instance
> to an OJB component that does the CRUD functions. EJB was deployed to
JBoss
> successfully, but when envoking the OJB component, application throws
> ClassNotFoundException. So I included ojb.jar inside myejb.jar.
> ClassNotFoundException was fixed and the retrieval of objects works.
>
> But when save or store object, a ClassCastException throws.
>
> Questions 1) Is it right to include ojb.jar in myejb.jar file?
>
>                 2) What causes the ClassCastException?
>
> OJB 0.9.9 / Oracle 9i (ojdbc14.jar 4/26/2002 11:47AM) /  JDK 1.4.1_01
/
> JBoss 3.0.4
>
> 18:51:54,729 ERROR [LogInterceptor] RuntimeException:
> java.lang.ClassCastException
>         at
>
oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedState
ment
> .java:2793)
>         at
>
oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedState
ment
> .java:2905)
>         at
>
org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.setObject(L
ocal
> PreparedStatement.java:607)
>         at
>
org.apache.ojb.broker.platforms.PlatformDefaultImpl.setObjectForStatemen
t(Un
> known Source)
>         at
>
org.apache.ojb.broker.platforms.PlatformOracleImpl.setObjectForStatement
(Unk
> nown Source)
>         at
> org.apache.ojb.broker.accesslayer.StatementManager.bindInsert(Unknown
> Source)
>         at
> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(Unknown
> Source)
>         at
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.storeToDb(Unknown
> Source)
>         at
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.store(Unknown
Source)
>         at
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.store(Unknown
Source)
>         at
>
org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.store(Unknown
> Source)
>         ......
>
> 18:51:54,749 WARN  [RequestProcessor] Unhandled Exception thrown:
class
> java.rmi
> .ServerException
> 18:51:54,749 WARN  [jbossweb] WARNING: Exception for
> /edispatch/updateSiteType.do: java.rmi.ServerException:
RuntimeException;
> nested exception is:
>         java.lang.ClassCastException
>
> Lucy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to