Hello,
I’m getting a lot of java.lang.NoClassDefFoundError
logs since I upgraded from Vaadin 7.6.8 + Spring Boot 1.4.0 to Vaadin 7.7.3 + Spring Boot 1.4.1. This is the full stack trace:
java.lang.NoClassDefFoundError: org/eclipse/jetty/http/HttpMethod
at org.springframework.boot.context.embedded.jetty.JettyEmbeddedErrorHandler.handle(JettyEmbeddedErrorHandler.java:51) ~[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.eclipse.jetty.server.Response.sendError(Response.java:349) ~[gwt-dev-2.7.0.vaadin4.jar:na]
at javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:120) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
at com.vaadin.server.communication.HeartbeatHandler.handleSessionExpired(HeartbeatHandler.java:92) ~[vaadin-server-7.7.3.jar:7.7.3]
at com.vaadin.server.VaadinService.handleSessionExpired(VaadinService.java:1526) ~[vaadin-server-7.7.3.jar:7.7.3]
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1432) ~[vaadin-server-7.7.3.jar:7.7.3]
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:379) ~[vaadin-server-7.7.3.jar:7.7.3]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686) ~[gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494) ~[gwt-dev-2.7.0.vaadin4.jar:na]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1465) ~[gwt-dev-2.7.0.vaadin4.jar:na]
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:89) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1465) ~[gwt-dev-2.7.0.vaadin4.jar:na]
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1465) ~[gwt-dev-2.7.0.vaadin4.jar:na]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1465) ~[gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.server.Server.handle(Server.java:370) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) [gwt-dev-2.7.0.vaadin4.jar:na]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) [gwt-dev-2.7.0.vaadin4.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77]
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.http.HttpMethod
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_77]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_77]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_77]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_77]
... 44 common frames omitted
It seems like it’s confused because Tomcat is used while Jetty is also on the classpath, although I can’t simply exclude that in build.
Does anyone else have this issue, and is there a worksaround?