title: PLS-00306: wrong number or types of arguments in call to GET_NEW_EVENTS in Java
body: <p>I'm getting the below error while calling a stored procedure from Java:</p>
  
  <p><strong>"java.sql.SQLException: [Oracle][ODBC][Ora]ORA-06550: line 1, column 7:
  PLS-00306: wrong number or types of arguments in call to 'GET_NEW_EVENTS'
  ORA-06550: line 1, column 7:
  PL/SQL: Statement ignored"</strong></p>
  
  <p>The stored procedure is as below:</p>
  
  <pre><code>    create or replace package body event_subscription as
      procedure get_new_events( p_events in out SYS_REFCURSOR ) as
      begin
          open p_events for
              select log_id from event_alert_log;         
      end get_new_events;
  end event_subscription;
  </code></pre>
  
  <p>And the Java code to cal the stored procedure is as below:</p>
  
  <pre><code>    sqlString = "BEGIN event_subscription.get_new_events(?); END;";
  CallableStatement  cs = connection.prepareCall(sqlString);
  cs.registerOutParameter(1,OracleTypes.CURSOR);
  cs.execute(); // This line is failing and throwing the SQLException
  ResultSet rs = (ResultSet) cs.getObject(1);
  </code></pre>
  
  <p>The Oracle Version is: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
  The Java version is: 1.6.</p>
  
  <p>Can somebody help me in this issue. I have been trying all possible solutions to this problem.</p>