geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From saraswathi selvaraj <>
Subject Converting MySQL Boolean type to Java Boolean type
Date Wed, 30 Nov 2005 14:37:53 GMT
  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
    [java]      at
  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,

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