Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 89261 invoked from network); 26 Jul 2006 14:17:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Jul 2006 14:17:08 -0000 Received: (qmail 2972 invoked by uid 500); 26 Jul 2006 14:17:05 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 2960 invoked by uid 500); 26 Jul 2006 14:17:05 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 2940 invoked by uid 99); 26 Jul 2006 14:17:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jul 2006 07:17:05 -0700 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=HTML_MESSAGE,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [203.91.201.23] (HELO wip-cdctls-mx3.wipro.com) (203.91.201.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jul 2006 07:17:03 -0700 Received: from wip-cdctls-mx3.wipro.com (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id B07F329C186 for ; Wed, 26 Jul 2006 19:46:39 +0530 (IST) Received: from chn-snr-bh2.wipro.com (chn-snr-bh2.wipro.com [10.145.50.92]) by wip-cdctls-mx3.wipro.com (Postfix) with ESMTP id A44F429C150 for ; Wed, 26 Jul 2006 19:46:39 +0530 (IST) Received: from HYD-MDP-MBX01.wipro.com ([10.150.50.182]) by chn-snr-bh2.wipro.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 26 Jul 2006 19:46:39 +0530 x-mimeole: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C6B0BE.1B4CCD08" Subject: Error while inserting Null value into MsSQL db Date: Wed, 26 Jul 2006 19:46:36 +0530 Message-ID: <2E7899FA2A83AB4480078DA88C8F10FB01A6B3C7@HYD-MDP-MBX01.wipro.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Error while inserting Null value into MsSQL db Thread-Index: Acawvhrok2ARMs/URV2t4ZiXMONtzQ== From: To: X-OriginalArrivalTime: 26 Jul 2006 14:16:39.0322 (UTC) FILETIME=[1C63DFA0:01C6B0BE] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------_=_NextPart_001_01C6B0BE.1B4CCD08 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable =0D Hi, =0D I am using Ibatis as the data mapper between my java classes and MsSql database. When I am trying to insert null value using java object i am getting the null pointer exception. =0D but if i directly insert null it works fine. =0D For example: =0D insert into USR_BASIC_INFO values (#userid#, #password#, #username#, #role#, #code#, #email#, #phonenumber#, #description#) The above query throws NULL pointer exception when any of the field value is null. say #password is NULL. =0D =0D insert into USR_BASIC_INFO values (#userid#, null, #username#, #role#, #code#, #email#, #phonenumber#, #description#) this works fine. can you please throw some light on this. Thanks n Regards, =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =0D Rambabu The information contained in this electronic message and any attachments to= this message are intended for the exclusive use of the addressee(s) and= may contain proprietary, confidential or privileged information. If you= are not the intended recipient, you should not disseminate, distribute or= copy this e-mail. Please notify the sender immediately and destroy all= copies of this message and any attachments.=0D WARNING: Computer viruses can be transmitted via email. The recipient= should check this email and any attachments for the presence of viruses.= The company accepts no liability for any damage caused by any virus= transmitted by this email. =0D www.wipro.com ------_=_NextPart_001_01C6B0BE.1B4CCD08 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
 
Hi,
 
   I am=0D using Ibatis as the data mapper between my java classes and MsSql database.= When=0D I am trying to insert null value using java object
  i= am getting=0D the null pointer exception.
 
   but if i directly insert null it works=0D fine.
 
  For example:
 

<insert id=3D"insertStaticProperties" parameterClass= =3D"user">

insert into USR_BASIC_INFO values (#userid#, #password#, #username#,= #role#,=0D #code#, #email#, #phonenumber#, #description#)

</insert>

The above query throws NULL pointer exception= when any=0D of the field value is null. say #password is NULL.
 
 

<insert id=3D"insertStaticProperties" parameterClass= =3D"user">

insert into USR_BASIC_INFO values (#userid#, null, #username#, #role#, #code#,= #email#,=0D #phonenumber#, #description#)

</insert>

this works=0D fine. can you please throw some light on=0D this.

Thanks n=0D Regards,
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 
Rambabu

The information contained in this electronic message and any attachments to= this message are intended for the exclusive use of the addressee(s) and= may contain proprietary, confidential or privileged information. If you= are not the intended recipient, you should not disseminate, distribute or= copy this e-mail. Please notify the sender immediately and destroy all= copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient= should check this email and any attachments for the presence of viruses.= The company accepts no liability for any damage caused by any virus= transmitted by this email.

www.wipro.com
------_=_NextPart_001_01C6B0BE.1B4CCD08--