ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel H. F. e Silva" <d...@yahoo.com>
Subject Re: invalid column type
Date Wed, 27 Apr 2005 11:57:27 GMT
Hi Jason,

According to the stack trace you've posted, i would say that you are facing problems with
data
type conversions done by your JDBC driver.
I guess your 'isFeature' property is a boolean value and your table column 'isFeature' is
of
another type?
If so, i faced this problem before: my java objects held boolean values and my database columns
used to hold varchar2(1) values as 'Y', 'N' or 'T', 'F'.
If all i mentioned above is your current situation, my advise is: write a CTH (Custom Type
Handler). The iBatis Wiki has some nice details about this issue.

Hope that helped.

Cheers,
 Daniel Silva.



--- Jason Punzalan <jasonpunzalan@gmail.com> wrote:
> this works on mysql but not on oracle. same table layout. any ideas? 
> 
> 	<insert id="insertContent" parameterClass="Content" >
> 		<![CDATA[
> 			insert into content(publication, modified_by, priority, source,
> type_id, body, id, subtitle, title, isFeature, modified, summary,
> page_id, enabled, created_by, created, status, sub_type)
> 			values(#publication#, #modifiedBy#, #priority#, #source#, #typeId#,
> #body#, #id#, #subtitle#, #title#, #isfeature#, now(), #summary#,
> #pageId#, #enabled#, #createdBy#, now(), "draft", #subType.id#)
> 		]]>
> 	</insert>
> 
> 
> 
> org.springframework.jdbc.UncategorizedSQLException: (SqlMapClient
> operation): encountered SQLException [
> --- The error occurred in com/ruderfinn/maps/Content.xml.  
> --- The error occurred while applying a parameter map.  
> --- Check the insertContent-InlineParameterMap.  
> --- Check the parameter mapping for the 'isfeature' property.  
> --- Cause: java.sql.SQLException: Invalid column type]; nested
> exception is com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in com/ruderfinn/maps/Content.xml.  
> --- The error occurred while applying a parameter map.  
> --- Check the insertContent-InlineParameterMap.  
> --- Check the parameter mapping for the 'isfeature' property.  
> --- Cause: java.sql.SQLException: Invalid column type
> com.ibatis.common.jdbc.exception.NestedSQLException:   
> --- The error occurred in com/ruderfinn/maps/Content.xml.  
> --- The error occurred while applying a parameter map.  
> --- Check the insertContent-InlineParameterMap.  
> --- Check the parameter mapping for the 'isfeature' property.  
> --- Cause: java.sql.SQLException: Invalid column type
> Caused by: java.sql.SQLException: Invalid column type
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Mime
View raw message