title: java.sql.SQLException: Paramètre IN ou OUT absent dans l'index :: 3
body: <p>I am new to Oracle and was trying to call my procedure from a package via callStat but the following error:  </p>
  
  <blockquote>
    <p><code>java.sql.SQLException: Paramètre IN ou OUT absent dans l'index :: 3</code></p>
  </blockquote>
  
  <p>I read many posts about this issue but cannot really localize my porblem, any clue?</p>
  
  <h2>Here is my procedure:</h2>
  
  <pre><code>PROCEDURE get_employees(
       emp_no IN  number,   
       batch_size  IN     NUMBER,   
       found       IN OUT NUMBER, 
       done_fetch  OUT    NUMBER, 
       emp_name    OUT    name,
       emp_dept    OUT    dept,
       emp_salary  OUT    sal) IS
  
  
  
  BEGIN
         IF NOT get_emp%ISOPEN THEN      -- open the cursor if
             OPEN get_emp(emp_no);  -- not already open
         END IF;
     done_fetch := 0;  -- set the done flag FALSE
     found := 0;
  
     FOR i IN 1..batch_size LOOP
         FETCH get_emp INTO emp_name(i), emp_dept(i), emp_salary(i);
         IF get_emp%NOTFOUND THEN    -- if no row was found
             CLOSE get_emp;
             done_fetch := 1;   -- indicate all done
             EXIT;
         ELSE
             found := found + 1;  -- count row
         END IF;
     END LOOP;
  
  
  END;
  </code></pre>
  
  <h2>and a part of the java code</h2>
  
  <pre><code>public class main1 {
  
  public static void main(String[] args) {
  
      Connection conn = null;
      CallableStatement cst = null;
      ResultSet rs = null;
      int emp_no = 100;
      Object temp;
  
      try {
          Class.forName ("oracle.jdbc.OracleDriver");
  
          conn =DriverManager.getConnection("yada yada yada");
          conn.setAutoCommit(false);
          System.out.println("Successfuly connected!");
  
  
              cst = conn.prepareCall("{ call get_employees.pkg1(?,?,?,?) }");
                  cst.setInt(1, emp_no);
                  cst.registerOutParameter(2, OracleTypes.CURSOR);
                  cst.execute();
                  rs = (ResultSet) cst.getObject(2);
                  ResultSetMetaData rsm = rs.getMetaData();
                  int columnCount = rsm.getColumnCount();
                  while (rs.next()){
                      for (int j=0;j&lt; columnCount;j++){
                          temp = rs.getObject(j+1);
                      }
                  }
  </code></pre>