geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From saraswathi selvaraj <s_sara...@yahoo.com>
Subject Converting MySQL Boolean type to Java Boolean type
Date Wed, 30 Nov 2005 14:37:53 GMT
Hi,
   
  I tried to execute the sample CMP application loan-cmp with a field status type Boolean
in mysql 5.0.16.
  Iam able to create a record in the database using CMP create() & postCreate().
  But when i try to retreive any record using findByPrimaryKey it throws the exception :
   
      [java] java.lang.ClassCastException
    [java]      at org.openejb.client.CgLibProxy$$EnhancerByCGLIB$$a68aab.getSta
tus(<generated>)
    [java]      at com.ibm.demo.entity.client.EntityBeanClient.main(EntityBeanCl
ient.java:56)
   
  The problem may be MySQL treats Boolean as tinyint whereas in case of java boolean type
is different. So while retrieving the value it's causing ClassCastException.
   
  Can anyone help me in this regard.
   
  Thanks in advance,
  S.Saraswathi

		
---------------------------------
 Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
Mime
View raw message