ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Cartwright <John.C.Cartwri...@noaa.gov>
Subject custom type handler w/ database-specific type
Date Fri, 06 Feb 2009 23:43:17 GMT
Hello All,

I'm trying to implement a custom type handler to support Oracle's
SDO_GEOMETRY type.  I've got it (apparently) working for retrieval of
data, but am having trouble w/ inserts into the database. Error says:

org.springframework.jdbc.UncategorizedSQLException: SqlMapClient
operation; uncategorized SQLException for SQL []; SQL state [null];
error code [0];   
--- The error occurred in gov/noaa/ngdc/mgg/ufn/Feature.xml.  
--- The error occurred while applying a parameter map.  
--- Check the Feature.insertShape-InlineParameterMap.  
--- Check the parameter mapping for the 'geometry' property.  
--- Cause: java.lang.NullPointerException; nested exception is
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in gov/noaa/ngdc/mgg/ufn/Feature.xml.  
--- The error occurred while applying a parameter map.  
--- Check the Feature.insertShape-InlineParameterMap.  
--- Check the parameter mapping for the 'geometry' property.  
--- Cause: java.lang.NullPointerException

I'm registering a global type handler w/:

<typeHandler
callback="gov.noaa.ngdc.mgg.ufn.dao.ibatis.SdoGeometryHandler"
javaType="com.vividsolutions.jts.geom.Geometry" jdbcType="SDO_GEOMETRY" />


and the inline parameter map for the "geometry" column uses:

#geometry:SDO_GEOMETRY#


I've tried various other values for JDBC types: STRUCT, OTHER
w/o success.

Can someone please help me understand a little better about the
connections between the the types in the parameter map and the
typehandler registration?

Thanks!

--john


Mime
View raw message