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 <[EMAIL PROTECTED]> 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:
>
>
> <resultMap id="user-detail-result"
> class="scs.reaction.user.beans.UserDetail">
> <result property="userID" column="USER_ID" jdbcType="BIGINT"/>
> <result property="printedName" column="PRINTED_NAME" jdbcType="VARCHAR"/>
> <result property="mailingAddress1" column="MAILING_ADDRESS_1"
> jdbcType="VARCHAR"/>
> <result property="mailingAddress2" column="MAILING_ADDRESS_2"
> jdbcType="VARCHAR"/>
> <result property="mailingAddress3" column="MAILING_ADDRESS_3"
> jdbcType="VARCHAR"/>
> <result property="mailingAddress4" column="MAILING_ADDRESS_4"
> jdbcType="VARCHAR"/>
> <result property="mailingCityStateZip" column="MAILING_CITY_STATE_ZIP"
> jdbcType="VARCHAR"/>
> <result property="shippingAddress1" column="SHIPPING_ADDRESS_1"
> jdbcType="VARCHAR"/>
> <result property="shippingAddress2" column="SHIPPING_ADDRESS_2"
> jdbcType="VARCHAR"/>
> <result property="shippingAddress3" column="SHIPPING_ADDRESS_3"
> jdbcType="VARCHAR"/>
> <result property="shippingAddress4" column="SHIPPING_ADDRESS_4"
> jdbcType="VARCHAR"/>
> <result property="shippingCityStateZip"
> column="SHIPPING_CITY_STATE_ZIP" jdbcType="VARCHAR"/>
> <result property="phoneNumber" column="PHONE_NUMBER" jdbcType="VARCHAR"/>
> <result property="positionTitle" column="POSITION_TITLE"
> jdbcType="VARCHAR"/>
> <result property="createdBy" column="CREATED_BY" jdbcType="BIGINT"/>
> <result property="createdOn" column="CREATED_ON" jdbcType="DATE"/>
> <result property="modifiedBy" column="MODIFIED_BY" jdbcType="BIGINT"/>
> <result property="modifiedOn" column="MODIFIED_ON" jdbcType="DATE"/>
> <result property="conCheck" column="CON_CHECK" jdbcType="BIGINT"/>
> </resultMap>
>
> <cacheModel id="user-detail-cache" type="LRU">
> <flushInterval hours="24"/>
> <flushOnExecute statement="UserDetailInsert"/>
> <flushOnExecute statement="UserDetailUpdate"/>
> <flushOnExecute statement="UserDetailDeleteByProperty"/>
> </cacheModel>
>
>
> <statement id="UserDetailGetByPropertiesAND"
> resultMap="user-detail-result" cacheModel="user-detail-cache">
> SELECT * FROM REACTION_USERS.USER_DETAILS
>
> <dynamic prepend="WHERE">
> <isNotNull prepend="AND" property="userID">
> USER_ID=#userID#
> </isNotNull>
>
> <isNotNull prepend="AND" property="printedName">
> PRINTED_NAME=#printedName#
> </isNotNull>
>
> <isNotNull prepend="AND" property="mailingAddress1">
>
> MAILING_ADDRESS_1=#mailingAddress1#
> </isNotNull>
>
> <isNotNull prepend="AND" property="mailingAddress2">
>
> MAILING_ADDRESS_2=#mailingAddress2#
> </isNotNull>
>
> <isNotNull prepend="AND" property="mailingAddress3">
>
> MAILING_ADDRESS_3=#mailingAddress3#
> </isNotNull>
>
> <isNotNull prepend="AND" property="mailingAddress4">
>
> MAILING_ADDRESS_4=#mailingAddress4#
> </isNotNull>
>
> <isNotNull prepend="AND" property="mailingCityStateZip">
>
> MAILING_CITY_STATE_ZIP=#mailingCityStateZip#
> </isNotNull>
>
> <isNotNull prepend="AND" property="shippingAddress1">
>
> SHIPPING_ADDRESS_1=#shippingAddress1#
> </isNotNull>
>
> <isNotNull prepend="AND" property="shippingAddress2">
>
> SHIPPING_ADDRESS_2=#shippingAddress2#
> </isNotNull>
>
> <isNotNull prepend="AND" property="shippingAddress3">
>
> SHIPPING_ADDRESS_3=#shippingAddress3#
> </isNotNull>
>
> <isNotNull prepend="AND" property="shippingAddress4">
>
> SHIPPING_ADDRESS_4=#shippingAddress4#
> </isNotNull>
>
> <isNotNull prepend="AND"
> property="shippingCityStateZip">
>
> SHIPPING_CITY_STATE_ZIP=#shippingCityStateZip#
> </isNotNull>
>
> <isNotNull prepend="AND" property="phoneNumber">
> PHONE_NUMBER=#phoneNumber#
> </isNotNull>
>
> <isNotNull prepend="AND" property="positionTitle">
> POSITION_TITLE=#positionTitle#
> </isNotNull>
>
> <isNotNull prepend="AND" property="createdBy">
> CREATED_BY=#createdBy#
> </isNotNull>
>
> <isNotNull prepend="AND" property="createdOn">
> CREATED_ON=#createdOn#
> </isNotNull>
>
> <isNotNull prepend="AND" property="modifiedBy">
> MODIFIED_BY=#modifiedBy#
> </isNotNull>
>
> <isNotNull prepend="AND" property="modifiedOn">
> MODIFIED_ON=#modifiedOn#
> </isNotNull>
>
> <isNotNull prepend="AND" property="conCheck">
> CON_CHECK=#conCheck#
> </isNotNull>
> </dynamic>
>
> ORDER BY PRINTED_NAME
>
> </statement>
>
>
> 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.



Reply via email to