With the new application created using "yo jhipster" and started with "mvn spring-boot: run" and "grunt server", I can download the application and perform operations such as login, view metrics, view sessions, configure settings, magazines and audits. However, when I look at the Custom Tracker page, I don’t see anything?
I believe this section should demonstrate websocket / AngularJS integration in the atmosphere? Looking at the browser console logs, I see the following:
Websocket failed. Downgrading to Comet and resending atmosphere.js:2866
GET http://0.0.0.0:9000/websocket/activity?X-Atmosphere-tracking-id=0&X-Atmosph…true&X-Cache-Date=0application%2Fjson&X-atmo-protocol=true&_=1393276976964 404 (Not Found)
It looks like the connection to the web coker is trying, but in the end the time runs out and the long polling does not work? I use the latest Chrome (also checked the latest versions of Firefox and Safari).
Did I miss something simple?
- Update 1 -
Deploying it as a WAR for Tomcat 7.0.50 displays data from Atmosphere on the User Tracker page, but it continuously loops trying to get a WebSocket connection (HTTP status code 101: switching protocols), so user data appears and disappears periodically, I saw an error in Chrome :
No suspended connection available. Make sure atmosphere.subscribe has been called and request.onOpen invoked before invoking this method
Tomcat logs show the following:
[WARN] org.atmosphere.cpr.DefaultAnnotationProcessor - Unable to detect annotations. Application may fail to deploy.
- Update 2 -
Deploying it as a WAR for Jetty 8.1.14.v20131031 (Jetty 9.1.1.v20140108 causes errors) and testing it with Chrome 32.0.1700.107 seems to work for back-wrap a long poll. The original connection to WebSockets, however, fails because Atmosphere somehow thinks that the Tomcat servlet container? In server logs, this causes the following problem:
java.lang.ClassCastException: org.eclipse.jetty.server.Request cannot be cast to org.apache.catalina.connector.RequestFacade
at org.atmosphere.container.TomcatWebSocketUtil.doService(TomcatWebSocketUtil.java:141)
at org.atmosphere.container.Tomcat7Servlet30SupportWithWebSocket.service(Tomcat7Servlet30SupportWithWebSocket.java:62)
Thanks again for your help - certainly progress :)
- Update 3 -
To summarize everything:
- "mvn spring -boot: run" "grunt server" - .
JHipster WAR (mvn-) Jetty 8.1.14.v20131031, , JHipster pom.xml, Atmosphere WebSocket:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
- Argh. False alarm - , -, WebSockets - update2