title: Missing IN or OUT parameter at index:: 1 error in Java, Oracle
body: <p>Hi I coded a Library Management System in JSF 2.2 with using Netbeans 8.0.2 and Oracle 11g Express Edition. I have several pages named Books, Borrowers etc. and some tables named same in database. My problem is this: in Borrowers screen book ids are displayed. But I want to reach book's titles that have same id. Here is my code. </p>
  
  <pre><code>public List&lt;Borrower&gt; getBorrowers()throws ClassNotFoundException,SQLException, InstantiationException, IllegalAccessException{
      Class.forName("oracle.jdbc.driver.OracleDriver");
      con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","Alparslan-PC","123456");
      ps=con.prepareStatement("SELECT * FROM BORROWER");
  
      BookidPs = con.prepareStatement("SELECT TITLE FROM BOOK AND BORROWER WHERE ISBN=?");
  
  
      ResultSet rs=ps.executeQuery();
      ResultSet Rs2=BookidPs.executeQuery();
      List&lt;Borrower&gt; liste = new ArrayList&lt;Borrower&gt;();
      while(rs.next()){
  
          Borrower borrow = new Borrower();
          borrow.setId(rs.getBigDecimal("ID"));
          borrow.setName(rs.getString("NAME"));
          borrow.setSurname(rs.getString("SURNAME"));
          borrow.setAddress(rs.getString("ADDRESS"));
          borrow.setPhonenumber(rs.getString("PHONENUMBER"));
          borrow.setBorrowdate(rs.getString("BORROWDATE"));
          //book.setIsbn(rs.getString("BOOKID"))
          borrow.setBookid(Rs2.getString("BOOKID"));
          //borrow.setBookid(((Book) rs.getObject("BOOKID")).getIsbn());
          liste.add(borrow);
      }
      System.out.print(liste);
      return liste;
  }
  </code></pre>
  
  <p>if line 22 changed with borrow.setBookid(rs.getString("BOOKID")); The bookids are shown. I wrote another query named BookidPs. if I run this program I get Missing IN or OUT parameter at index:: 1 error. If you help I will appretiate. Thanks</p>