Return-Path: Delivered-To: apmail-incubator-ibatis-user-java-archive@www.apache.org Received: (qmail 7565 invoked from network); 29 Apr 2005 14:15:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Apr 2005 14:15:18 -0000 Received: (qmail 59494 invoked by uid 500); 29 Apr 2005 14:16:10 -0000 Delivered-To: apmail-incubator-ibatis-user-java-archive@incubator.apache.org Received: (qmail 59418 invoked by uid 500); 29 Apr 2005 14:16:07 -0000 Mailing-List: contact ibatis-user-java-help@incubator.apache.org; run by ezmlm Precedence: bulk Reply-To: ibatis-user-java@incubator.apache.org List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list ibatis-user-java@incubator.apache.org Received: (qmail 59356 invoked by uid 99); 29 Apr 2005 14:16:06 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from expredir5.cites.uiuc.edu (HELO expredir5.cites.uiuc.edu) (128.174.5.96) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 29 Apr 2005 07:16:04 -0700 Received: from socsbo6.uiuc.edu (socsbo6.scs.uiuc.edu [130.126.226.164]) by expredir5.cites.uiuc.edu (8.12.11/8.12.11) with ESMTP id j3TEEelg029882 for ; Fri, 29 Apr 2005 09:14:40 -0500 (CDT) Message-Id: <6.2.1.2.2.20050429091135.03470e20@express.cites.uiuc.edu> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Fri, 29 Apr 2005 09:16:39 -0500 To: ibatis-user-java@incubator.apache.org From: "Albert L. Sapp" Subject: Re: Problem with result mapping. In-Reply-To: <2fe5ef5b05042813199787ac5@mail.gmail.com> References: <6.2.1.2.2.20050428145837.03733e08@express.cites.uiuc.edu> <2fe5ef5b05042813199787ac5@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Bandon, Found the problem really quick doing that. It was in the underlying bean and the use of toUpperCase on some strings. I failed to check to see if the strings where null. Once I add that check, everything worked. Won the bet with myself. We just recently started converting all strings to upper case, so I had never run into the problem before. Still learning Java in many ways. Al At 03:19 PM 4/28/2005, you wrote: >Why don't you simply eliminate fields until the problem disappears. >Then add fields back in to see which are the offending fields. At that >point you will be able to narrow the problem area. once you have done >that we might be able to provide you with better insight. > >On 4/28/05, Albert L. Sapp wrote: > > Hi, guys. > > > > I have been struggling with this for a while now and can't seem to find > > where I have things messed up. > > > > Here is the error message: > > > > Apr 28, 2005 2:22:14 PM > > scs.reaction.common.persistence.DAO.impl.ibatis.BaseDAO > > executeQueryForList > > FINER: SQLException returned = > > com.ibatis.common.jdbc.exception.NestedSQLException: > > --- The error occurred in > > scs/reaction/user/persistence/DAO/impl/ibatis/sql-maps/UserDetail.xml. > > > > --- The error occurred while applying a result map. > > --- Check the UserDetail.user-detail-result. > > --- The error happened while setting a property on the result object. > > --- Cause: > > com.ibatis.common.exception.NestedRuntimeException: Error > > setting properties of 'UserDetails: userID = 2 , printedName = ALBERT L. > > SAPP , mailingAddress1 = SCHOOL OF CHEMICAL SCIENCES , mailingAddress2 = > > UNIVERSITY OF ILLINOIS , mailingAddress3 = ROOM 320, NOYES LAB, BOX D-2 , > > mailingAddress4 = 600 S. MATHEWS , mailingCityStateZip = URBANA, IL > > 61801-3602 , shippingAddress1 = null , shippingAddress2 = null , > > shippingAddress3 = null , shippingAddress4 = null , shippingCityStateZip = > > null , phoneNumber = null , positionTitle = null , createdBy = null , > > createdOn = null , modifiedBy = null , modifiedOn = null , conCheck = > null'. > > Cause: java.lang.NullPointerException > > Caused by: java.lang.NullPointerException > > Caused by: > > com.ibatis.common.exception.NestedRuntimeException: Error > > setting properties of 'UserDetails: userID = 2 , printedName = ALBERT L. > > SAPP , mailingAddress1 = SCHOOL OF CHEMICAL SCIENCES , mailingAddress2 = > > UNIVERSITY OF ILLINOIS , mailingAddress3 = ROOM 320, NOYES LAB, BOX D-2 , > > mailingAddress4 = 600 S. MATHEWS , mailingCityStateZip = URBANA, IL > > 61801-3602 , shippingAddress1 = null , shippingAddress2 = null , > > shippingAddress3 = null , shippingAddress4 = null , shippingCityStateZip = > > null , phoneNumber = null , positionTitle = null , createdBy = null , > > createdOn = null , modifiedBy = null , modifiedOn = null , conCheck = > null'. > > Cause: java.lang.NullPointerException > > Caused by: java.lang.NullPointerException > > Apr 28, 2005 2:22:14 PM > > scs.reaction.user.impl.UserManagerImp retrieveUserDetail > > FINEST: Critical Error: DaoException = > > com.ibatis.dao.client.DaoException: Error executing query > > for list. Cause: > > com.ibatis.common.jdbc.exception.NestedSQLException: > > --- The error occurred in > > scs/reaction/user/persistence/DAO/impl/ibatis/sql-maps/UserDetail.xml. > > > > --- The error occurred while applying a result map. > > --- Check the UserDetail.user-detail-result. > > --- The error happened while setting a property on the result object. > > --- Cause: > > com.ibatis.common.exception.NestedRuntimeException: Error > > setting properties of 'UserDetails: userID = 2 , printedName = ALBERT L. > > SAPP , mailingAddress1 = SCHOOL OF CHEMICAL SCIENCES , mailingAddress2 = > > UNIVERSITY OF ILLINOIS , mailingAddress3 = ROOM 320, NOYES LAB, BOX D-2 , > > mailingAddress4 = 600 S. MATHEWS , mailingCityStateZip = URBANA, IL > > 61801-3602 , shippingAddress1 = null , shippingAddress2 = null , > > shippingAddress3 = null , shippingAddress4 = null , shippingCityStateZip = > > null , phoneNumber = null , positionTitle = null , createdBy = null , > > createdOn = null , modifiedBy = null , modifiedOn = null , conCheck = > null'. > > Cause: java.lang.NullPointerException > > Caused by: java.lang.NullPointerException > > Caused by: > > com.ibatis.common.exception.NestedRuntimeException: Error > > setting properties of 'UserDetails: userID = 2 , printedName = ALBERT L. > > SAPP , mailingAddress1 = SCHOOL OF CHEMICAL SCIENCES , mailingAddress2 = > > UNIVERSITY OF ILLINOIS , mailingAddress3 = ROOM 320, NOYES LAB, BOX D-2 , > > mailingAddress4 = 600 S. MATHEWS , mailingCityStateZip = URBANA, IL > > 61801-3602 , shippingAddress1 = null , shippingAddress2 = null , > > shippingAddress3 = null , shippingAddress4 = null , shippingCityStateZip = > > null , phoneNumber = null , positionTitle = null , createdBy = null , > > createdOn = null , modifiedBy = null , modifiedOn = null , conCheck = > null'. > > Cause: java.lang.NullPointerException > > Caused by: java.lang.NullPointerException > > Caused by: > > com.ibatis.common.jdbc.exception.NestedSQLException: > > --- The error occurred in > > scs/reaction/user/persistence/DAO/impl/ibatis/sql-maps/UserDetail.xml. > > > > --- The error occurred while applying a result map. > > --- Check the UserDetail.user-detail-result. > > --- The error happened while setting a property on the result object. > > --- Cause: > > com.ibatis.common.exception.NestedRuntimeException: Error > > setting properties of 'UserDetails: userID = 2 , printedName = ALBERT L. > > SAPP , mailingAddress1 = SCHOOL OF CHEMICAL SCIENCES , mailingAddress2 = > > UNIVERSITY OF ILLINOIS , mailingAddress3 = ROOM 320, NOYES LAB, BOX D-2 , > > mailingAddress4 = 600 S. MATHEWS , mailingCityStateZip = URBANA, IL > > 61801-3602 , shippingAddress1 = null , shippingAddress2 = null , > > shippingAddress3 = null , shippingAddress4 = null , shippingCityStateZip = > > null , phoneNumber = null , positionTitle = null , createdBy = null , > > createdOn = null , modifiedBy = null , modifiedOn = null , conCheck = > null'. > > Cause: java.lang.NullPointerException > > Caused by: java.lang.NullPointerException > > Caused by: > > com.ibatis.common.exception.NestedRuntimeException: Error > > setting properties of 'UserDetails: userID = 2 , printedName = ALBERT L. > > SAPP , mailingAddress1 = SCHOOL OF CHEMICAL SCIENCES , mailingAddress2 = > > UNIVERSITY OF ILLINOIS , mailingAddress3 = ROOM 320, NOYES LAB, BOX D-2 , > > mailingAddress4 = 600 S. MATHEWS , mailingCityStateZip = URBANA, IL > > 61801-3602 , shippingAddress1 = null , shippingAddress2 = null , > > shippingAddress3 = null , shippingAddress4 = null , shippingCityStateZip = > > null , phoneNumber = null , positionTitle = null , createdBy = null , > > createdOn = null , modifiedBy = null , modifiedOn = null , conCheck = > null'. > > Cause: java.lang.NullPointerException > > Caused by: java.lang.NullPointerException > > Apr 28, 2005 2:22:14 PM > > scs.reaction.struts.user.actions.userDetail.BrowseUserDetailAction > > execute > > SEVERE: Critical Error: Unable to get detail information for the user. > > scs.reaction.common.exceptions.manager.ManagerException: > > Critical Error: Error executing query for list. Cause: > > com.ibatis.common.jdbc.exception.NestedSQLException: > > --- The error occurred in > > scs/reaction/user/persistence/DAO/impl/ibatis/sql-maps/UserDetail.xml. > > > > --- The error occurred while applying a result map. > > --- Check the UserDetail.user-detail-result. > > --- The error happened while setting a property on the result object. > > --- Cause: > > com.ibatis.common.exception.NestedRuntimeException: Error > > setting properties of 'UserDetails: userID = 2 , printedName = ALBERT L. > > SAPP , mailingAddress1 = SCHOOL OF CHEMICAL SCIENCES , mailingAddress2 = > > UNIVERSITY OF ILLINOIS , mailingAddress3 = ROOM 320, NOYES LAB, BOX D-2 , > > mailingAddress4 = 600 S. MATHEWS , mailingCityStateZip = URBANA, IL > > 61801-3602 , shippingAddress1 = null , shippingAddress2 = null , > > shippingAddress3 = null , shippingAddress4 = null , shippingCityStateZip = > > null , phoneNumber = null , positionTitle = null , createdBy = null , > > createdOn = null , modifiedBy = null , modifiedOn = null , conCheck = > null'. > > Cause: java.lang.NullPointerException > > Caused by: java.lang.NullPointerException > > Caused by: > > com.ibatis.common.exception.NestedRuntimeException: Error > > setting properties of 'UserDetails: userID = 2 , printedName = ALBERT L. > > SAPP , mailingAddress1 = SCHOOL OF CHEMICAL SCIENCES , mailingAddress2 = > > UNIVERSITY OF ILLINOIS , mailingAddress3 = ROOM 320, NOYES LAB, BOX D-2 , > > mailingAddress4 = 600 S. MATHEWS , mailingCityStateZip = URBANA, IL > > 61801-3602 , shippingAddress1 = null , shippingAddress2 = null , > > shippingAddress3 = null , shippingAddress4 = null , shippingCityStateZip = > > null , phoneNumber = null , positionTitle = null , createdBy = null , > > createdOn = null , modifiedBy = null , modifiedOn = null , conCheck = > null'. > > Cause: java.lang.NullPointerException > > Caused by: java.lang.NullPointerException > > > > > > Here is the result map and sql query: > > > > > > > class="scs.reaction.user.beans.UserDetail"> > > > > > > > jdbcType="VARCHAR"/> > > > jdbcType="VARCHAR"/> > > > jdbcType="VARCHAR"/> > > > jdbcType="VARCHAR"/> > > > jdbcType="VARCHAR"/> > > > jdbcType="VARCHAR"/> > > > jdbcType="VARCHAR"/> > > > jdbcType="VARCHAR"/> > > > jdbcType="VARCHAR"/> > > > column="SHIPPING_CITY_STATE_ZIP" jdbcType="VARCHAR"/> > > > > > jdbcType="VARCHAR"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > resultMap="user-detail-result" cacheModel="user-detail-cache"> > > SELECT * FROM REACTION_USERS.USER_DETAILS > > > > > > > > USER_ID=#userID# > > > > > > > > PRINTED_NAME=#printedName# > > > > > > > > > > MAILING_ADDRESS_1=#mailingAddress1# > > > > > > > > > > MAILING_ADDRESS_2=#mailingAddress2# > > > > > > > > > > MAILING_ADDRESS_3=#mailingAddress3# > > > > > > > > > > MAILING_ADDRESS_4=#mailingAddress4# > > > > > > > > > > MAILING_CITY_STATE_ZIP=#mailingCityStateZip# > > > > > > > > > > SHIPPING_ADDRESS_1=#shippingAddress1# > > > > > > > > > > SHIPPING_ADDRESS_2=#shippingAddress2# > > > > > > > > > > SHIPPING_ADDRESS_3=#shippingAddress3# > > > > > > > > > > SHIPPING_ADDRESS_4=#shippingAddress4# > > > > > > > property="shippingCityStateZip"> > > > > SHIPPING_CITY_STATE_ZIP=#shippingCityStateZip# > > > > > > > > PHONE_NUMBER=#phoneNumber# > > > > > > > > POSITION_TITLE=#positionTitle# > > > > > > > > CREATED_BY=#createdBy# > > > > > > > > CREATED_ON=#createdOn# > > > > > > > > MODIFIED_BY=#modifiedBy# > > > > > > > > MODIFIED_ON=#modifiedOn# > > > > > > > > CON_CHECK=#conCheck# > > > > > > > > ORDER BY PRINTED_NAME > > > > > > > > > > I am able to insert the record fine and I can view it in the output from a > > query command in sqlplus. The only fields that are null in the record are > > the shipping address fields. All other fields have data. > > > > > > Any ideas? I am betting with myself that it is something simple that I > > keep overlooking when I go through the code. > > > > Thanks.