title: Spring Data Jpa call to Stored Procedure
body: <p>I am trying to create a method that call Stored Procedure to do a very easy insert and a select,</p>
  
  <p>I created a stored procedure on an Oracle database as below:</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE schema.insertNewTable(p_test IN VARCHAR2, p_out OUT VARCHAR2)
  IS
  BEGIN
  INSERT INTO NEWTABLE("TEST") VALUES(p_test);
  SELECT '1' INTO p_out FROM DUAL;
  
  COMMIT;
  
  END;
  </code></pre>
  
  <p>Then on an Entity:</p>
  
  <pre><code>@Procedure(procedureName = "insertNewTable", outputParameterName="p_out")
  String insertNewTable(@Param("p_test") String p_test);
  </code></pre>
  
  <p>but everytime i call this method i get this:</p>
  
  <pre><code>2018-06-23 20:04:43,047|ORA-06550: row 1, colonna 7:
  PLS-00306: wrong number or types of arguments in call to 'INSERTNEWTABLE'
  ORA-06550: riga 1, column 7:
  PL/SQL: Statement ignored
  
  2018-06-23 20:04:43,100|org.springframework.dao.InvalidDataAccessResourceUsageException: Error calling CallableStatement.getMoreResults; SQL [insertNewTable]; nested exception is org.hibernate.exception.SQLGrammarException: Error calling CallableStatement.getMoreResults
      at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:261)
      at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:244)
      at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:503)
  </code></pre>
  
  <p>After a couple of tries (and exceptions), I modified the Entity and the call to avoid "OUT" types and, in this way, I have no errors:</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE schema.insertNewTable(p_test IN VARCHAR2)
  IS
  BEGIN
  INSERT INTO NEWTABLE("TEST") VALUES(p_test);
  
  COMMIT;
  
  END;
  </code></pre>
  
  <p>Then on an Entity:</p>
  
  <pre><code>@Procedure(procedureName = "insertNewTable")
  void insertNewTable(@Param("p_test") String p_test);
  </code></pre>
  
  <p>How can i fix this to get a return value?</p>