How I can use spring websocket with spring boot and google app engine standard environment
hasanmumin opened this issue · 2 comments
hasanmumin commented
Hello,
I am using spring boot 2.0.1.RELEASE and spring-boot-starter-websocket with google app engine standard environment
- Jetty 9 does not support (websocket ) JSR 356.
- Spring boot 2.0+ works with JSR 356.
- It gives an error like below.
[INFO] GCLOUD: 2018-06-12 13:56:25.860:INFO:oeja.AnnotationConfiguration:main: Scanning elapsed time=2229ms
[INFO] GCLOUD: 2018-06-12 13:56:25.882:WARN:oeja.ServletContainerInitializersStarter:main:
[INFO] GCLOUD: javax.servlet.ServletException: Not running on Jetty, JSR-356 support unavailable
[INFO] GCLOUD: at org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer.onStartup(WebSocketServerContainerInitializer.java:200)
[INFO] GCLOUD: at org.eclipse.jetty.plus.annotation.ContainerInitializer.callStartup(ContainerInitializer.java:140)
[INFO] GCLOUD: at org.eclipse.jetty.annotations.ServletContainerInitializersStarter.doStart(ServletContainerInitializersStarter.java:63)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:330)
[INFO] GCLOUD: at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1406)
[INFO] GCLOUD: at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1368)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)
[INFO] GCLOUD: at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
[INFO] GCLOUD: at org.eclipse.jetty.server.Server.start(Server.java:422)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
[INFO] GCLOUD: at org.eclipse.jetty.server.Server.doStart(Server.java:389)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD: at com.google.appengine.tools.development.jetty9.JettyContainerService.startContainer(JettyContainerService.java:347)
[INFO] GCLOUD: at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:284)
[INFO] GCLOUD: at com.google.appengine.tools.development.AutomaticInstanceHolder.startUp(AutomaticInstanceHolder.java:26)
[INFO] GCLOUD: at com.google.appengine.tools.development.AbstractModule.startup(AbstractModule.java:87)
[INFO] GCLOUD: at com.google.appengine.tools.development.Modules.startup(Modules.java:105)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl.doStart(DevAppServerImpl.java:282)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl.access$000(DevAppServerImpl.java:47)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:223)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:221)
[INFO] GCLOUD: at java.security.AccessController.doPrivileged(Native Method)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:221)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:395)
[INFO] GCLOUD: at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:45)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:247)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:238)
[INFO] GCLOUD: 2018-06-12 13:56:25.882:WARN:oejw.WebAppContext:main: Failed startup of context c.g.a.t.d.j.DevAppEngineWebAppContext@445b295b{
[INFO] GCLOUD: java.lang.RuntimeException: javax.servlet.ServletException: Not running on Jetty, JSR-356 support unavailable
[INFO] GCLOUD: at org.eclipse.jetty.annotations.ServletContainerInitializersStarter.doStart(ServletContainerInitializersStarter.java:68)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:330)
[INFO] GCLOUD: at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1406)
[INFO] GCLOUD: at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1368)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)
[INFO] GCLOUD: at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
[INFO] GCLOUD: at org.eclipse.jetty.server.Server.start(Server.java:422)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
[INFO] GCLOUD: at org.eclipse.jetty.server.Server.doStart(Server.java:389)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD: at com.google.appengine.tools.development.jetty9.JettyContainerService.startContainer(JettyContainerService.java:347)
[INFO] GCLOUD: at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:284)
[INFO] GCLOUD: at com.google.appengine.tools.development.AutomaticInstanceHolder.startUp(AutomaticInstanceHolder.java:26)
[INFO] GCLOUD: at com.google.appengine.tools.development.AbstractModule.startup(AbstractModule.java:87)
[INFO] GCLOUD: at com.google.appengine.tools.development.Modules.startup(Modules.java:105)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl.doStart(DevAppServerImpl.java:282)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl.access$000(DevAppServerImpl.java:47)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:223)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:221)
[INFO] GCLOUD: at java.security.AccessController.doPrivileged(Native Method)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:221)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:395)
[INFO] GCLOUD: at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:45)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:247)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:238)
[INFO] GCLOUD: Caused by:
[INFO] GCLOUD: javax.servlet.ServletException: Not running on Jetty, JSR-356 support unavailable
[INFO] GCLOUD: at org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer.onStartup(WebSocketServerContainerInitializer.java:200)
[INFO] GCLOUD: at org.eclipse.jetty.plus.annotation.ContainerInitializer.callStartup(ContainerInitializer.java:140)
[INFO] GCLOUD: at org.eclipse.jetty.annotations.ServletContainerInitializersStarter.doStart(ServletContainerInitializersStarter.java:63)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:330)
[INFO] GCLOUD: at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1406)
[INFO] GCLOUD: at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1368)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)
[INFO] GCLOUD: at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
[INFO] GCLOUD: at org.eclipse.jetty.server.Server.start(Server.java:422)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
[INFO] GCLOUD: at org.eclipse.jetty.server.Server.doStart(Server.java:389)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD: at com.google.appengine.tools.development.jetty9.JettyContainerService.startContainer(JettyContainerService.java:347)
[INFO] GCLOUD: at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:284)
[INFO] GCLOUD: at com.google.appengine.tools.development.AutomaticInstanceHolder.startUp(AutomaticInstanceHolder.java:26)
[INFO] GCLOUD: at com.google.appengine.tools.development.AbstractModule.startup(AbstractModule.java:87)
[INFO] GCLOUD: at com.google.appengine.tools.development.Modules.startup(Modules.java:105)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl.doStart(DevAppServerImpl.java:282)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl.access$000(DevAppServerImpl.java:47)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:223)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:221)
[INFO] GCLOUD: at java.security.AccessController.doPrivileged(Native Method)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:221)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:395)
[INFO] GCLOUD: at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:45)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:247)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:238)
[INFO] GCLOUD: 2018-06-12 13:56:25.896:INFO:oejs.AbstractConnector:main: Started NetworkTrafficSelectChannelConnector@6ab778a{HTTP/1.1,[http/1.1]}{localhost:8080}
[INFO] GCLOUD: 2018-06-12 13:56:25.918:INFO:oejs.Server:main: Started @3918ms
[INFO] GCLOUD: Jun 12, 2018 10:56:25 AM com.google.appengine.tools.development.AbstractModule startup
[INFO] GCLOUD: INFO: Module instance default is running at http://localhost:8080/
[INFO] GCLOUD: Jun 12, 2018 10:56:25 AM com.google.appengine.tools.development.AbstractModule startup
[INFO] GCLOUD: INFO: The admin console is running at http://localhost:8080/_ah/admin
[INFO] GCLOUD: Jun 12, 2018 1:56:25 PM com.google.appengine.tools.development.DevAppServerImpl doStart
[INFO] GCLOUD: INFO: Dev App Server is now running
Could you help me please?
alessandroros commented
I have the same issue. Any suggestion or advice? Does anybody know if AppEngine Standard is compatible with Spring Boot 2?
averikitsch commented
Currently, WebSockets are available on Google App Engine.