2

I have implemented a method to receive live notification from OpenHab in my application through SSE events. Previously I used glassfish server to deploy my application. But I needed to switch to Payara and now the sse connection won't be established. I am getting following error:

Argument fish.payara.requesttracing.jaxrs.client.decorators.JaxrsWebTargetDecorator@45>314ad8 is not a valid JerseyWebTarget instance. SseEventSource does not support other WebTarget implementations.

When switching back to glassfish server the code runs perfectly. And I can establish a sse connection.

WebTarget wt =  requestHelper.buildTarget(
                "/events",
                new String[0],
                new Object[0],
                new String[]{"topics"},
                new String[]{String.format("smarthome/%s/%s/%s", "items", itemName, "statechanged")});

        eventSource = SseEventSource
                .target(wt)
                .build();

This is my Webtarget building. In the .build It checks if webTarget is instance of JerseyWebTarget, but in my case it is JaxrsWebTargetDecorator and I can't explain why. Does anyone know where the issue is?

Chinaedu Onwukwe
  • 437
  • 1
  • 7
  • 20
  • I note a strong link with this question: https://stackoverflow.com/questions/53237730/jax-rs-sse-client-with-singleton-in-glassfish-payara – Marcos Zolnowski Mar 29 '19 at 04:11

0 Answers0