You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by "BEHL, Manish, IDC" <Ma...@rbs.com> on 2008/01/08 07:04:42 UTC
problem in using jdbcType="CHAR"
Hi,
I having a column of datatype CHAR in database. I am encountering NullPointerException when i use jdbcType='CHAR' in my resultMap (see line in red)
Below is the snippet of xml file -
<resultMap id="outMsgMap" class="com.rbs.rbsgbl.loaniq.cashflows.datastore.data.OutboundMessage">
<result column="MESSAGE_ID" property="lgMessageId" jdbcType="NUMBER"/>
<result column="PAYLOAD" property="strPayload" jdbcType="CLOB" typeHandler="com.ibatis.sqlmap.engine.type.ClobTypeHandlerCallback" />
<result column="MESSAGE_TYPE" property="strMessageType" jdbcType="VARCHAR"/>
<result column="MESSAGE_VERSION" property="intMessageVersion" jdbcType="NUMBER"/>
<result column="ARGON_ID" property="strArgonId" jdbcType="VARCHAR"/>
<result column="CREATE_TIME" property="tstmpCreateTime" jdbcType="TIMESTAMP"/>
<result column="MESSAGE_STATUS" property="chMessageStatus" jdbcType="CHAR" />
</resultMap>
Exception log is as follows:
--- The error occurred in com/rbs/rbsgbl/loaniq/cashflows/datastore/outboundMessage.xml.
--- The error occurred while applying a parameter map.
--- Check the insertCashFlowMessage-InlineParameterMap.
--- Check the parameter mapping for the 'chMessageStatus' property.
--- Cause: java.lang.NullPointerException; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/rbs/rbsgbl/loaniq/cashflows/datastore/outboundMessage.xml.
--- The error occurred while applying a parameter map.
--- Check the insertCashFlowMessage-InlineParameterMap.
--- Check the parameter mapping for the 'chMessageStatus' property.
--- Cause: java.lang.NullPointerException
Caused by: java.lang.NullPointerException
Kinly let me know solution to this , if anyone knows about it already
Regards
Manish Behl
RBS India Development Centre (P) Ltd
T +91 124 433 6150
F +91 124 433 6500
manish.behl@rbs.com<ma...@rbs.com>
Unitech Business Park, Block F, Sector 41, South City 1,
Gurgaon - 122001, Haryana, Delhi, India
P Please don't print this e-mail unless you really need to.
www.rbs.com<outbind://180/WILLIAC/Application%20Data/Microsoft/Signatures/www.rbs.com>
***********************************************************************************
The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
Authorised and regulated by the Financial Services Authority
This e-mail message is confidential and for use by the
addressee only. If the message is received by anyone other
than the addressee, please return the message to the sender
by replying to it and then delete the message from your
computer. Internet e-mails are not necessarily secure. The
Royal Bank of Scotland plc does not accept responsibility for
changes made to this message after it was sent.
Whilst all reasonable care has been taken to avoid the
transmission of viruses, it is the responsibility of the recipient to
ensure that the onward transmission, opening or use of this
message and any attachments will not adversely affect its
systems or data. No responsibility is accepted by The
Royal Bank of Scotland plc in this regard and the recipient should carry
out such virus and other checks as it considers appropriate.
Visit our websites at:
www.rbs.com
www.rbs.com/gbm
www.rbsgc.com
***********************************************************************************
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
Re: problem in using jdbcType="CHAR"
Posted by Richard Yee <ry...@cruzio.com>.
Manish,
I think you are looking in the wrong place. The error says: "--- Check
the insertCashFlowMessage-InlineParameterMap."
It appears that you are trying to insert a null value in a field that is
Not Null?
-Richard
BEHL, Manish, IDC wrote:
> Hi,
>
> I having a column of datatype CHAR in database. I am encountering
> NullPointerException when i use jdbcType='CHAR' in my resultMap (see
> line in red)
> Below is the snippet of xml file -
>
> <resultMap id="outMsgMap"
> class="com.rbs.rbsgbl.loaniq.cashflows.datastore.data.OutboundMessage">
>
> <result column="MESSAGE_ID" property="lgMessageId" jdbcType="NUMBER"/>
>
> <result column="PAYLOAD" property="strPayload" jdbcType="CLOB"
> typeHandler="com.ibatis.sqlmap.engine.type.ClobTypeHandlerCallback" />
>
> <result column="MESSAGE_TYPE" property="strMessageType"
> jdbcType="VARCHAR"/>
>
> <result column="MESSAGE_VERSION" property="intMessageVersion"
> jdbcType="NUMBER"/>
>
> <result column="ARGON_ID" property="strArgonId" jdbcType="VARCHAR"/>
>
> <result column="CREATE_TIME" property="tstmpCreateTime"
> jdbcType="TIMESTAMP"/>
>
> <result column="MESSAGE_STATUS" property="chMessageStatus"
> jdbcType="CHAR" />
>
> </resultMap>
>
> *Exception log is as follows:*
>
> --- The error occurred in
> com/rbs/rbsgbl/loaniq/cashflows/datastore/outboundMessage.xml.
>
> --- The error occurred while applying a parameter map.
>
> --- Check the insertCashFlowMessage-InlineParameterMap.
>
> --- Check the parameter mapping for the 'chMessageStatus' property.
>
> --- Cause: java.lang.NullPointerException; nested exception is
> _com.ibatis.common.jdbc.exception.NestedSQLException_:
>
> --- The error occurred in
> com/rbs/rbsgbl/loaniq/cashflows/datastore/outboundMessage.xml.
>
> --- The error occurred while applying a parameter map.
>
> --- Check the insertCashFlowMessage-InlineParameterMap.
>
> --- Check the parameter mapping for the 'chMessageStatus' property.
>
> --- Cause: _java.lang.NullPointerException_
>
> Caused by: _java.lang.NullPointerException_
>
> Kinly let me know solution to this , if anyone knows about it already
>
> Regards
>
> *Manish Behl*
> RBS India Development Centre (P) Ltd
>
> T +91 124 433 6150
> F +91 124 433 6500
> _manish.behl@rbs.com <ma...@rbs.com>_
> Unitech Business Park, Block F, Sector 41, South City 1,
> Gurgaon - 122001, Haryana, Delhi, India
>
> P Please don't print this e-mail unless you really need to.
> www.rbs.com
> <outbind://180/WILLIAC/Application%20Data/Microsoft/Signatures/www.rbs.com>
>
>
> ***********************************************************************************
> The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
> Authorised and regulated by the Financial Services Authority
>
> This e-mail message is confidential and for use by the
> addressee only. If the message is received by anyone other
> than the addressee, please return the message to the sender
> by replying to it and then delete the message from your
> computer. Internet e-mails are not necessarily secure. The
> Royal Bank of Scotland plc does not accept responsibility for
> changes made to this message after it was sent.
>
> Whilst all reasonable care has been taken to avoid the
> transmission of viruses, it is the responsibility of the recipient to
> ensure that the onward transmission, opening or use of this
> message and any attachments will not adversely affect its
> systems or data. No responsibility is accepted by The
> Royal Bank of Scotland plc in this regard and the recipient should carry
> out such virus and other checks as it considers appropriate.
> Visit our websites at:
> www.rbs.com
> www.rbs.com/gbm
> www.rbsgc.com
> ***********************************************************************************
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________