0

I appreciate if anyone can help me fixing this issue:

Getting java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-01003: no statement parsed exception

I tried executing the stored procedure from toad and it gives me proper exception as table or view does not exists, but when the stored procedure it executed from Java I'm getting this issue. Can anyone tell is this Java issue ?

Stored procedure that I'm calling takes input parameters. Cannot share the stored procdure.

4
  • 4
    "My car won't start. Please fix my car...but you can't look at it". Commented Apr 10, 2015 at 15:45
  • You can get that error if the parameters are passed out of order. Commented Apr 10, 2015 at 16:00
  • @tilley31 - I understand what you are saying. I'm sorry i couldn't share because it is client's code and it is confidential. I'm trying to find what can be possible solutions. Commented Apr 10, 2015 at 16:11
  • @SteveGreene- thanks for providing one of the possible solution. Parameter order is correct. Commented Apr 10, 2015 at 16:13

2 Answers 2

2

The ORA-01003 error suggests that you are not passing a parseable statement over JDBC for Oracle to process. Please check that your Java code is calling the procedure correctly.

Because you haven't disclosed any details about the procedure (incl. the number and types of parameters), it's hard to give specific suggestions; below is an example snippet of how to call procedure my_procedure that gets two parameters as input.

private static final String CALL_PROCEDURE = "{ call my_procedure(?, ?) }";
...
private void callMyProcedure(Connection c) throws SQLException {
  CallableStatement cs = null;
  try {
    cs = c.prepareCall(CALL_PROCEDURE);
    cs.setString(1, "firstValue");
    cs.setString(2, "secondValue");
    cs.execute();
  } finally {
    if (cs != null) {
      cs.close();
    }
  }
}
Sign up to request clarification or add additional context in comments.

Comments

1

Additional note: If it is an error at the database level, it may be necessary to take a look at the indexes or triggers it is linked to. The related ones from the following queries can be identified and evaluated.

SELECT * FROM dba_indexes a
WHERE a.index_type = 'FUNCTION-BASED NORMAL';

SELECT * FROM dba_triggers
WHERE trigger_type not in ('before each row','after each row');

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.