title: storedProcedure.registerStoredProcedureParameter with out Parameter ref cursor with Jpa Eclipse Link
body: <p>I am new to Jpa i want to execute Procedure </p>
  
  <p>I have Code as Followes</p>
  
  <pre><code>private static final String PERSISTENCE_UNIT_NAME = "todos";
  private static EntityManagerFactory factory;
  
  public static void main(String[] args) {
  
      factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);
      EntityManager em = factory.createEntityManager();
  
      em.getTransaction().begin();
      StoredProcedureQuery storedProcedure = em.createStoredProcedureQuery("TEST1");
      // set parameters
      storedProcedure.registerStoredProcedureParameter("P_CODE", String.class, ParameterMode.IN);
      storedProcedure.registerStoredProcedureParameter("P_DATE", String.class, ParameterMode.IN);
      storedProcedure.registerStoredProcedureParameter("P_CURSOR", ResultSet.class, ParameterMode.REF_CURSOR );
      storedProcedure.setParameter("P_CODE", "5110" );
      storedProcedure.setParameter("P_DATE", "01/01/2015" );
      // execute SP
      storedProcedure.execute();
      // get result
      Object obj =storedProcedure.getOutputParameterValue("tax");
  
      em.getTransaction().commit();
      em.close();
  </code></pre>
  
  <p>}</p>
  
  <p>But this is giving an Exception for register out parameter Please tell what we Have to pass 
  I am using Jpa EclipseLink Implimentation 
  Exception in thread "main" javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.4.v20160829-44060b6): org.eclipse.persistence.exceptions.DatabaseException
  Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 7:
  PLS-00306: wrong number or types of arguments in call to 'TEST1'
  ORA-06550: line 1, column 7: PL/SQL: Statement ignored  Error Code: 6550
  Call: BEGIN TEST1(P_CODE=>?, P_DATE=>?, P_CURSOR=>?); END;  bind => [3 parameters bound] Query: ResultSetMappingQuery()</p>