当前位置:编程学习 > JAVA >>

关于数据源的,真愁人,在线求助

我在用c3p0数据源的时候,用
QueryRunner runner = new QueryRunner(ds);
runner.update(sql, params);
时报出了如下错误,单独使用 runner.update(sql);时可以正常插入到数据库中,
params及sql都已经试过了,没有问题,

关于oracle的jdbc驱动也换过了,Class12和ojdbc14都试过了,dbutils包也试过1.2和1.5
都没有效果,报的错误相同


SEVERE: Servlet.service() for servlet personAddServlet threw exception
java.lang.AbstractMethodError: oracle.jdbc.driver.T4CPreparedStatement.getParameterMetaData()Ljava/sql/ParameterMetaData;
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.getParameterMetaData(NewProxyPreparedStatement.java:573)
at org.apache.commons.dbutils.AbstractQueryRunner.fillStatement(AbstractQueryRunner.java:196)
at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:486)
at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:456)
at ning.li.web.personDAOImp.addPerson(personDAOImp.java:27)
at ning.li.servlet.personAddServlet.doPost(personAddServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)



--------------------编程问答-------------------- http://www.bwxxkj.com/a/jishuzhongxin/kaiyuanruanjian/2012/1220/157885.html --------------------编程问答-------------------- 是dbutils版本的问题,换成1.1版本后就好用了。哈哈
补充:Java ,  Java EE
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,