woniuyouli 2009-08-07 14:01
浏览 602
已采纳

javax.servlet.ServletException: Servlet execution threw an exception是什么错误啊?

在运行tomcat时出现以下信息,不知道是什么意思

HTTP Status 500 -


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception

root cause

java.lang.NoClassDefFoundError: org/apache/commons/dbutils/QueryRunner
com.v512.guestbook.AddMessageServlet.doPost(AddMessageServlet.java:60)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.


Apache Tomcat/5.0.28

我了个DbUtils组件,它的jar包也放到了WEB-IF/lib目录下了

  • 写回答

1条回答 默认 最新

  • lixjluck 2009-08-07 14:20
    关注

    你使用了dbUtil这个apache的类库,但是没有把它放在运行环境。

    NoClassDefFoundError表明,你的编译打包是有此jar包的。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?