Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev mode for gwt20-json sample not working when using gwt 2.8.2 #85

Closed
boemska-aleksandar opened this issue Jun 14, 2018 · 1 comment
Closed

Comments

@boemska-aleksandar
Copy link

Hi,
We have successfully used atmosphere with gwt 2.7, but when tried to upgrade to 2.8.2 we had the following exception (using gwt20-json sample) when running mvn gwt:run command

[ERROR] SEVERE: Failed to initialize Atmosphere Framework
[ERROR] java.lang.NoClassDefFoundError: org/eclipse/jetty/websocket/servlet/WebSocketCreator
[ERROR]         at java.lang.Class.getDeclaredConstructors0(Native Method)
[ERROR]         at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
[ERROR]         at java.lang.Class.getConstructor0(Class.java:3075)
[ERROR]         at java.lang.Class.getDeclaredConstructor(Class.java:2178)
[ERROR]         at org.atmosphere.cpr.DefaultAsyncSupportResolver.newCometSupport(DefaultAsyncSupportResolver.java:236)
[ERROR]         at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolveWebSocket(DefaultAsyncSupportResolver.java:308)
[ERROR]         at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolve(DefaultAsyncSupportResolver.java:294)
[ERROR]         at org.atmosphere.cpr.AtmosphereFramework.autoDetectContainer(AtmosphereFramework.java:2088)
[ERROR]         at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:914)
[ERROR]         at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:838)
[ERROR]         at org.atmosphere.cpr.AtmosphereFrameworkInitializer.configureFramework(AtmosphereFrameworkInitializer.java:75)
[ERROR]         at org.atmosphere.cpr.AtmosphereServlet.configureFramework(AtmosphereServlet.java:84)
[ERROR]         at org.atmosphere.cpr.AtmosphereServlet.configureFramework(AtmosphereServlet.java:80)
[ERROR]         at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:75)
[ERROR]         at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:616)
[ERROR]         at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:396)
[ERROR]         at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:871)
[ERROR]         at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)
[ERROR]         at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)
[ERROR]         at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)
[ERROR]         at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
[ERROR]         at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)
[ERROR]         at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:550)
[ERROR]         at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[ERROR]         at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
[ERROR]         at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
[ERROR]         at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
[ERROR]         at org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:140)
[ERROR]         at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[ERROR]         at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
[ERROR]         at org.eclipse.jetty.server.Server.start(Server.java:387)
[ERROR]         at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
[ERROR]         at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
[ERROR]         at org.eclipse.jetty.server.Server.doStart(Server.java:354)
[ERROR]         at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[ERROR]         at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:760)
[ERROR]         at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:636)
[ERROR]         at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:923)
[ERROR]         at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:706)
[ERROR]         at com.google.gwt.dev.DevMode.main(DevMode.java:432)
[ERROR] Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.websocket.servlet.WebSocketCreator
[ERROR]         at java.lang.ClassLoader.findClass(ClassLoader.java:530)
[ERROR]         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[ERROR]         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[ERROR]         at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:427)
[ERROR]         at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:403)
[ERROR]         ... 40 more

So, the problem is only in dev mode with jetty.

@boemska-aleksandar
Copy link
Author

Ok, exceptions disappeared after adding jetty server dependency in pom.xml

<dependency>
    <groupId>org.eclipse.jetty.websocket</groupId>
    <artifactId>websocket-server</artifactId>
    <version>9.3.24.v20180605</version>
    <scope>provided</scope>
</dependency>

It works ok with jetty 9.3, versions 9.4 and 9.2 still throwing some various exceptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant