title: How to set Array in StoredProcedureQuery..setParameter()?
body: <p>There is a code like this:</p>
  <pre class="lang-java prettyprint-override"><code>StoredProcedureQuery query = this.em.createStoredProcedureQuery (&quot;NameOfProcedure&quot;);
  query.registerStoredProcedureParameter (&quot;list_of_ids&quot;, Array.class, ParameterMode.IN);
  query.setParameter (Parameters.PIECE_IDS, oracleArray (dataSource, &quot;T_NUMBER_LIST&quot;, request.getItems (). toArray (items)));
  </code></pre>
  <p>For eclipslink, this code is successfully executed: a parameter is registered to pass the id list, and then this list is set. In case of Hibernate, an exception of type:</p>
  <blockquote>
  <p>java.lang.IllegalArgumentException: Type cannot be null is thrown</p>
  </blockquote>
  <p>As I understand it, Heber doesn't like Array.class in
  <code>query.registerStoredProcedureParameter (&quot;list_of_ids&quot;, Array.class, ParameterMode.IN);</code></p>
  <p>I tried to fix this section to <code>Integer []. Class</code> and <code>ArrayList.class</code>, but this leads to other errors, such as:</p>
  <blockquote>
  <p>Bind value [oracle.sql.ARRAY@5f82399f] was not of specified type [class [Ljava.lang.Integer;</p>
  </blockquote>
  <p>or</p>
  <blockquote>
  <p>Internal conversion failed: [512]</p>
  </blockquote>
  <p>How do I pass a list to parameters?</p>