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

Return REFCURSOR on native named query: regression on 4.2.0 CR1

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.2.0.CR1
    • Fix Version/s: 4.2.0.Final, 4.3.0.Beta1
    • Component/s: query-sql
    • Labels:
      None
    • Environment:
      Databas: Oracle 11g
      Hibernate: 4.2.0.CR1
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

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

      Description

      After upgrade from 4.1.9 to 4.2.0.CR1 this native query shows an ORA-:

      [SqlExceptionHelper  ] [15:17:59.846] [http-thread-pool-8080(5)] WARN  - SQL Error: 17166, SQLState: 99999
      [SqlExceptionHelper  ] [15:17:59.847] [http-thread-pool-8080(5)] ERROR - No se puede realizar la recuperación en una sentencia PLSQL: next
      

      Code of the native named query:

      @NamedNativeQueries({
      	@NamedNativeQuery(
      		name = NamedQueryIdentifiers.RESERVAS_LISTADO_PANTALLA,
      		query = " { call GNOMO.PCK_RESERVAS.LISTADO_PANTALLA(?, " +
      				"		P_FILTRO => GNOMO.FILTRO_LISTADO_RESERVAS( " + 
      				"    		FECHA_RESERVA_INI => :fechaReservaIni, " + 
      				"    		FECHA_RESERVA_FIN => :fechaReservaFin, " + 
      				"    		AULA_ID => :aulaId, " + 
      				"    		CENTRO_ID => :centroId, " + 
      				"    		CAFETERIA => :cafeteria,  " +
      				"    		ESTADO => :estados, " +
      			    "			SOLICITANTE => :solicitante, " + 
      			    "			RESPONSABLE_AULA => :responsableAula " +
      				"  		), " +
      				"		P_PAGINACION => COMUN.PAGINACION(" +
      				"			INICIO => :" + NamedQueryParameters.PAGINACION_INI_PARAM + ", " +
      				"			LIMITE => :" + NamedQueryParameters.PAGINACION_FIN_PARAM + 
      				"		), " +
      				"		P_ORDENACION => :" + NamedQueryParameters.ORDENACION_PARAM + 
      				"	) " +	
      				" } ",
      		resultClass = FilterResult.class, 
      		callable = true
      	)
      })
      

      The first ? is the REFCURSOR that returns the database store procedure.

        Attachments

          Issue links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: