Closed nelsongallardo closed 8 years ago
grails version? plugin version? sample app would be really helpful.
maybe one of these issues? http://stackoverflow.com/questions/21523693/spring-websocket-example-error-are-you-running-in-a-servlet-container-that-s
Latest plugin version, grails 2.5.0, it was working fine on an Ubuntu machine, but having this error on a mac, also the same error on a test server running ubuntu
These are the errors I get on the firefox console:
as deployed app or running in dev mode? custom webSocketConfig
?
As deployed app and also running as dev mode (edited my previous answer with a detail of js errors), haven't touched webSocketConfig
so plugin version 1.3.1, right? what are you deploying to? tomcat? version? websocket api present?
yes, version 1.3.1, deploying to tomcat 7, but even when I do grails run-app in dev mode on my machine I get the same errors, not sure about websocket api?
did you follow the readme reg. tomcat-7 (https://github.com/zyro23/grails-spring-websocket/tree/1.3.x)
If you are using the tomcat plugin (7.0.52+), you should add the following BuildConfig.groovy settings to ensure proper functionality:
grails.tomcat.nio = true grails.tomcat.scan.enabled = true
yes, have that, and my tomcat version is build ":tomcat:7.0.55.2"
referenced a blank sample app using the config you describe with the readme "quickstart" example. works for me.. hth.
i hope the sample app works for you too? feel free to re-open and preferably attach/reference a sample app that reproduces the error if you still think it is an issue with the plugin
Getting this exception when opening my page, it's weird since websockets still works, but having this exception in the logs with every request and javascript errors in the browser console is quite annoying
| Error 2016-07-03 19:30:44,354 [http-bio-8080-exec-11] ERROR errors.GrailsExceptionResolver - IllegalArgumentException occurred when processing request: [GET] /stomp/566/rqpjdvi4/websocket No 'javax.websocket.server.ServerContainer' ServletContext attribute. Are you running in a Servlet container that supports JSR-356?. Stacktrace follows: Message: Uncaught failure in SockJS request, uri=http://localhost:8080/stomp/566/rqpjdvi4/websocket; nested exception is org.springframework.web.socket.sockjs.SockJsTransportFailureException: WebSocket handshake failure; nested exception is java.lang.IllegalArgumentException: No 'javax.websocket.server.ServerContainer' ServletContext attribute. Are you running in a Servlet container that supports JSR-356?