users@grizzly.java.net

Re: Atmosphere + Grizzly: No AtmosphereHandler maps request for /chat Status 500 Message Server Error

From: Oleksiy Stashok <oleksiy.stashok_at_oracle.com>
Date: Tue, 29 Apr 2014 08:50:49 -0700

(2nd attempt, 1st one was rejected by a mail server)

Hi Miguel,

pls. apply the atmosphere patch (attached) and try Grizzly 2.3.12-SNAPSHOT.
IMO there's no reason to create 2 HttpServers, one should be enough
(pls. see attached), if you see any issues with that - pls. let me know.

Thanks.

WBR,
Alexey.

On 28.04.14 02:37, miguelnaterasolmedo_at_gmail.com wrote:
> Hi Alexey,
>
> Of course, it will be a pleasure to share my test project with you.
> I'm attaching my exported eclipse project, the chat service is
> published at http://localhost:8181/chat
> <http://www.google.com/url?q=http%3A%2F%2Flocalhost%3A8181%2Fchat%2Fa%2Fb%2Fc&sa=D&sntz=1&usg=AFQjCNElYVMLNJmdi9DSQmVI2ia4pWsZdA>
>
> Regards from Spain.
>
> Miguel
>
> El sábado, 26 de abril de 2014 09:36:57 UTC+2, Oleksiy Stashok escribió:
>
> Hi Miguel,
>
> I think I found the possible issue, can I ask you to share the
> entire project, so I can reproduce the problem and make sure it's
> fixed.
>
> Thank you.
>
> WBR,
> Alexey.
>
> On 24.04.14 05:04, miguelnat..._at_gmail.com <javascript:> wrote:
>> Hi Alexey,
>>
>> I'm debugging this issue, these are my tests & results:
>>
>> -. When I call 'http://localhost:8181/chat/a/b/c
>> <http://www.google.com/url?q=http%3A%2F%2Flocalhost%3A8181%2Fchat%2Fa%2Fb%2Fc&sa=D&sntz=1&usg=AFQjCNElYVMLNJmdi9DSQmVI2ia4pWsZdA>'
>> internally this request is built: 'AtmosphereRequest{
>> contextPath= servletPath=/chat pathInfo=/a/b/c
>> requestURI=/chat/a/b/c destroyable=true}' Well, Http Get requests
>> seem to work fine.
>>
>> -. When I call 'new WebSocket('ws://localhost:8181/chat/a/b/c')'
>> internally this request is built 'AtmosphereRequest{ contextPath=
>> servletPath=null pathInfo=null requestURI=/chat/a/b/c
>> destroyable=true}' I think the problem (servletPath & pathInfo
>> are null) only happens when I use websockets
>>
>> I'm debbuging the method
>> org.glassfish.grizzly.websockets.WebSocketEngine.upgrade(FilterChainContext
>> ctx, HttpContent requestContent, Mapper mapper) and the param
>> requestContent receives this value:
>>
>> HttpRequestPacket (
>> method=GET
>> url=/chat/a/b/c
>> query=null
>> protocol=HTTP/1.1
>> content-length=-1
>> headers=[
>> upgrade=websocket
>> connection=Upgrade
>> host=localhost:8181
>> origin=http://localhost:8080
>> pragma=no-cache
>> cache-control=no-cache
>> sec-websocket-key=3pRm4vKnwqvRO8G0/WUNBw==
>> sec-websocket-version=13
>> sec-websocket-extensions=permessage-deflate;
>> client_max_window_bits, x-webkit-deflate-frame
>> user-agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36
>> (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36]
>> )
>>
>> but at the end of my debugging session the method
>> org.atmosphere.util.DefaultEndpointMapper.computePath(AtmosphereRequest
>> req) receives the param req with this value: AtmosphereRequest{
>> contextPath= servletPath=null pathInfo=null
>> requestURI=/chat/a/b/c destroyable=true}
>>
>>
>> Well I hope these tests have some value for you, anyway if you
>> need more tests feel free to ask.
>>
>> Have a nice day.
>>
>> Miguel
>