Clay wrote:
I believe Hibernate is getting confused by the fact that there's 2 ?'s
try just:
Code:
<sql-query name="getContactsByWorkPhone_sp" callable="true">
<return alias="contact" class="ca.otn.rossco.vo.Contact"/>
{ call get_contact_by_workPhone_sp(?) }
</sql-query>
and then
q.setParameter(1,"5551234")
I have tried that too .
Using q.setParameter(1,"5551234") gives me that ordinal parameter error mentioned above and using
q.setParameter(0,"5551234") gives me this error:
14:42:24,014 DEBUG (http-8443-1) [JDBCExceptionReporter] could not execute query [{ call get_contact_by_workPhone_sp(?) }]
java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'GET_CONTACT_BY_WORKPHONE_SP'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
......
has anybody been successful executing a stored procedure in Hibernate without having to use the JDBC Connection method?