Hi All,
I have two environment at my workplace i.e local and development
Local environment - Jboss4.2 , ojdbc14.jar, Sun JDK1.5
Dev environment - Websphere6.1, ojdbc14.jar, IBM JDK1.5
Database environment - Oracle10g, Oracle JDBC driver 10.2.0.4.0
I am connecting to the same database through both the environment. I am callling procedure which takes 3 parameters. I am passing all the three parameters to the procedure. Below is the code
qry = "{ call myprocedure(?,?,?) }";
stmt = con.prepareCall(qry);
stmt.setString("I_MODULENAME","modulename");
stmt.setInt("i_pidmapid",productId);
stmt.registerOutParameter("O_RESULTSET", OracleTypes.CURSOR);
stmt.execute();
this procedure is working fine on local environment but its giving me following exception when I try this on Dev environment.
R java.sql.SQLException: Invalid column index
[7/4/10 7:17:28:837 CDT] 00000027 SystemErr R at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
[7/4/10 7:17:28:838 CDT] 00000027 SystemErr R at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
[7/4/10 7:17:28:838 CDT] 00000027 SystemErr R at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
[7/4/10 7:17:28:838 CDT] 00000027 SystemErr R at oracle.jdbc.driver.OraclePreparedStatement.setIntInternal(OraclePreparedStatement.java:4666)
[7/4/10 7:17:28:838 CDT] 00000027 SystemErr R at oracle.jdbc.driver.OracleCallableStatement.setInt(OracleCallableStatement.java:2305)
[7/4/10 7:17:28:838 CDT] 00000027 SystemErr R at com.ibm.ws.rsadapter.jdbc.WSJdbcCallableStatement.setInt(WSJdbcCallableStatement.java:968)
when I restart my WAS server on Dev, procedure is working at first attempt but failing so on.
when I replaced the procedure with query in java code its working well on both the environment.
I didn't get the root cause of this problem. I am not able to find out why this is happening.
could anyone take me out from this.
Any pointer will be really appriciated.
Regards,
Azhar