ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Maves <Nathan.Ma...@Sun.COM>
Subject Re: tricks with implicit parameters and custom type handlers
Date Thu, 16 Dec 2004 22:27:37 GMT
FIXED!

Turned out not to be a problem after all.  I was able to insert using  
the BlobHandler that has been posted.  But there was a catch.  I had to  
get the latest 10g driver from oracle.  Not sure why, since I am on 9i,  
but it resolved the max size problem.

Nathan

On Dec 16, 2004, at 11:18 AM, Nathan Maves wrote:

> So I have my oracle CTH working perfect on queries but I can not get  
> it to work with and insert.
>
> I get the following
>
> Exception in thread "main" java.lang.ExceptionInInitializerError
>     at java.lang.Class.forName0(Native Method)
>     at java.lang.Class.forName(Class.java:141)
>     at  
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.<init>(JUn 
> itTestRunner.java:204)
>     at  
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.<init>(JUn 
> itTestRunner.java:177)
>     at  
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUn 
> itTestRunner.java:651)
>     at  
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnit 
> TestRunner.java:558)
> Caused by: com.ibatis.dao.client.DaoException: Error executing update.  
>  Cause: com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in  
> reporting/viewer/dao/ibatis/mapping/Report.xml.
> --- The error occurred while applying a parameter map.
> --- Check the insertReport-InlineParameterMap.
> --- Check the parameter mapping for the 'blob' property.
> --- Cause: java.sql.SQLException: Data size bigger than max size for  
> this type: 294231
> Caused by: java.sql.SQLException: Data size bigger than max size for  
> this type: 294231
> Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in  
> reporting/viewer/dao/ibatis/mapping/Report.xml.
> --- The error occurred while applying a parameter map.
> --- Check the insertReport-InlineParameterMap.
> --- Check the parameter mapping for the 'blob' property.
> --- Cause: java.sql.SQLException: Data size bigger than max size for  
> this type: 294231
> Caused by: java.sql.SQLException: Data size bigger than max size for  
> this type: 294231
>
>
> <insert id="insertReport" parameterClass="DetailReport">
>         INSERT INTO
>             rv_report_hierarchy (
>                 report_id,
>                 parent_id,
>                 report_name,
>                 frequency_id,
>                 archive_ind,
>                 description,
>                 report_type,
>                 brio_job_id,
>                 hierarchy_code,
>                 report,
>                 posted_date,
>                 last_update_date
>                 )
>             values (
>                 #id#,
>                 #parentId#,
>                 #name#,
>                 #frequency#,
>                 #archive#,
>                 #description#,
>                 #type#,
>                 #brioJobId#,
>                 #hierarchyCode#,
>                 #blob:BLOB#,
>                 sysdate,
>                 sysdate
>             )
>     </insert>
>
> Any ideas?
>


Mime
View raw message