tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Using websocket with Tomcat 7.0.37
Date Mon, 08 Apr 2013 09:11:27 GMT
Hi all !

I would like to use web socket, and I started looking to do so with tomcat API. 
I'm currently using Tomcat 7.0.37 on Windows Seven, integrated in Eclipse Juno.

I tried to follow the example code from tomcat documentation, and read the 
associated JavaDoc for package org.apache.catalina.websocket. The example is 
supposed to be a chat application. Here is the link for the documentation :

I'm also using maven for the project, so I added this to my pom.xml :


First thing that's weird, I get an error message in Eclipse for this line :

private class MyMessageInbound extends MessageInbound

The error message is "The hierarchy of the type MyMessageInbound is inconsistent", 
but I'm still able to compile and launch the webapp from Eclipse.

I also added the configuration in the web.xml as follow:



So, I'm able to launch the webapp, but when I go to the chat page, I get an error 
on the chat board saying "Info: WebSocket closed.". Tomcat log give me the 
following message:

SEVERE: Servlet.service() for servlet [wsChat] in context with path 
[/websocket-tuto] threw exception [L''exécution de la servlet a lancé une exception] 
with root cause
at org.apache.catalina.websocket.WebSocketServlet.doGet(
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.valves.AccessLogValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.AbstractHttp11Processor.process(
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$ Source)
at Source)

Anyone see what could be my problem, or what I'm doing wrong ?

Thanks !

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message