title: getting error( java.sql.SQLException: Invalid column index)
body: <p><strong>Storedprocedure</strong></p>
  
  <pre><code>create or replace procedure my_procedure
  is
  cursor c_emp is select * from employees;
  r_name c_emp%rowtype;
  begin
  open c_emp;
  loop
  fetch c_emp into r_name;
  DBMS_OUTPUT.PUT_LINE(r_name.EMP_NAME);
  EXIT WHEN c_emp%NOTFOUND;
  END LOOP;
  close c_emp;
  END;
  </code></pre>
  
  <p><strong>JDBC code</strong></p>
  
  <pre><code>stmt=conn.prepareCall("{call my_procedure}");
  
        stmt.registerOutParameter(1, java.sql.Types.VARCHAR);
        ResultSet rs = stmt.executeQuery();
        while(rs.next()) {
              System.out.println( rs.getString(1));
          }
  </code></pre>
  
  <p>It showing error like</p>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>java.sql.SQLException: Invalid column index
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:113)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:147)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:209)
      at oracle.jdbc.driver.OracleCallableStatement.registerOutParameterInternal(OracleCallableStatement.java:122)
      at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:285)
      at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:371)
      at table.callstmt_storedprcd.main(callstmt_storedprcd.java:27)
  </code></pre>
  
  <p>I dont know why it is showing like this error.Please rectify my error.</p>