"Parameter Type Conflict" SQLException After Migrating From 9i To 10g JDBC Driver

(Doc ID 468327.1)

Last updated on AUGUST 03, 2016

Applies to:

JDBC - Version and later
Information in this document applies to any platform.
This problem can occur on any platform.


A Java program  invokes a  PL/SQL stored procedure having an input/output parameter.

Using the 10g//11g  JDBC driver, it gives the following exception when invoking this procedure:

      "SQLException: Parameter Type Conflict".

This  Exception  is thrown when calling the execute() method of the CallableStatement  object.
The related Java program is the following :

public static void main(String[] args) throws Exception {
  DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
  Connection con = DriverManager.getConnection(CON_URL, CON_USR, CON_PAS);
  CallableStatement call = con.prepareCall("{call TEST_ICAM(?,?)}");
  call.setDate(2, new java.sql.Date(System.currentTimeMillis())); 
  call.registerOutParameter(2, java.sql.Types.VARCHAR);            
  String date = call.getString(2);
  System.out.println("" + date);

And, the invoked PL/SQL  stored procedure (test2 being the input/output parameter ) has the following code :



The JDBC driver  has been upgraded from 9i to 10g. 


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms