title: How to pass list parameter oracle procedure using hibernate and java
body: <p>I need to pass class list like List myList . And I tried</p>
  
  <p>In java:</p>
  
  <pre><code>Query query = session.getNamedQuery("registerTest")
                      .setParameter("excList", myList);
  
              System.out.println(" SUCCESS " +query.executeUpdate());
  </code></pre>
  
  <p>In oracle : </p>
  
  <pre><code>CREATE OR REPLACE TYPE inc_list IS OBJECT (field1 int, field2 int); 
  CREATE OR REPLACE FUNCTION FUNC_MYFUNC(INC_LIST IN inc_list) 
     RETURN NUMBER 
     IS acc_bal NUMBER(11,2);
     BEGIN 
          acc_bal:=1;
         RETURN acc_bal;
      END;
  </code></pre>
  
  <p>to check parameter send or not. But gives error</p>
  
  <pre><code>{call FUNC_MYFUNC(?)}
  32559 [http-bio-9090-exec-10] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 6550, SQLState: 65000
  32559 [http-bio-9090-exec-10] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-06550: line 1, column 7:
  PLS-00306: wrong number or types of arguments in call to 'FUNC_MYFUNC'
  ORA-06550: line 1, column 7:
  PL/SQL: Statement ignored
  
  Error inc exc : org.hibernate.exception.SQLGrammarException: could not execute native bulk manipulation query
  org.hibernate.exception.SQLGrammarException: could not execute native bulk manipulation query
  </code></pre>