首页 > 数据库 > mysql教程 > javaweb-使用DButils查询语句在DAO层报错Cannot Create Bean。。。query:。。。

javaweb-使用DButils查询语句在DAO层报错Cannot Create Bean。。。query:。。。

WBOY
发布: 2016-06-06 09:32:52
原创
2449 人浏览过

javawebmysql

报错信息:

java.sql.SQLException: 无法创建 Bean.privilege: Bean.privilege 查询: select p.* from 特权 p,privilege_role pr where p.id =pr.p_id 和 pr.r_id=? 参数:[007]
位于 org.apache.commons.dbutils.AbstractQueryRunner.rethrow(AbstractQueryRunner.java:392)
位于 org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:351)
在 org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:180)
在 dao.privilegeDao.getRoleprivileges(privilegeDao.java:80)
在 service.BussinessService.getRolePrivileges(BussinessService.java) :89)
在 servlet.showRolePriUIServlet.doPost(showRolePriUIServlet.java:64)
在 servlet.showRolePriUIServlet.doGet(showRolePriUIServlet.java:46)
在 javax.servlet.http.HttpServlet.service(HttpServlet) .java:624)

<code>at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)at filter.CharacterFilter.doFilter(CharacterFilter.java:28)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)at filter.RoleFilter.doFilter(RoleFilter.java:50)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2516)at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2505)at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)at java.lang.Thread.run(Thread.java:619)</code>
登录后复制

DAO 查询语句

<code>    public List<privilege> getRoleprivileges(String Rid){        try{            QueryRunner qr = new QueryRunner();            String sql = "select p.* from privilege p,privilege_role pr where p.id=pr.p_id and pr.r_id=? ";            return (List<privilege>) qr.query(JDBCUtils.getconnection(),sql,Rid,new BeanListHandler<privilege>(privilege.class));        }        catch(Exception e){            e.printStackTrace();            throw new RuntimeException();        }    } </privilege></privilege></privilege></code>
登录后复制

privilegeBean

javaweb-使用DButils查询语句在DAO层报错Cannot Create Bean。。。query:。。。

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板