Hello Everyone!
Thanks for taking the time to read my post.
The issue I am having is I am getting a constraint error when I attempted to call a store procedure for Oracle.
[code[
SQL Exception in Testing Version Init
” java.sql.SQLException: ORA-00001: unique constraint (<Schema>.XPK<table_name>) violated
ORA-06512: at “<Stored Procedure Name>”, line 270
ORA-06512: at line 1
I have attempted to debug this error. I backed the issue down to the JDBC Driver for Oracle. What I did was run the stored procedure from SQL Developer with no problems. All data was created properly. This is my setup:
[code[
database name=Oracle
database version=Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options
database major version=10
database minor version=2
jdbc driver name=Oracle JDBC driver
jdbc driver version=10.2.0.3.0
jdbc driver major version=10
jdbc driver minor version=2
This is my connection string
String _jdbcConnection_url = "jdbc:oracle:thin:@<host name>:1522:<SID>";
My Store procedure call is:
String sql = "{call <shema>.<stored procedure>.p_ver_init(?, ?, ?, ?, ?)}";
CallableStatement cs = connection.getConnection().prepareCall(sql);
cs.setInt(1, 2008420084);
cs.setInt(2, 3);
cs.setInt(3, 4);
cs.setString(4, "JUnit Test");
cs.setString(5, "Russ Test Case");
What is very strange is the second parameter is a version number. When I look at the database, this value is not used. It makes me suspect a caching issue……may exist…..
Any suggestion would be greatly appreciated.
Russ