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 David Putnam <dp...@wellsfargo.com> on 2005/01/05 04:38:45 UTC

RE: Caused by: java.sql.SQLException: JZ006: Caught IOException: java.io.IOException: JZ0SL: Unsupported SQL type 0.

I have loaded the source into my IDE and have walked through the storage of
my null value.

When I am in the BasicParameterMap.setParameter method, the mapping has a
jdbcType of 0 or Types.NULL, rather than a value of Types.DATE (91). Also
because the DateTypeHandler does not extend CustomTypeHandler, the code
explicitly calls ps.setNull.  It passes the jdbcType of 0 because it also
does not match the JdbcTypeRegistry.UNKNOWN (-99999999) value.  It did not
appear that any of the mapping objects had jdbcType or TypeName values, and
it may be only the null attributes that care.

Here are the values of the mapping variable inside the setParameter method.
mapping: com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMapping =
{com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMapping@1440} 
*	propertyName: java.lang.String = "deceasedDate" 
*	typeHandler: com.ibatis.sqlmap.engine.type.TypeHandler =
{com.ibatis.sqlmap.engine.type.DateTypeHandler@1441} 
*	jdbcType: int = 0 
*	jdbcTypeName: java.lang.String = null 
*	nullValue: java.lang.String = null 
*	mode: java.lang.String = "IN" 
*	inputAllowed: boolean = true 
*	outputAllowed: boolean = false 
*	javaType: java.lang.Class = null 
*	errorString: java.lang.String = "Check the parameter mapping for the
'deceasedDate' property." 

The object is being passed by parameterClass not parameterMap in the
statement stanza of the sqlMap resource.

Hope this helps.

David

>  -----Original Message-----
> From: 	David Putnam  
> Sent:	Tuesday, January 04, 2005 20:01
> To:	'ibatis-user-java@incubator.apache.org'
> Subject:	Caused by: java.sql.SQLException: JZ006: Caught IOException:
> java.io.IOException: JZ0SL: Unsupported SQL type 0.
> 
> Ibatis support group,
> 
> I am getting this error message whenever I try to pass a null attribute to
> the database server.  I believe this to be the case, because I can cause
> this message when the object being stored has a single attribute that is
> null, and it goes away when that attribute is set to a default date (new
> Date(0)).  Setting a null able column to null seems rudimentary, so I am
> sure that I have a configuration problem.
> 
> I have attached several files to a Bug report in JIRA (IBATIS-39).  I have
> also updated ibatis to 2.0.9, but the behavior did not change.  I have
> tried different versions of my database driver since it looks like a data
> server communication issue.
> 
> Hopefully someone will have some experience to share.
> 
> Thanks in advance,
> 
> David Putnam
> 414-359-3678
> 
> 
> 
> 
*****DISCLOSURE STATEMENT*****
This transmission may contain information which is confidential, proprietary
and privileged.  If you are not the individual or entity to which it is
addressed, note that any review, disclosure, copying, retransmission or
other use is strictly prohibited.  If you received this transmission in
error, please notify the sender immediately and delete the material from
your system.  This transmission is for informational purposes only, and is
not intended as an offer or solicitation for the purchase or sale of any
financial instrument or as an official confirmation of any transaction.  Any
information regarding specific investments or other products is not
warranted as to completeness or accuracy and is subject to change without
notice.

Re: Caused by: java.sql.SQLException: JZ006: Caught IOException: java.io.IOException: JZ0SL: Unsupported SQL type 0.

Posted by Larry Meadors <la...@gmail.com>.
can you post your mappings?

On Tue, 4 Jan 2005 21:38:45 -0600, David Putnam <dp...@wellsfargo.com> wrote:
> When I am in the BasicParameterMap.setParameter method, the mapping has a
> jdbcType of 0 or Types.NULL, rather than a value of Types.DATE (91). Also
> because the DateTypeHandler does not extend CustomTypeHandler, the code
> explicitly calls ps.setNull.  It passes the jdbcType of 0 because it also
> does not match the JdbcTypeRegistry.UNKNOWN (-99999999) value.  It did not
> appear that any of the mapping objects had jdbcType or TypeName values, and
> it may be only the null attributes that care.

Re: Caused by: java.sql.SQLException: JZ006: Caught IOException: java.io.IOException: JZ0SL: Unsupported SQL type 0.

Posted by Clinton Begin <cl...@gmail.com>.
David, thanks for the detailed post on this.  I'll try to have a look
at it today.

Clinton


On Tue, 4 Jan 2005 21:38:45 -0600, David Putnam <dp...@wellsfargo.com> wrote:
>  
> 
> I have loaded the source into my IDE and have walked through the storage of
> my null value. 
> 
> When I am in the BasicParameterMap.setParameter method, the mapping has a
> jdbcType of 0 or Types.NULL, rather than a value of Types.DATE (91). Also
> because the DateTypeHandler does not extend CustomTypeHandler, the code
> explicitly calls ps.setNull.  It passes the jdbcType of 0 because it also
> does not match the JdbcTypeRegistry.UNKNOWN (-99999999) value.  It did not
> appear that any of the mapping objects had jdbcType or TypeName values, and
> it may be only the null attributes that care. 
> 
> Here are the values of the mapping variable inside the setParameter method. 
> mapping: com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMapping =
> {com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMapping@1440} 
> propertyName: java.lang.String = "deceasedDate" 
> typeHandler: com.ibatis.sqlmap.engine.type.TypeHandler =
> {com.ibatis.sqlmap.engine.type.DateTypeHandler@1441} 
> jdbcType: int = 0 
> jdbcTypeName: java.lang.String = null 
> nullValue: java.lang.String = null 
> mode: java.lang.String = "IN" 
> inputAllowed: boolean = true 
> outputAllowed: boolean = false 
> javaType: java.lang.Class = null 
> errorString: java.lang.String = "Check the parameter mapping for the
> 'deceasedDate' property." 
>  
> 
> The object is being passed by parameterClass not parameterMap in the
> statement stanza of the sqlMap resource. 
> 
> Hope this helps. 
> 
> David 
> 
>  -----Original Message----- 
> From:   David Putnam  
> Sent:   Tuesday, January 04, 2005 20:01 
> To:     'ibatis-user-java@incubator.apache.org' 
> Subject:        Caused by: java.sql.SQLException: JZ006: Caught IOException:
> java.io.IOException: JZ0SL: Unsupported SQL type 0. 
> 
> Ibatis support group, 
> 
> I am getting this error message whenever I try to pass a null attribute to
> the database server.  I believe this to be the case, because I can cause
> this message when the object being stored has a single attribute that is
> null, and it goes away when that attribute is set to a default date (new
> Date(0)).  Setting a null able column to null seems rudimentary, so I am
> sure that I have a configuration problem. 
> 
> I have attached several files to a Bug report in JIRA (IBATIS-39).  I have
> also updated ibatis to 2.0.9, but the behavior did not change.  I have tried
> different versions of my database driver since it looks like a data server
> communication issue. 
> 
> Hopefully someone will have some experience to share. 
> 
> Thanks in advance, 
> 
> David Putnam 
> 414-359-3678 
>  
>  
>  
> 
> *****DISCLOSURE STATEMENT***** 
> This transmission may contain information which is confidential, proprietary
> and privileged.  If you are not the individual or entity to which it is
> addressed, note that any review, disclosure, copying, retransmission or
> other use is strictly prohibited.  If you received this transmission in
> error, please notify the sender immediately and delete the material from
> your system.  This transmission is for informational purposes only, and is
> not intended as an offer or solicitation for the purchase or sale of any
> financial instrument or as an official confirmation of any transaction.  Any
> information regarding specific investments or other products is not
> warranted as to completeness or accuracy and is subject to change without
> notice.