struts里项目运行异常

严重:Servlet.service()forservletactionthrewexception

java.lang.NoClassDefFoundError:org/apache/commons/dbutils/QueryRunner

atcom.yourcompany.struts.action.InputAction.execute(InputAction.java:63)

atorg.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)

atorg.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)

atorg.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)

atorg.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)

atjavax.servlet.http.HttpServlet.service(HttpServlet.java:710)

atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)

atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)

atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)

atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

atorg.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

atjava.lang.Thread.run(UnknownSource)

这个相应的jar包我已经导入。

importorg.apache.commons.dbutils.QueryRunner;

相关代码:

context=newInitialContext();

DataSourceds=(DataSource)context.lookup("java:/comp/env/jdbc/sqlds");

QueryRunnerqr=newQueryRunner(ds);//第63行

qr.update(sql,params);

很是迷茫

而且前几天sql连jdbc的时候驱动包也加载了

报的也是这个异常

相关推荐