I can\'t seem to get the right magic combination to make this work:
OracleDataSource ods = new oracle.jdbc.pool.OracleDataSource();
ods.setURL(\"jdbc:oracle
Don't know if this applies or not since you don't specify what version you're using.
From Oracle Metalink:
Cause
In the 10.1.0.x JDBC driver, returning DML is not supported:
Per the JDBC FAQ: "10.1.0 (10g r1) Is DML Returning Supported ? Not in the current drivers. However, we do have plans to support it in post 10.1.0 drivers. We really mean it this time."
As the application code is trying to use unsupported JDBC features, errors are raised.
Solution
Upgrade the JDBC driver to 10.2.0.x, because per the FAQ the 10.2.0.x JDBC drivers do support returning clause:
"10.2.0 (10g r2) Is DML Returning Supported ? YES! And it's about time. See the Developer's Guide for details. "
EDIT Just for grins, you can check the version of JDBC Oracle thinks it's using with:
// Create Oracle DatabaseMetaData object
DatabaseMetaData meta = conn.getMetaData();
// gets driver info:
System.out.println("JDBC driver version is " + meta.getDriverVersion());
If that shows a JDBC driver 10.2.0.x or later, then I'm out of ideas and perhaps a support request to oracle is in order...