title: Expected positional parameter count: 1, actual parameters: []
body: <p>I am getting this below exception when I am trying to execute a Stored procedure using HIbernate from DaoImpl Class.
   I am not sure of what is wrong ..I tried all the ways to fix it but did not resolve the issue.
   Could anyone please help me ,figure out whats wrong with the code or the mapping file.
  The more I am trying to fix ,something the more exceptions I am getting.. I am connectuing to Oracle 9i DB.
  I am struggling on this from really 2 weeks ending up no where.. can anyone please help me fix this issue.</p>
  
  <h3>Mapping file:</h3>
  
  <pre><code>&lt;hibernate-mapping&gt;
  
      &lt;sql-query name="proc_drsrr_sel_ValDDSummaryBal"&gt;
      &lt;!--CALL proc_drsrr_sel_ValDDSummaryBal(:param1)]]&gt;--&gt;
      { call DEFAULT_SCHEMA.proc_name(?,:param1) }
  </code></pre>
  
  <h3>Main-Class:</h3>
  
  <pre><code>public static void main(String[] args) {
          String procName = "proc_name";// args[0];
          String params = "param1:500089" ;
  </code></pre>
  
  <h3>DAO Implementation:</h3>
  
  <pre><code>@SuppressWarnings("unchecked")
      public void callProc(String procName, Map paramMap) throws SQLException {
          Session session = null;
          Transaction tx = null;
          try {
  
              session = HibernateUtils.getSessionFactory().getCurrentSession();
              tx = session.beginTransaction();
              String dbURL = session.connection().getMetaData().getURL().toString();
              System.out.println("Conenction DB URL "+ dbURL );
              tx.setTimeout(5);
              String[] keys = new String[paramMap.size()];
              keys = (String[]) paramMap.keySet().toArray(keys);
  
              Query query = session.getNamedQuery(procName)
              .setParameter("param1", "5501010");
  
              }
  
              List result = query.list();
              System.out.println(query.getQueryString());
              for (int i = 0; i &lt; result.size(); i++) {
                  // logging the information.
                  log.info(i);
  
              }
              tx.commit();
          } catch (RuntimeException exception) {
              exception.printStackTrace();
              try {
                  tx.rollback();
              } catch (RuntimeException rbe) {
                  log.error("Couldn’t roll back transaction", rbe);
                  rbe.printStackTrace();
              }
              throw exception;
          } finally{   
                     if(session !=null){   
                        session.flush();      
                        session.close();      
              }
  </code></pre>
  
  <h3>cfg.xml</h3>
  
  <pre><code>&lt;hibernate-configuration&gt;
      &lt;session-factory&gt;
          &lt;property name="hibernate.connection.url"&gt;jdbc:oracle:thin:@ldap://hdsoid.ute.ovi.com:3060/UT1DEV,cn=OracleContext,dc=ute,dc=ovi,dc=com&lt;/property&gt;
          &lt;property name="hibernate.connection.driver_class"&gt;oracle.jdbc.driver.OracleDriver&lt;/property&gt;
          &lt;property name="hibernate.connection.username"&gt;nameapp&lt;/property&gt;
          &lt;property name="connection.password"&gt;nameapp&lt;/property&gt;
          &lt;property name="connection.pool_size"&gt;1&lt;/property&gt;   
          &lt;property name="hibernate.dialect"&gt;org.hibernate.dialect.OracleDialect&lt;/property&gt;
         &lt;!--   &lt;property name="connection.release_mode"&gt;after_statement&lt;/property&gt; --&gt;
         &lt;property name="default_schema"&gt;DEFAULT_SCHEMA&lt;/property&gt;
  
          &lt;property name="current_session_context_class"&gt;thread&lt;/property&gt;
          &lt;property name="hibernate.show_sql"&gt;true&lt;/property&gt;
          &lt;!-- mapping files --&gt;
          &lt;mapping resource="com/ovi/domain/hibernate.hbm.xml" /&gt;
      &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>