Announcement Announcement Module
Collapse
No announcement yet.
Retrieving LOBs from a CallableStatement is not supported SQLException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Retrieving LOBs from a CallableStatement is not supported SQLException

    I'm trying to call a Stored procedure thru iBatis.

    Following is the entry in SQL MAP file

    <parameterMap id="siteParameters" class="java.util.Map">
    <parameter property="web_id" jdbcType="NUMBER" javaType="java.lang.Integer" mode="IN"/>
    <parameter property="view_mode" jdbcType="VARCHAR2" javaType="java.lang.String" mode="IN"/>
    <parameter property="upi" jdbcType="VARCHAR2" javaType="java.lang.String" mode="IN"/>
    <parameter property="profile_xml" jdbcType="CLOB" javaType="java.lang.String" mode="OUT" typeHandler="org.springframework.orm.ibatis.suppor t.ClobStringTypeHandler"/>
    </parameterMap>

    <procedure id="getSiteDetailsProcedure" parameterMap="siteParameters" resultClass="java.lang.String">
    {call proc_name(?,?,?,?)}
    </procedure>


    Am getting the following error
    java.sql.SQLException: Retrieving LOBs from a CallableStatement is not supported
    org.springframework.orm.ibatis.support.AbstractLob TypeHandler.getResult(AbstractLobTypeHandler.java: 140)
    com.ibatis.sqlmap.engine.execution.SqlExecutor.ret rieveOutputParameters(SqlExecutor.java:350)
    com.ibatis.sqlmap.engine.execution.SqlExecutor.exe cuteUpdateProcedure(SqlExecutor.java:240)
    com.ibatis.sqlmap.engine.mapping.statement.Procedu reStatement.sqlExecuteUpdate(ProcedureStatement.ja va:30)
    com.ibatis.sqlmap.engine.mapping.statement.General Statement.executeUpdate(GeneralStatement.java:78)
    com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelega te.update(SqlMapExecutorDelegate.java:500)
    com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.up date(SqlMapSessionImpl.java:85)
    com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.upd ate(SqlMapClientImpl.java:62)

    Please help me to resolve this issue.

  • #2
    update to the thread &quot;Retrieving LOBs from a CallableStatement is not supported&quot;

    applicationContext.xml has the following entry

    <!-- SqlMap setup for iBATIS Database Layer -->
    <bean id="simpleExtractor" class="org.springframework.jdbc.support.nativejdbc .SimpleNativeJdbcExtractor"/>

    <bean id="oracleLobHandler" class="org.springframework.jdbc.support.lob.Oracle LobHandler">
    <property name="nativeJdbcExtractor" ref="simpleExtractor"/>
    </bean>

    <bean id="sqlMap"
    class="org.springframework.orm.ibatis.SqlMapClient FactoryBean">
    <property name="configLocation">
    <value>classpath:SqlMapConfig.xml</value>
    </property>
    <property name="dataSource" ref="dataSource" />
    <property name="lobHandler" ref="oracleLobHandler"/>
    </bean>

    Comment


    • #3
      That feature is not supported using the Spring iBATIS support. You would need to code against the native iBATIS API.

      Comment

      Working...
      X