Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JDBC exception translation support for Oracle error code ORA-06550 [SPR-9853] #14486

Closed
spring-projects-issues opened this issue Oct 4, 2012 · 3 comments
Assignees
Labels
type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Oct 4, 2012

Phil Barnes opened SPR-9853 and commented

When I use SimpleJdbcCall class to call DB function (executeFunction()) which doesn't exists (e.g. provde invalid schema name), then I got following message:

CallableStatementCallback; uncategorized SQLException for SQL [{? = call My_Procedure_Name SQL state [99999]; error code [17041]; Missing IN or OUT parameter at index:: 1

This message suggest that something is wrong with parameters which is not the case.
When I call a missing DB procedure (execute()) got following message:

CallableStatementCallback; bad SQL grammar [{call My_procedure_name}]; nested exception is java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00201: identifier 'My_procedure_name' must be declared

I test it on Oracle database, so you see here Oracle specific error code (ORA-06550), but this is only an example. Second message is OK - it gives information what's really wrong.


Affects: 3.1.1

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 24, 2012

Chris Beams commented

Thomas Risberg, at a glance this looks like it's just a matter of a missing error code translation. Can you look a little closer and comment? Feel free to reassign to yourself and submit a pull request if you see fit and have time. Thanks.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 24, 2012

Thomas Risberg commented

Yes, we could add 6550 to the "badSqlGrammarCodes" category for Oracle and we would get a better exception.

-Thomas

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 24, 2012

Chris Beams commented

Phil Webb, this should be a quick one, a candidate for both 3.1.3 and 3.2 RC1 (though I'll let you actually schedule it as such).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants