title: java.lang.IllegalArgumentException: Parameter does not exist as a named parameter in
body: <pre><code>public List&lt;Data&gt; List(String name, String id, int lowerBound, int upperBound) throws WiMatchException {
      try {
          Session session = getHibernateTemplate().getSessionFactory().openSession();
          SQLQuery query = session.createSQLQuery("select * from data inner join route on (data.id=route.data_id and data.status=:status  and data.is_active='Y' and route.owner_id= :ownerId) LIMIT lowerBound,upperBound ");
          query.addEntity(UserData.class);
          query.setString("status", status);
          query.setString("ownerId", ownerId);
          query.setInteger("lowerBound", lowerBound);
          query.setInteger("upperBound", upperBound);
          List&lt;UserData&gt; resList = query.list();
  
          logger.debug("size of List() =" + resList.size());
          session.close();
          return resList;
  
      } catch (Exception e) {
                   ...
      }
  }
  </code></pre>
  
  <p>When executing the above method I'm getting following exception </p>
  
  <pre><code>java.lang.IllegalArgumentException: Parameter lowerBound does not exist as a named parameter in [select * from data inner join route on (data.id=route.data_id and data.status=:status  and data.is_active='Y' and route.owner_id= :ownerId) LIMIT lowerBound,upperBound ]
  </code></pre>
  
  <p>Need suggestions to resolve this</p>