Jetty,Spring,Run问题

嗨我试图运行一个webapp,使用spring和jetty并显示以下错误:

   2011-02-03 10:40:59.398::INFO:  jetty-6.1.6
   2011-02-03 10:41:00.637::WARN:  Could not instantiate listener         org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:375)
    at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
    at org.mortbay.jetty.handler.ContextHandler.loadClass(ContextHandler.java:1013)
    at org.mortbay.jetty.webapp.WebXmlConfiguration.initListener(WebXmlConfiguration.java:629)
    at org.mortbay.jetty.webapp.WebXmlConfiguration.initWebXmlElement(WebXmlConfiguration.java:367)
    at org.mortbay.jetty.webapp.WebXmlConfiguration.initialize(WebXmlConfiguration.java:289)
    at org.mortbay.jetty.webapp.WebXmlConfiguration.configure(WebXmlConfiguration.java:222)
    at org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp(WebXmlConfiguration.java:180)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1213)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:509)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:447)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
    at org.mortbay.jetty.Server.doStart(Server.java:222)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
    at runjettyrun.Bootstrap.main(Bootstrap.java:121)
2011-02-03 10:41:00.962::INFO:  Started SelectChannelConnector@0.0.0.0:8080

任何的想法?
谢谢

解决方法:

是的,您的类路径上没有正确的Spring JAR.

ContextLoaderListener位于org.springframework.web.servlet-3.0.x.RELEASE.jar中.

上一篇:Spring:如何使用非setter方法注入属性?


下一篇:java – Jetty ldap身份验证