Announcement Announcement Module
No announcement yet.
ORA-06502 When using ojdbc5.jar with oracle 11g (Spring IBatis) Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • ORA-06502 When using ojdbc5.jar with oracle 11g (Spring IBatis)


    I am upgrading the JDBC drivers as we are upgrading the Oracle from 10g to 11g. As part of this migration we are also updating the ojdbc jar from ojdbc14.jar to ojdbc5.jar. My application is running on WebSphere and JDBC data source is configured to use ojdbc5.jar in driver class path and uses Oracle11gDataStoreHelper.

    My application is using spring and ibatis to connect to oracle. I have come across below error when my code calls a oracle stored procedure using ibatis. Procedure has one out parameter which has CHAR type. When Oracle procedure try to log that parameter it fails with below error.

    The thing here is the same code works fine with ojdbc14.jar (Oracle is still on 11g).
    Also if i change data type for that out parameter in procedue signature from CHAR to VARCHAR2 issue gets resolved.

    org.springframework.jdbc.BadSqlGrammarException: SqlMapClient operation; bad SQL grammar []; nested exception is com.ibatis.common.jdbc.exception.NestedSQLExceptio n:
    --- The error occurred in abc/temp.ibatis.xml.
    --- The error occurred while applying a parameter map.
    --- Check the abc.temp-InlineParameterMap.
    --- Check the statement (update procedure failed).
    --- Cause: java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at line 1
    ORA-06512: at "TACPRD01SC01.PKG_EXCP", line 32
    ORA-06512: at "TACPRD01SC01.PKG_SHR_PF_RCON", line 7492
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at line 1

    at ionTranslator.translate(SQLStateSQLExceptionTransl
    at ceptionTranslator.translate(SQLErrorCodeSQLExcepti
    at org.springframework.orm.ibatis.SqlMapClientTemplat e.execute(
    at org.springframework.orm.ibatis.SqlMapClientTemplat e.queryForObject(

    Has any one any idea?
    I am trying to find out here is that why I am facing this issue with ojdbc5.jar and not with ojdbc14.jar with
    Is this some thing that has been forced to use VARCHAR2 from ojdbc5.jar ?