ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Goodin <brandon.goo...@gmail.com>
Subject Re: Blob
Date Mon, 23 May 2005 02:57:17 GMT
This should help:

http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+use+a+Custom+Type+Handler+with+a+BLOB+or+CLOB%3F

Brandon

On 5/22/05, Lieven De Keyzer <lieven_dekeyzer@hotmail.com> wrote:
> I want to retrieve the values from a table where 1 column is of type Blob.
> My Bean to store these values has a field of type java.sql.Blob and the
> appropriate getters and setters.
> 
> My resultmap looks like this:
> 
> <sqlMap namespace="Bookmark">
> 
>   <typeAlias alias="bookmark" type="com.vub.bookmarked.domain.Bookmark"/>
> 
>   <resultMap id="bookmarkResult" class="bookmark">
>     <result property="bookmarkId" column="bookmark_id"/>
>     <result property="folderId" column="folder_id"/>
>     <result property="url" column="url"/>
>     <result property="bookmarkname" column="bookmarkname"/>
>     <result property="cache" column="cache"/>
>   </resultMap>
> 
> When my webapplication actually needs this data, I get following exception:
> 
> 
> Cause: com.ibatis.dao.client.DaoException: Failed to queryForList - id
> [getBookmarkListByParentId], parameterObject [71]. Cause:
> com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred
> in com/vub/bookmarked/persistence/sqlmapdao/sql/Bookmark.xml. --- The error
> occurred while applying a result map. --- Check the Bookmark.bookmarkResult.
> --- Check the result mapping for the 'cache' property. --- Cause:
> com.ibatis.sqlmap.client.SqlMapException: No type handler could be found to
> map the property 'cache' to the column 'cache'. One or both of the types, or
> the combination of types is not supported.
> 
> 
> Isn't type Blob supported in iBatis? I have the latest version.
> 
> 
>

Mime
View raw message