欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

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

程序员文章站 2024-01-05 22:06:34
...
javawebmysql

报错信息:

java.sql.SQLException: Cannot create Bean.privilege: Bean.privilege Query: select p.* from privilege p,privilege_role pr where p.id=pr.p_id and pr.r_id=? Parameters: [007]
at org.apache.commons.dbutils.AbstractQueryRunner.rethrow(AbstractQueryRunner.java:392)
at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:351)
at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:180)
at dao.privilegeDao.getRoleprivileges(privilegeDao.java:80)
at service.BussinessService.getRolePrivileges(BussinessService.java:89)
at servlet.showRolePriUIServlet.doPost(showRolePriUIServlet.java:64)
at servlet.showRolePriUIServlet.doGet(showRolePriUIServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)

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)

DAO查询语句

    public List 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) qr.query(JDBCUtils.getconnection(),sql,Rid,new BeanListHandler(privilege.class));        }        catch(Exception e){            e.printStackTrace();            throw new RuntimeException();        }    } 

privilegeBean

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

相关标签: javaweb mysql

上一篇:

下一篇: