Vamsi Pavan’s Place

When curiousity outbursts …..

java.sql.SQLException: Non supported SQL92 token at position: 1

July 25th, 2008 · No Comments · Oracle Tech, Pl/SQL

Seems like this is very common error in pl/sql programming. I know there are many last minute frustrations just because of this error which is no where related to any logic. This seems to be some format error in the programming language itself.

The error message is:

java.sql.SQLException: Non supported SQL92 token at position: 1
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.OracleSql.handleToken(OracleSql.java:1165)
at oracle.jdbc.driver.OracleSql.handleODBC(OracleSql.java:1064)
at oracle.jdbc.driver.OracleSql.parse(OracleSql.java:984)
at oracle.jdbc.driver.OracleSql.getSql(OracleSql.java:312)
at oracle.jdbc.driver.OracleSql.getSqlBytes(OracleSql.java:557)

The Solution:

Error scenario code snippet is


stmt = (OracleCallableStatement)conn.prepareCall("{:1 = callfnd_webfile.get_url("+typeStr+",:2,:3,:4,:5,:6,:7,:8,:9) }");

Should be changed to correct syntax as mentioned below.


stmt = (OracleCallableStatement)conn.prepareCall("begin :1 :=fnd_webfile.get_url("+typeStr+",:2,:3,:4,:5,:6,:7,:8,:9); end;");

Some of other solutions i came across though not always work are:
remove TABS and newlines from the SQL in the procedure call.

Bookmark it! These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • StumbleUpon
  • BlinkList
  • YahooMyWeb
  • NewsVine
  • blogtercimlap
  • Netvouz
  • Technorati
  • Slashdot
  • Print this article!

Tags: ·

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment