• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Strange oracle problem--plz HELP  RSS feed

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have realized that replacing oracle.jar with classes12.jar is the solution of this problem.
[ February 15, 2006: Message edited by: Can ]
 
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Can"

Welcome to JavaRanch!

Please update your display name to comply with our Naming Policy. You can edit it here. Thanks!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!