dropwizard-websocket-jsr356-bundle icon indicating copy to clipboard operation
dropwizard-websocket-jsr356-bundle copied to clipboard

Websocket URL gives 404

Open ravi-prajapati-1995 opened this issue 1 year ago • 5 comments

Hi All, I am using this bundle in my application, while starting of application I am getting message of registration of websocket as you have mentioned in docs. But when application try to hit URL it return 404, My frontend is not able to make connection with websocket, Same I have checked with Postman too. Please help me to find where I am doing wrong. I am using dropwizard latest version (4.0.6) and bundle version (4.0.0)

ravi-prajapati-1995 avatar Mar 19 '24 07:03 ravi-prajapati-1995

Could you please share some more information such as:

  • an example project (preferred, makes it a lot easier)
  • the url you are using to connect to the websocket
  • etc.

I'll gladly have a look 😊

TomCools avatar Mar 19 '24 08:03 TomCools

Hi @TomCools we were using @PathParams in web socket URL and that gave problem, If we gave foo/{name}/bar/{id}/websocket URL to websocket endpoint that cause problem and we got 404 in that case but if we did /foo/bar/websocket/{name}/{id} this runs fine. Issue was with using @PathParms in URL of endpoint.

ravi-prajapati-1995 avatar Apr 02 '24 11:04 ravi-prajapati-1995

Similar issue and the above suggestion fixed it.

hesamgha avatar Jul 03 '24 17:07 hesamgha

https://github.com/jetty/jetty.project/pull/11753 appears to be the root cause, upgrading jetty to 12.0.10 should fix the issue

tresni avatar Sep 12 '24 05:09 tresni

Thanks @tresni, I had a look and there seems to be an issue in Dropwizard itself, not this plugin.

This issue exists in Jetty 11, which is the baseline for Dropwizard 4. They do not seem to be backporting the solution for this... meaning the only way this can be solved is by upgrading to Dropwizard 5 (unless you manually upgrade to Jetty 12... but changing such a baseline might break something else in Dropwizard 4).

Since there is a workaround mentioned above, i'll not be chasing this. If they decide to backport the solution to Jetty 11, i'll happily upgrade this plugin.

TomCools avatar Sep 12 '24 06:09 TomCools