title: spring-data-jpa 1.11.16 stored procedure with cursor
body: <p>i'm unable to use stored procedure with cursor in spring-data-jpa (version 1.11.16) and an oracle server.</p>
  
  <p>The Repository:</p>
  
  <pre><code>@Repository
  public interface GeoRegionRepository extends CrudRepository&lt;PocRegions, String&gt; {
  
      @Procedure(name = "PocRegions.getRegion", procedureName = "POC_PKG_GEO.PRO_RETURN_REGION")
      List&lt;PocRegions&gt; getRegion(@Param("id_region") BigDecimal regionId);
  }
  </code></pre>
  
  <p>The annotation on the entity:</p>
  
  <pre><code>@Entity
  @Table(name = "POC_REGIONS")
  @NamedStoredProcedureQueries({
          @NamedStoredProcedureQuery( name = "PocRegions.getRegion", procedureName = "POC_PKG_GEO.PRO_RETURN_REGION",
                  resultClasses = PocRegions.class ,parameters = {
                  @StoredProcedureParameter(mode = ParameterMode.IN, name = "id_region", type = BigDecimal.class),
                  @StoredProcedureParameter(mode = ParameterMode.REF_CURSOR, name = "o_cursor", type = Void.class)})
  })
  </code></pre>
  
  <p>that's the java response when i invoke:</p>
  
  <pre><code>geoRegionRepo.getRegion(id)
  </code></pre>
  
  <p>↓</p>
  
  <blockquote>
    <p>2018-12-11 13:07:26.047 DEBUG 24164 --- [nio-9090-exec-2]
    org.hibernate.SQL                        : 
        {call POC_PKG_GEO.PRO_RETURN_REGION(?,?)} Hibernate: 
        {call POC_PKG_GEO.PRO_RETURN_REGION(?,?)} 2018-12-11 13:07:27.410 TRACE 24164 --- [nio-9090-exec-2] o.h.type.descriptor.sql.BasicBinder 
    : binding parameter [id_region] as [NUMERIC] - [1] 2018-12-11
    13:07:27.658  WARN 24164 --- [nio-9090-exec-2]
    .m.m.a.ExceptionHandlerExceptionResolver : Resolved
    [java.lang.UnsupportedOperationException:
    org.hibernate.dialect.Oracle9iDialect does not support resultsets via
    stored procedures]</p>
  </blockquote>
  
  <p>I'm not sure if is possible to use cursor with this old version of spring-data or not. What sould i do to use spring-data-jpa and call the procedure?</p>
  
  <p>Thank you</p>
  
  <p><strong>EDIT 1:</strong></p>
  
  <p>i added into my application.properties the following line:</p>
  
  <pre><code>spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
  </code></pre>
  
  <p>and added that to the pom (excluding hibernate conflict into spring-data-jpa 
  dependency's declariation):</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
      &lt;artifactId&gt;hibernate-tools&lt;/artifactId&gt;
      &lt;version&gt;${hibernate.version}&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>