Extended Stored procedure support does not work with Oracle

Description

I am attempting to use JPA 2.1 and Hibernate 4.3.5 with Java 7 with stored procedures. I am using Oracle10gDialect and Oracle jdbc drivers for 11g. There seems to be at least 2 problems with stored procedure support with Oracle. Since I am using Java 7
and there are no Oracle drivers yet that support JDBC 4.2, stored procedures rely on the specific oracle dialect
to set the parameters properly. Oracle uses Ref Cursor support to get results and that seems to be where the problem is.

1) There is no support for using named parameters with stored procedures. The Oracle 8i dialect doesn't override:

1 public int registerResultSetOutParameter(CallableStatement statement, String name) throws SQLException

so when this method is called an
exception is thrown by the top level Dialect class that says it's not supported. I attempted to add this method to a custom dialect and it gave another exception saying that Ordinal binding and Named binding can not be combined.

2) The oracle 8i dialect does not override:

1 public ResultSet getResultSet(CallableStatement statement, int position) throws SQLException

which causes stored procedures with
positional parameters to also fail. Note that this method is in fact implemented in PostgresSQL81Dialect.
When I tied a custom dialect that extended Oracle10gDialect and used the implementation from Postgres and this fixes the Oracle issue.

Environment

Java 7, JPA 2.1, Hibernate 4.3.5

Status

Assignee

Andrea Boriero

Reporter

Christopher Shannon

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

4.3.4

Priority

Major