users@glassfish.java.net

Re: Websockets with Glassfish 3.1.1 (Error: Missing required headers for WebSocket negotiation)

From: Oleksiy Stashok <oleksiy.stashok_at_oracle.com>
Date: Wed, 08 Feb 2012 10:52:18 +0100

Hi,

can you pls. try the latest promoted build of GF 3.1.2?

http://dlc.sun.com.edgesuite.net/glassfish/3.1.2/promoted/glassfish-3.1.2-b20.zip

Thanks.

WBR,
Alexey.

On 02/08/2012 08:02 AM, forums_at_java.net wrote:
> Hello,
>
> I am trying to build sample websocket application with glassfish 3.1.1
> using
> this application with the below website.
>
> http://java.dzone.com/articles/creating-websocket-chat [1]
>
> But i am getting the following error in glassfish logs
>
> com.sun.grizzly.websockets.HandshakeException: Missing required
> headers for
> WebSocket negotiation
>
> at
> com.sun.grizzly.websockets.ServerHandShake.<init>(ServerHandShake.java:73)
>
> at
> com.sun.grizzly.websockets.ServerNetworkHandler.handshake(ServerNetworkHandler.java:95)
>
>
> at
> com.sun.grizzly.websockets.WebSocketEngine.upgrade(WebSocketEngine.java:136)
>
>
> at
> com.sun.grizzly.websockets.WebSocketAsyncFilter.doFilter(WebSocketAsyncFilter.java:52)
>
>
> at
> com.sun.grizzly.arp.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:171)
>
>
> at
> com.sun.grizzly.arp.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:143)
>
>
> at
> com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:94)
>
> at com.sun.grizzly.http.TaskBase.run(TaskBase.java:193)
>
> at com.sun.grizzly.http.TaskBase.execute(TaskBase.java:175)
>
> at
> com.sun.grizzly.arp.DefaultAsyncHandler.handle(DefaultAsyncHandler.java:145)
>
>
> at
> com.sun.grizzly.arp.AsyncProtocolFilter.execute(AsyncProtocolFilter.java:204)
>
>
> at
> com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
>
>
> at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
>
>
> at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
>
> at
> com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
>
> at
> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
>
>
> at
> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
>
>
> at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
>
> at
> com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
>
>
> at
> com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
>
>
> at java.lang.Thread.run(Thread.java:662)
>
> OS: Windows 7
>
> Browser: Chrome 18 and firefox 9
>
> I am also attaching one example with this post for which i am getting
> this
> error.
>
> Please let me know if someone else is also facing the same problem or if
> someone knows the solution.
>
>
>
> Thanks a Lot.
>
>
> [1] http://java.dzone.com/articles/creating-websocket-chat
>
> --
>
> [Message sent by forum member 'gauravkarwayun']
>
> View Post: http://forums.java.net/node/883358
>
>
>