ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Jenkins <krisajenk...@yahoo.co.uk>
Subject Re: Parameter Map for nested class
Date Tue, 30 Nov 2004 18:02:55 GMT
Lucy Fang wrote:

> Thanks.
>  
> I am using Spring 1.0 with iBatis SQL Map 2.0.
> The exception I got is:
>
>javax.servlet.ServletException: (SqlMapClientTemplate): encountered SQLException [  
>--- The error occurred in edu/rutgers/acs/univ_services/events/dao/ibatis/maps/Organization.xml.
 
>--- The error occurred while applying a parameter map.  
>--- Check the Organization.update-organization-param.  
>--- Check the parameter mapping for the 'contact.firstName' property.  
>--- Cause: java.sql.SQLException: Invalid column type]; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
  
>--- The error occurred in edu/rutgers/acs/univ_services/events/dao/ibatis/maps/Organization.xml.
 
>--- The error occurred while applying a parameter map.  
>--- Check the Organization.update-organization-param.  
>--- Check the parameter mapping for the 'contact.firstName' property.  
>--- Cause: java.sql.SQLException: Invalid column type
>  
>
-->8--

What database are you using?  There's a quirk about the Oracle JDBC 
drivers that often cause this symptom.  It happens when you're supplying 
a null value, and the driver can't figure out the database type before 
executing the statement.

So if you are using Oracle, try this:

<parameter property="contact.firstName" jdbcType="VARCHAR"/>

(assuming your property is indeed a VARCHAR).

HTH,
Kris

-- 
Kris Jenkins
Email:  kris@jenkster.com
Blog:   http://cafe.jenkster.com/
Wiki:   http://wiki.jenkster.com/


Mime
View raw message