ClassNotFoundException: org.eclipse.jetty.util.component.AbstractLifeCycle running inside jetty

前端 未结 5 969
太阳男子
太阳男子 2020-12-10 05:49

I am having an issue running a servlet in jetty on Ubuntu 13.04. The server is installed using apt-get and started using sudo service jetty start.

5条回答
  •  情歌与酒
    2020-12-10 06:10

    Put the jetty-util-9.0.4.v20130625.jar in your webapp's WEB-INF/lib/

    As you can see from the stacktrace, you are attempting to use a class found in jetty-util, from within a webapp.

    at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:420)
    

    This tells you that the webapp needs the class from jetty-util.

    Because of webapp classloader isolation, and various rules within Jetty, the classes for org.eclipse.jetty.util.* are not provided by the server, and must be provided by the webapp's own WEB-INF/lib directory.

提交回复
热议问题