"Caused by: java.lang.IllegalArgumentException: org.hibernate.QueryException: Dialect [org.hibernate.dialect.SQLServer2008Dialect] not known to support REF_CURSOR parameters" in EAP.

Solution Verified - Updated -

Issue

  • Using the Hibernate dialect org.hibernate.dialect.SQLServer2008Dialect
  • Exception occurred while executing the stored procedure with an OUT parameter of type REF_CURSOR

    ... org.hibernate.QueryException: Dialect [org.hibernate.dialect.OracleDialect] not known to support REF_CURSOR parameters
        at org.hibernate.procedure.internal.StandardCallableStatementSupport.verifyRefCursorSupport(StandardCallableStatementSupport.java:76)
        at org.hibernate.procedure.internal.StandardCallableStatementSupport.renderCallableStatement(StandardCallableStatementSupport.java:59)
        at org.hibernate.procedure.internal.ProcedureCallImpl.buildOutputs(ProcedureCallImpl.java:384)
        at org.hibernate.procedure.internal.ProcedureCallImpl.getOutputs(ProcedureCallImpl.java:363)
        at org.hibernate.jpa.internal.StoredProcedureQueryImpl.outputs(StoredProcedureQueryImpl.java:234)
        at org.hibernate.jpa.internal.StoredProcedureQueryImpl.execute(StoredProcedureQueryImpl.java:217)
        ...
    

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.x
  • Hibernate
    • 5.x
  • SQL Server 2008 R2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content