Uploaded image for project: 'Hibernate ORM'
  1. HHH-8081

OracleCustomSQLTest fails while calling stored function

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 4.2.0.CR2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      oracle11gR1, oracle11gR1RAC, oracle11gR2, oracle11gR2RAC
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      This test fails while fetching data from stored function

      Stacktrace:

      org.hibernate.exception.GenericJDBCException: could not execute query
      at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)
      at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
      at org.hibernate.loader.Loader.doList(Loader.java:2519)
      at org.hibernate.loader.Loader.doList(Loader.java:2502)
      at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2332)
      at org.hibernate.loader.Loader.list(Loader.java:2327)
      at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:338)
      at org.hibernate.internal.SessionImpl.listCustomQuery(SessionImpl.java:1788)
      at org.hibernate.internal.AbstractSessionImpl.list(AbstractSessionImpl.java:231)
      at org.hibernate.internal.SQLQueryImpl.list(SQLQueryImpl.java:157)
      at org.hibernate.test.sql.hand.custom.CustomStoredProcTestSupport.testEntityStoredProcedure(CustomStoredProcTestSupport.java:100)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
      at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:63)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
      at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:62)
      Caused by: java.sql.SQLException: Cannot perform fetch on a PLSQL statement: next
      at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
      at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:271)
      at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:209)
      at org.hibernate.loader.Loader.processResultSet(Loader.java:938)
      at org.hibernate.loader.Loader.doQuery(Loader.java:910)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:341)
      at org.hibernate.loader.Loader.doList(Loader.java:2516)
      ... 20 more

      Output:

      ...
      07:23:38,214 DEBUG SQL:104 - INSERT INTO EMPLOYMENT (EMPLOYEE, EMPLOYER, STARTDATE, REGIONCODE, VALUE, CURRENCY, EMPID) VALUES (?, ?, CURRENT_DATE, UPPER(?), ?, ?, ?)
      07:23:38,257 DEBUG SQL:104 - { ? = call allEmployments() }
      07:23:38,268  WARN SqlExceptionHelper:143 - SQL Error: 17166, SQLState: 99999
      07:23:38,268 ERROR SqlExceptionHelper:144 - Cannot perform fetch on a PLSQL statement: next
      07:23:38,272  INFO SchemaExport:343 - HHH000227: Running hbm2ddl schema export
      07:23:38,273 DEBUG SchemaExport:353 - Import file not found: /import.sql
      ...
      

        Attachments

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: