Missing IN or OUT parameter at index:: 2
<p>I used the below query and getting an exception as below. </p>

<blockquote>
  <p>java.sql.SQLException: Missing IN or OUT parameter at index:: 2</p>
</blockquote>

<p>Please help. </p>

<pre><code>select s.ship_id from SHIP S where S.ship_id not in (SELECT ship_id FROM ship WHERE notes1 IS NOT NULL 
AND notes1 IN (select notes1 from ship WHERE SHIP_ID &lt;&gt; ? ))
AND S.SHIP_ID = ?
</code></pre>