title: CallableStatement.getResultSet() always return null when calling an Oracle function
body: <p>I am executing the following code:</p>
  
  <pre><code>CallableStatement cs;
  cs = conn.prepareCall("{ ? = call mypackage.myfunc()}");
  cs.registerOutParameter(1, OracleTypes.CURSOR);
  System.out.println(cs.execute());
  System.out.println(cs.getResultSet());
  ResultSet rs = (ResultSet) cs.getObject(1);
  System.out.println(rs);
  </code></pre>
  
  <p>The function is declared as follows:</p>
  
  <pre><code>CREATE OR REPLACE PACKAGE BODY myuser.mypackage AS 
  FUNCTION myfunc
  return sys_refcursor 
  is 
  a_cursor sys_refcursor; 
  begin 
  open a_cursor for select * from mytable; 
  return a_cursor; 
  end myfunc; 
  end mypackage; 
  / 
  </code></pre>
  
  <p>According to the documentation, if there is a result then cs.execute() will return true and cs.getResultSet() will have a value. However, this is the output I get:</p>
  
  <pre><code>false
  null
  oracle.jdbc.driver.OracleResultSetImpl@b92a848
  </code></pre>
  
  <p>I am using Oracle Express 11.2.0 and the latest driver.</p>
  
  <p>Any hints/explanations/things to try will be very welcome.</p>
  
  <p>Thanks!</p>