title: java.lang.IllegalAccessException: When calling stored procedure from Hibhernate
body: <p>I am unable to call SP from hibernate using annotation. Every time i am calling SP hibernate showing error as</p>
  
  <pre><code>java.lang.IllegalAccessException: Class org.hibernate.dialect.Oracle9Dialect can not access a member of class oracle.jdbc.driver.OracleTypes with modifiers ""
  </code></pre>
  
  <p>Dao class where i calling SP</p>
  
  <pre><code>Query q = session.getCurrentSession().getNamedQuery("callStockStoreProcedure");
  </code></pre>
  
  <p>Entity class</p>
  
  <pre><code>@javax.persistence.NamedNativeQuery(name = "callStockStoreProcedure", query = "{ call TESTP(?) }", resultClass = Quotations.class, hints = {
  @javax.persistence.QueryHint(name = "org.hibernate.callable", value = "true") })
  </code></pre>
  
  <p>And Procedure</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE TESTP 
  (
    p_cursor out sys_refcursor
  ) AS 
  
  begin
     open p_cursor for SELECT * FROM MF_ITEM_TYPE;
  
  END TESTP;
  </code></pre>