unable to run the sql query in hibernate hql query
<p>We are using hibernate hql where below query has to be implemented as hql where the doctor user id is mapped to rdo_user user_id in one to many mapping               </p>

<pre><code>select * from rdo.rdo_user as u , rdo.doctor d where u.user_id=d.user_id;
</code></pre>

<p>My HQL QUERY IS</p>

<pre><code>         String sql = "select user,doc from RdoUser as user, Doctor as doc";
    if(search_doctor != null){
        sql = sql+" where user.userId=doc.userId and (LOWER(user.firstName) like '%"+ search_doctor +"%' or LOWER(user.lastName) like '%"+ search_doctor +"%' or LOWER(user.email) like '%"+ search_doctor +"%')";
    }
</code></pre>

<p>kindly guide me how to achieve this </p>

<p>error which i am facing is </p>

<pre><code>         Feb 16, 2016 9:57:51 PM com.caucho.hessian.io.SerializerFactory getDeserializer
         WARNING: Hessian/Burlap: 'org.hibernate.exception.NestableDelegate' is an unknown class in WebappClassLoader
         context: 
        delegate: false
        repositories:
        /WEB-INF/classes/
        ----------&gt; Parent Classloader:
        java.net.URLClassLoader@8afcd0c
         :
         java.lang.ClassNotFoundException: org.hibernate.exception.NestableDelegate
</code></pre>