Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 79914 invoked from network); 30 Nov 2005 14:38:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Nov 2005 14:38:19 -0000 Received: (qmail 10722 invoked by uid 500); 30 Nov 2005 14:38:15 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 10697 invoked by uid 500); 30 Nov 2005 14:38:14 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 10686 invoked by uid 99); 30 Nov 2005 14:38:14 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2005 06:38:14 -0800 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=DNS_FROM_RFC_ABUSE,FROM_HAS_ULINE_NUMS,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [66.218.93.171] (HELO web42003.mail.yahoo.com) (66.218.93.171) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 30 Nov 2005 06:39:44 -0800 Received: (qmail 30233 invoked by uid 60001); 30 Nov 2005 14:37:53 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=W4etDEgOrvfrIiowfDkdz2xZYq8qW0cdywyuft4a6ct7S8jbS70D9vYQF6VR/gtSfaJi38Wlj/3I8sSKCiphCdD+R+YPunAMDrera1XJ3GOCsF3WHwF/UHTg70z5S3LvQhC2auHFOhCem1JoNMdufOzjIxqhFVfiIqXAcB8kudo= ; Message-ID: <20051130143753.30231.qmail@web42003.mail.yahoo.com> Received: from [203.99.195.4] by web42003.mail.yahoo.com via HTTP; Wed, 30 Nov 2005 06:37:53 PST Date: Wed, 30 Nov 2005 06:37:53 -0800 (PST) From: saraswathi selvaraj Subject: Converting MySQL Boolean type to Java Boolean type To: Geronimo MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-435258751-1133361473=:23691" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --0-435258751-1133361473=:23691 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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() [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. --0-435258751-1133361473=:23691 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
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. --0-435258751-1133361473=:23691--