• dwr运行时出现Servlet.init() for servlet dwrinvoker threw exception的解决方法


    dwr运行时出现Servlet.init() for servlet dwr-invoker threw exception的解决方法
    2009-07-29 11:56

    错误信息如下:

    javax.servlet.ServletException: Servlet.init() for servlet dwr-invoker threw exception

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

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

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

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

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

              java.lang.Thread.run(Unknown Source)

    root cause

    java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

              org.directwebremoting.dwrp.PollHandler.<clinit>(PollHandler.java:382)

              java.lang.Class.forName0(Native Method)

              java.lang.Class.forName(Unknown Source)

              org.directwebremoting.impl.ContainerUtil.class$(ContainerUtil.java:97)

              org.directwebremoting.impl.ContainerUtil.setupDefaults(ContainerUtil.java:150)

              org.directwebremoting.impl.ContainerUtil.setupDefaultContainer(ContainerUtil.java:125)

              org.directwebremoting.servlet.DwrServlet.init(DwrServlet.java:73)

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

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

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

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

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

              java.lang.Thread.run(Unknown Source)

    root cause

    java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory

              org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)

              org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)

              java.lang.ClassLoader.loadClassInternal(Unknown Source)

              org.directwebremoting.dwrp.PollHandler.<clinit>(PollHandler.java:382)

              java.lang.Class.forName0(Native Method)

              java.lang.Class.forName(Unknown Source)

              org.directwebremoting.impl.ContainerUtil.class$(ContainerUtil.java:97)

              org.directwebremoting.impl.ContainerUtil.setupDefaults(ContainerUtil.java:150)

              org.directwebremoting.impl.ContainerUtil.setupDefaultContainer(ContainerUtil.java:125)

              org.directwebremoting.servlet.DwrServlet.init(DwrServlet.java:73)

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

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

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

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

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

              java.lang.Thread.run(Unknown Source)

    *********************************************************************************************************************************

    解决方法:这个问题,我一开始也被折腾了好久,后来发现,其实很简单,只是我少引用了一个包,那就是commons-logging-1.0.4.jar包,这个包你可以先去下载个dwr-2.0.4-src.zip,里面就含有这个包,然后,你把commons-logging-1.0.4.jar这个包放到你的wEB-INF下的lib文件夹下,再运行试试

  • 相关阅读:
    JSP指令用来设置整个JSP页面相关的属性
    JSP 生命周期 理解JSP底层功能的关键就是去理解它们所遵守的生命周期
    JSP 开发环境搭建
    JSP(Java Server Pages,即:Java服务器页面
    JSP 国际化
    JSP 调试
    JSP 异常处理
    JSP 自定义标签
    JSP JavaBean
    JSP 标准标签库(JSTL)
  • 原文地址:https://www.cnblogs.com/zqmingok/p/1555426.html
Copyright © 2020-2023  润新知