title: JHipster Atmosphere websocket does not connect
body: <p>With a newly scaffolded app generated from "yo jhipster" and started with "mvn spring-boot:run" and "grunt server" I am able to load the app and do operations like login, view metrics, see sessions, settings, logs, and audits. However, whenever I view the "User Tracker" page I don't see anything?</p>
  
  <p>I believe this section is supposed to demonstrate Atmosphere websocket / AngularJS integration? Looking at the browser console logs, I see the following:</p>
  
  <pre><code>Websocket failed. Downgrading to Comet and resending atmosphere.js:2866
  GET http://0.0.0.0:9000/websocket/activity?X-Atmosphere-tracking-id=0&amp;X-Atmosph…true&amp;X-Cache-Date=0application%2Fjson&amp;X-atmo-protocol=true&amp;_=1393276976964 404 (Not Found)   
  </code></pre>
  
  <p>It appears that a websocket connection is attempted but eventually times out and the fallback long polling doesn't work? I'm using the latest Chrome (also tried on latest versions of Firefox and Safari as well).</p>
  
  <p>Am I missing something simple?</p>
  
  <p><strong>-- Update 1 --</strong> </p>
  
  <p>Deploying it as a WAR to Tomcat 7.0.50 shows data back from Atmosphere in the User Tracker page but it continuously loops trying to get a WebSocket connection (HTTP status code 101: switching protocols) so the user data appears and disappears periodically. I saw an error in Chrome like this:</p>
  
  <pre><code>No suspended connection available. Make sure atmosphere.subscribe has been called and request.onOpen invoked before invoking this method 
  </code></pre>
  
  <p>The Tomcat logs show the following:</p>
  
  <pre><code>[WARN] org.atmosphere.cpr.DefaultAnnotationProcessor - Unable to detect annotations. Application may fail to deploy.
  </code></pre>
  
  <p><strong>-- Update 2 --</strong> </p>
  
  <p>Deploying it as a WAR to Jetty 8.1.14.v20131031 (Jetty 9.1.1.v20140108 throws errors) and testing it with Chrome 32.0.1700.107 appears to work for the fallback transport of long-polling. The initial connection to WebSockets, however, fails because Atmosphere for some reason thinks the servlet container is Tomcat? In the server logs, it throws the following issue:</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>Thanks again for all your help -- definitely making progress :)</p>
  
  <p><strong>-- Update 3 --</strong> </p>
  
  <p>To summarize everything:</p>
  
  <ol>
  <li>Currently "mvn spring-boot:run" and "grunt server" don't work together for Websockets or long-polling</li>
  <li><p>If you deploy the JHipster WAR (mvn package) to Jetty 8.1.14.v20131031 then it works but you need to remove the following dependency from your JHipster pom.xml or else Atmosphere will not provide WebSocket support:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
  &lt;/dependency&gt;
  </code></pre></li>
  <li>Argh. False alarm -- I had it running using streaming, not websockets, so WebSockets still has the error from update2</li>
  </ol>