I'm trying to run the most up to date spring sample projects in eclipse but i'm always getting ClassNotFoundException. (For example with spring-mvc-showcase project)
Environment:
- Ubuntu 12.04, 64bit (same problem with 13.10)
- openjdk-7-jdk, openjdk-7-jre installed
- Eclipse kepler Java EE version, STS installed.
Steps:
- I make a new project: Spring/Import Spring Getting Started Content
- When all the dependencies loaded, right click on the project name / Run As / Run On Server: J2EE Preview at localhost
Jetty output:
2014-01-16 20:13:01.241:INFO:oejs.Server:jetty-8.1.10.v20130312 2014-01-16 20:13:02.905:WARN:oejw.StandardDescriptorProcessor:Could not instantiate listener org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:424) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:377) at org.eclipse.jetty.server.handler.ContextHandler.loadClass(ContextHandler.java:1517) at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(StandardDescriptorProcessor.java:1839) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:80) at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:67) at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:332) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1219) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.Server.doStart(Server.java:280) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72) at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29) 2014-01-16 20:13:02.931:WARN:oejs.Holder: java.lang.ClassNotFoundException: org.springframework.web.filter.HiddenHttpMethodFilter at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:424) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:377) at org.eclipse.jetty.util.Loader.loadClass(Loader.java:100) at org.eclipse.jetty.util.Loader.loadClass(Loader.java:79) at org.eclipse.jetty.servlet.Holder.doStart(Holder.java:97) at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:91) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:719) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.Server.doStart(Server.java:280) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72) at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29) 2014-01-16 20:13:02.932:WARN:oejuc.AbstractLifeCycle:FAILED httpMethodFilter: javax.servlet.UnavailableException: org.springframework.web.filter.HiddenHttpMethodFilter javax.servlet.UnavailableException: org.springframework.web.filter.HiddenHttpMethodFilter at org.eclipse.jetty.servlet.Holder.doStart(Holder.java:104) at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:91) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:719) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.Server.doStart(Server.java:280) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72) at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29) 2014-01-16 20:13:02.933:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/petclinic,[file:/home/szilard/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/spring-petclinic/, jar:file:/home/szilard/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/spring-petclinic/WEB-INF/lib/jquery-2.0.3-1.jar!/META-INF/resources/, jar:file:/home/szilard/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/spring-petclinic/WEB-INF/lib/jquery-ui-1.10.3.jar!/META-INF/resources/, jar:file:/home/szilard/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/spring-petclinic/WEB-INF/lib/bootstrap-2.3.0.jar!/META-INF/resources/]},/home/szilard/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/spring-petclinic javax.servlet.UnavailableException: org.springframework.web.filter.HiddenHttpMethodFilter at org.eclipse.jetty.servlet.Holder.doStart(Holder.java:104) at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:91) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:719) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.Server.doStart(Server.java:280) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72) at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29) 2014-01-16 20:13:03.416:WARN:oejw.StandardDescriptorProcessor:Could not instantiate listener org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:424) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:377) at org.eclipse.jetty.server.handler.ContextHandler.loadClass(ContextHandler.java:1517) at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(StandardDescriptorProcessor.java:1839) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:80) at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:67) at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:332) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1219) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.Server.doStart(Server.java:280) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72) at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29) 2014-01-16 20:13:03.431:WARN:oejs.Holder: java.lang.ClassNotFoundException: org.springframework.web.filter.DelegatingFilterProxy at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:424) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:377) at org.eclipse.jetty.util.Loader.loadClass(Loader.java:100) at org.eclipse.jetty.util.Loader.loadClass(Loader.java:79) at org.eclipse.jetty.servlet.Holder.doStart(Holder.java:97) at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:91) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:719) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.Server.doStart(Server.java:280) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72) at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29) 2014-01-16 20:13:03.432:WARN:oejuc.AbstractLifeCycle:FAILED csrfFilter: javax.servlet.UnavailableException: org.springframework.web.filter.DelegatingFilterProxy javax.servlet.UnavailableException: org.springframework.web.filter.DelegatingFilterProxy at org.eclipse.jetty.servlet.Holder.doStart(Holder.java:104) at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:91) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:719) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.Server.doStart(Server.java:280) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72) at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29) 2014-01-16 20:13:03.432:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/spring-mvc-showcase,file:/home/szilard/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/spring-mvc-showcase/},/home/szilard/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/spring-mvc-showcase javax.servlet.UnavailableException: org.springframework.web.filter.DelegatingFilterProxy at org.eclipse.jetty.servlet.Holder.doStart(Holder.java:104) at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:91) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:719) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.Server.doStart(Server.java:280) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72) at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29) 2014-01-16 20:13:03.485:INFO:oejs.AbstractConnector:Started [email protected]:8080