aspose file tools*
The moose likes Oracle/OAS and the fly likes Strange oracle problem--plz HELP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Strange oracle problem--plz HELP" Watch "Strange oracle problem--plz HELP" New topic
Author

Strange oracle problem--plz HELP

Can
Greenhorn

Joined: Dec 29, 2005
Posts: 7
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 ]
Can
Greenhorn

Joined: Dec 29, 2005
Posts: 7
i have realized that replacing oracle.jar with classes12.jar is the solution of this problem.
[ February 15, 2006: Message edited by: Can ]
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

"Can"

Welcome to JavaRanch!

Please update your display name to comply with our Naming Policy. You can edit it here. Thanks!


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Strange oracle problem--plz HELP