This week's book giveaway is in the Java in General forum.
We're giving away four copies of Helidon Revealed: A Practical Guide to Oracle’s Microservices Framework and have Michael Redlich on-line!
See this thread for details.
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Strange oracle problem--plz HELP

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Whip out those weird instruments of science and probe away! I think it's a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic