2016-07-14 4 views
0

내가 오라클 함수를 호출하는 동안 오류가 다음 받고 있어요 ... 여기 봄 MyBatis로 오라클 함수 호출

org.springframework.jdbc.UncategorizedSQLException: 
### Error querying database. Cause: java.sql.SQLException: Non supported SQL92 token at position: 1: 
### The error may exist in file [C:\Users\pkr\rpt\bin\dbmappers\MyMapper.xml] 
### The error may involve com.pkr.tpy.rpt.dao.MyDao.resetRecs-Inline 
### The error occurred while setting parameters 
### SQL: { ? = call actions.reset_recs(?,     ?,     ?,     ?) } 
### Cause: java.sql.SQLException: Non supported SQL92 token at position: 1: 
; uncategorized SQLException for SQL []; SQL state [99999]; error code [17034]; Non supported SQL92 token at position: 1: ; nested exception is java.sql.SQLException: Non supported SQL92 token at position: 1: 
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:84) 
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) 
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) 
    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:75) 
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:447) 
    at com.sun.proxy.$Proxy37.selectOne(Unknown Source) 

가 내 mapper.xml

<select id="resetRecs" resultType="String" statementType="CALLABLE"> 
    { 
    #{retVal,mode=OUT,jdbcType=VARCHAR} = call actions.reset_recs(#{xCode, jdbcType=DECIMAL,mode=IN}, 
           #{yCode,jdbcType=DECIMAL,mode=IN}, 
           #{xyzNum,jdbcType=DECIMAL,mode=IN}, 
           #{src,jdbcType=VARCHAR,mode=IN}) 
    }  
</select> 

DAO Interface: 

String resetRecs(@Param("xCode") int xCode, 
      @Param("yCode") int yCode, 
      @Param("xyzNum") int xyzNum, @Param("xyzSrc") String xyzSource, 
      @Param("retVal") String retVal); 

내가 MyBatis로 3.4.0를 사용하고 있습니다 어떤 도움을 주시면 감사하겠습니다.

답변

1

한 줄에 내 매퍼 호출 문을 업데이트하면이 문제를 해결할 수있었습니다.

<select id="resetRecs" resultType="String" statementType="CALLABLE"> 
{#{retVal,mode=OUT,jdbcType=VARCHAR} = call actions.reset_recs(#{xCode, jdbcType=DECIMAL,mode=IN},#yCode,jdbcType=DECIMAL,mode=IN},#xyzNum,jdbcType=DECIMAL,mode=IN},#{src,jdbcType=VARCHAR,mode=IN})}