Return-Path: Mailing-List: contact ibatis-user-java-help@incubator.apache.org; run by ezmlm Delivered-To: mailing list ibatis-user-java@incubator.apache.org Received: (qmail 14219 invoked by uid 99); 13 Jan 2005 16:30:25 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from smtp003.mail.ukl.yahoo.com (HELO smtp003.mail.ukl.yahoo.com) (217.12.11.34) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 13 Jan 2005 08:30:25 -0800 Received: from unknown (HELO ?10.0.0.11?) (krisajenkins@81.178.1.69 with login) by smtp003.mail.ukl.yahoo.com with SMTP; 13 Jan 2005 16:30:23 -0000 Received: from 127.0.0.1 (AVG SMTP 7.0.300 [265.6.11]); Thu, 13 Jan 2005 16:30:22 +0000 Message-ID: <41E6A21E.5030601@yahoo.co.uk> Date: Thu, 13 Jan 2005 16:30:22 +0000 From: Kris Jenkins User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en To: ibatis-user-java@incubator.apache.org Subject: Re: NestedSQLException References: <20050113162359.21657.qmail@web53107.mail.yahoo.com> In-Reply-To: <20050113162359.21657.qmail@web53107.mail.yahoo.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Virus-Checked: Checked Hey Prashanth, Can we see the code for Shop.java? Kris Prashanth Sukumaran wrote: >Hi, > >I am getting the following NestedSQLException. I think the problem is due to some null values >stored in the database. Why should there be a Null Pointer Exception while setting the data into >the bean that i have passed? > >Has anybody got a similar error. I am also pasting the sql definition here. > >Thanks a lot > >Prashanth > >PS: IBatis is awsome. I love everything about the way it is done and way it helps me to write >clean code. The XML representatioin of the SQL is the best. I don't like to have SQL in my Java >Code. Even though you will be adding new enhancements to iBatis, please keep this XML >represenatation of SQL query as it is. Thanks a lot for all the hardwork you guys are putting and >make our lives easier. > > > > > >Nested Exception is... >com.ibatis.dao.client.DaoException: Failed to execute queryForObject - id [getShopByShopId], >parameterObject [1877]. Cause: com.ibatis.common.jdbc.exception.NestedSQLException: >--- The error occurred in com/wirelessmob/solutions/dataaccess/persistence/sqlmapdao/sql/Shop.xml. > >--- The error occurred while applying a result map. >--- Check the Shop.shopResult. >--- The error happened while setting a property on the result object. >--- Cause: com.ibatis.common.exception.NestedRuntimeException: Error setting properties of >'com.wirelessmob.solutions.dataaccess.beans.Shop@187d27e'. Cause: java.lang.NullPointerException >Caused by: java.lang.NullPointerException >Caused by: com.ibatis.common.exception.NestedRuntimeException: Error setting properties of >'com.wirelessmob.solutions.dataaccess.beans.Shop@187d27e'. Cause: java.lang.NullPointerException >Caused by: java.lang.NullPointerException >Caused by: com.ibatis.common.jdbc.exception.NestedSQLException: >--- The error occurred in com/wirelessmob/solutions/dataaccess/persistence/sqlmapdao/sql/Shop.xml. > >--- The error occurred while applying a result map. >--- Check the Shop.shopResult. >--- The error happened while setting a property on the result object. >--- Cause: com.ibatis.common.exception.NestedRuntimeException: Error setting properties of >'com.wirelessmob.solutions.dataaccess.beans.Shop@187d27e'. Cause: java.lang.NullPointerException >Caused by: java.lang.NullPointerException >Caused by: com.ibatis.common.exception.NestedRuntimeException: Error setting properties of >'com.wirelessmob.solutions.dataaccess.beans.Shop@187d27e'. Cause: java.lang.NullPointerException >Caused by: java.lang.NullPointerException > at com.ibatis.dao.client.template.SqlMapDaoTemplate.queryForObject(SqlMapDaoTemplate.java:164) > > > >__________________________________ >Do you Yahoo!? >Read only the mail you want - Yahoo! Mail SpamGuard. >http://promotions.yahoo.com/new_mail > > > > -- Kris Jenkins Email: kris@jenkster.com Blog: http://cafe.jenkster.com/ Wiki: http://wiki.jenkster.com/ -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.6.11 - Release Date: 12/01/2005