Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/389.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 无法在hibernate hql查询中运行sql查询_Java_Hibernate - Fatal编程技术网

Java 无法在hibernate hql查询中运行sql查询

Java 无法在hibernate hql查询中运行sql查询,java,hibernate,Java,Hibernate,我们正在使用HibernateHQL,其中下面的查询必须作为hql实现,其中医生用户id在一对多映射中映射到rdo_用户id select * from rdo.rdo_user as u , rdo.doctor d where u.user_id=d.user_id; 我的HQL查询是 select * from rdo.rdo_user as u , rdo.doctor d where u.user_id=d.user_id; String sql = "selec

我们正在使用HibernateHQL,其中下面的查询必须作为hql实现,其中医生用户id在一对多映射中映射到rdo_用户id

select * from rdo.rdo_user as u , rdo.doctor d where u.user_id=d.user_id;
我的HQL查询是

select * from rdo.rdo_user as u , rdo.doctor d where u.user_id=d.user_id;
         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 +"%')";
    }
请指导我如何做到这一点

select * from rdo.rdo_user as u , rdo.doctor d where u.user_id=d.user_id;
我面临的错误是

select * from rdo.rdo_user as u , rdo.doctor d where u.user_id=d.user_id;
         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/
        ----------> Parent Classloader:
        java.net.URLClassLoader@8afcd0c
         :
         java.lang.ClassNotFoundException: org.hibernate.exception.NestableDelegate

错误是什么?您的
字符串sql
中的“select”部分在哪里?没有,我已使用select更改了查询,但无法从表中检索值,并且在这两种情况下都没有发现任何错误