Hi to everybody,
i have oracle 9i and select and other queries work fine accept stored procedure. The strange thing is that these stored procedures are working fine on sql tools..
******************************
this is my connection to oracle db:
Context ictx = new InitialContext(env);
DataSource ds=(javax.sql.DataSource)(ictx.lookup("java:/OracleDS"));
Connection cnn = ds.getConnection();
the driver is OracleDriver and the connection is thin connection type
************************************
and this is where i call sp:
***********************
String sqlClause = " {call R_REQUESTACTION_INSERT(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}";
cs = cnX.prepareCall(sqlClause);
cs.setString (1, user.getUserFirm() ); //1
cs.setString (2, user.getUserOrganization() ); //2
cs.setString (3, user.getAdUserId() ); //3
cs.setString (4, user.getAdUserId() ); //4
cs.setString (5, musteriTemsilcisi ); //5
cs.setString (6, aksiyonTipi ); //6
cs.setTimestamp (7, dateNextActionTime ); //7
cs.setString (8, musteriNumarasi ); //8
cs.setString (9, musteriYetkilisi ); //9
cs.setString (10, gonderilecekMetin ); //10
cs.setString (11, aksiyonSonucu ); //11
cs.setString (12, actionId ); //12
cs.setString (13, requestId ); //13
cs.setString (14, daireNo ); //14
cs.executeUpdate();
cnX.commit();
***********************
And it gives the error below:
******************************
java.sql.SQLException: ORA-00900: invalid SQL statement
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:579)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1894)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1094)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2132)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2015)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2877)The error message: ORA-00900: invalid SQL statement
********************************
Anybody has any idea?
[ February 15, 2006: Message edited by: Can ]