论坛首页 Java企业应用论坛

struts里项目运行异常

浏览 1192 次
该帖已经被评为隐藏帖
作者 正文
   发表时间:2008-04-01  
严重: Servlet.service() for servlet action threw exception
java.lang.NoClassDefFoundError: org/apache/commons/dbutils/QueryRunner
at com.yourcompany.struts.action.InputAction.execute(InputAction.java:63)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
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:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
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:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)


这个相应的jar包我已经导入。
import org.apache.commons.dbutils.QueryRunner;
相关代码:
context = new InitialContext();
DataSource ds = (DataSource) context.lookup("java:/comp/env/jdbc/sqlds");
QueryRunner qr = new QueryRunner(ds);//第63行
qr.update(sql, params);
很是迷茫
而且前几天sql连jdbc的时候驱动包也加载了
报的也是这个异常
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics