Caused by: org.hibernate.QueryException: Not all named parameters have been set: [isActive] [from User where isActive = :isActive]
<p>I have a table of users made up of a boolean value of active users as shown in the following table</p>

<pre><code>id | name | active
1  | john | false
2  | bob  | true
3  | jeff | true
</code></pre>

<p>On the above structure, I want to retrieve the list of users where isActive is equal to true.</p>

<p>This is my hql query</p>

<pre><code>public List getByIsActive(boolean isActive) {
        return  getSession().createQuery(
                "from User where isActive = :isActive").list();
    }
</code></pre>

<p>I am retrieving it like this</p>

<pre><code>@ResponseBody
    @RequestMapping(value = "/get-all-activeusers", method = RequestMethod.GET)
    public List&lt;User&gt; getAllActiveUsers() {
        try {

            boolean isActive = true;
            return _userDao.getByIsActive(isActive);

        } catch (Exception e) {
            logger.error("Exception in fetching active users: ", e.getStackTrace());
            e.printStackTrace();
        }
        return null;
    }
</code></pre>

<p>And I am getting this error</p>

<pre><code>Caused by: org.hibernate.QueryException: Not all named parameters have been set: [isActive] [from User where isActive = :isActive]
    at org.hibernate.internal.AbstractQueryImpl.verifyParameters(AbstractQueryImpl.java:401)
    at org.hibernate.internal.AbstractQueryImpl.verifyParameters(AbstractQueryImpl.java:385)
    at org.hibernate.internal.QueryImpl.list(QueryImpl.java:99)
    at com.models.UserDao.getByIsActive(UserDao.java:64)
</code></pre>

<p>Please where I getting it wrong in my attempt. I have researched but it is not tailored to the problem am facing.</p>