title: Problem with positional parameters in JPA native query
body: <p>I'm trying to do:</p>
  
  <pre><code>String sql = "SELECT email FROM users WHERE (type like 'B') AND (username like '?1')";
  List results = em.createNativeQuery(sql).setParameter(1, username).getResultList();
  </code></pre>
  
  <p>But I get IllegalArgumentException that tells me that the parameter is out of bounds. What am I doing wrong?</p>