org.hibernate.exception.GenericJDBCException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Similar procedure with 2 IN params and 1 OUT works. Exception occurs in procedures with more then 2 IN params; But procedure works if use positional params. Procedure with 3 IN params and 1 OUT {code} @NamedStoredProcedureQuery( name="SaveCodedData", procedureName="FSC_PAYMENTS.CD_PAYM_PROCESING_PKG.save_coded_data", parameters= { @StoredProcedureParameter(name="in_hash", type=String.class, mode= ParameterMode.IN), @StoredProcedureParameter(name="in_data", type=String.class, mode= ParameterMode.IN), @StoredProcedureParameter(name="in_masked", type=String.class, mode= ParameterMode.IN), @StoredProcedureParameter(name="out_result", type=Integer.class, mode= ParameterMode.OUT) } ) {code} Usage : {code} return (int) entityManager .createNamedStoredProcedureQuery("SaveCodedData") .setParameter("in_hash", "value") .setParameter("in_data", "value") .setParameter("in_masked", "value") .getOutputParameterValue("out_result"); {code} Procededure : {code} PROCEDURE save_coded_data ( in_hash VARCHAR2, in_data VARCHAR2, in_masked VARCHAR2, out_result OUT INTEGER ) AS l_sk INTEGER; BEGIN SELECT COUNT INTO l_sk FROM coded_data WHERE hash = in_hash; IF l_sk = 0 THEN INSERT INTO coded_data ( hash, data, masked ) VALUES ( in_hash, in_data, in_masked ); ELSE raise_application_error(-20000, 'Such card already is registered!'); - UPDATE coded_data SET - data = in_data, - masked = in_masked - WHERE hash = in_hash; END IF; out_result := l_sk + 1; END save_coded_data; {code} Exceprion : {code} org.hibernate.exception.GenericJDBCException: Error calling CallableStatement.getMoreResults at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47) ~[hibernate-core-5.1.0.Final.jar:5.1.0.Final] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.1.0.Final.jar:5.1.0.Final] at org.hibernate.result.internal.OutputsImpl.convert(OutputsImpl.java:79) ~[hibernate-core-5.1.0.Final.jar:5.1.0.Final] at org.hibernate.result.internal.OutputsImpl.<init>(OutputsImpl.java:56) ~[hibernate-core-5.1.0.Final.jar:5.1.0.Final] at org.hibernate.procedure.internal.ProcedureOutputsImpl.<init>(ProcedureOutputsImpl.java:32) ~[hibernate-core-5.1.0.Final.jar:5.1.0.Final] at org.hibernate.procedure.internal.ProcedureCallImpl.buildOutputs(ProcedureCallImpl.java:420) ~[hibernate-core-5.1.0.Final.jar:5.1.0.Final] at org.hibernate.procedure.internal.ProcedureCallImpl.getOutputs(ProcedureCallImpl.java:372) ~[hibernate-core-5.1.0.Final.jar:5.1.0.Final] at org.hibernate.jpa.internal.StoredProcedureQueryImpl.outputs(StoredProcedureQueryImpl.java:240) ~[hibernate-entitymanager-5.1.0.Final.jar:5.1.0.Final] at org.hibernate.jpa.internal.StoredProcedureQueryImpl.getOutputParameterValue(StoredProcedureQueryImpl.java:279) ~[hibernate-entitymanager-5.1.0.Final.jar:5.1.0.Final] ..... Caused by: java.sql.SQLException: The number of parameter names does not match the number of registered praremeters at oracle.jdbc.driver.OracleSql.setNamedParameters(OracleSql.java:198) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0] at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4712) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0] at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1376) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0] at com.jolbox.bonecp.PreparedStatementHandle.execute(PreparedStatementHandle.java:140) ~[bonecp-0.8.0.RELEASE.jar:na] at org.hibernate.result.internal.OutputsImpl.<init>(OutputsImpl.java:52) ~[hibernate-core-5.1.0.Final.jar:5.1.0.Final] ... 39 common frames omitted {code}
    via by Olegs Sedacs,
  • JPA Paging does not work
    via by 740591,
  • Remote procedure call error
    via GitHub by milci199
    ,
  • IndexOutOfBound searching in a @Lob field
    via Stack Overflow by caarlos0
    ,
  • Issues with Hibernate 4.3.5 c3p0-0.9.1
    via Stack Overflow by looser
    ,
    • org.hibernate.exception.GenericJDBCException: Error calling CallableStatement.getMoreResults at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47)[hibernate-core-5.1.0.Final.jar:5.1.0.Final] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)[hibernate-core-5.1.0.Final.jar:5.1.0.Final] at org.hibernate.result.internal.OutputsImpl.convert(OutputsImpl.java:79)[hibernate-core-5.1.0.Final.jar:5.1.0.Final] at org.hibernate.result.internal.OutputsImpl.<init>(OutputsImpl.java:56)[hibernate-core-5.1.0.Final.jar:5.1.0.Final] at org.hibernate.procedure.internal.ProcedureOutputsImpl.<init>(ProcedureOutputsImpl.java:32)[hibernate-core-5.1.0.Final.jar:5.1.0.Final] at org.hibernate.procedure.internal.ProcedureCallImpl.buildOutputs(ProcedureCallImpl.java:420)[hibernate-core-5.1.0.Final.jar:5.1.0.Final] at org.hibernate.procedure.internal.ProcedureCallImpl.getOutputs(ProcedureCallImpl.java:372)[hibernate-core-5.1.0.Final.jar:5.1.0.Final] at org.hibernate.jpa.internal.StoredProcedureQueryImpl.outputs(StoredProcedureQueryImpl.java:240)[hibernate-entitymanager-5.1.0.Final.jar:5.1.0.Final] at org.hibernate.jpa.internal.StoredProcedureQueryImpl.getOutputParameterValue(StoredProcedureQueryImpl.java:279)[hibernate-entitymanager-5.1.0.Final.jar:5.1.0.Final]

    Users with the same issue

    linxiaolong
    13 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    23 more bugmates