Closed glassfishrobot closed 10 years ago
Reported by lifedj
michalgajdos said: This is not a bug. You're configuring wrong ResourceConfig. You should configure the one that is used during deployment time and not the one that you create in a resource (please consult documentation to osgi connector how to do that).
Was assigned to michalgajdos
This issue was imported from java.net JIRA JERSEY-2243
Marked as works as designed on Monday, November 25th 2013, 6:44:30 am
I'm trying to implement a simple Java Sse server using Jersey on OSGi. I've followed the example described in the Jersey official guide:
https://jersey.java.net/documentation/latest/sse.html#d0e8183
but when I try to call the server, it says: "MessageBodyWriter not found for media type=text/event-stream, type=class org.glassfish.jersey.media.sse.OutboundEvent, genericType=class org.glassfish.jersey.media.sse.OutboundEvent."
I've found some other similar issues in which all say to register SSE feature, but in OSGi there is not a main in which I can register it, and, moreover, the SseFeature doesn't provide any service! How can i register the sse feature? Or: what can I do to fix the problem?
PS. To work in OSGi, Jersey need the connector: https://github.com/hstaudacher/osgi-jax-rs-connector
Here I will paste the code you should need to help me!
MANIFEST.MF
component.xml
Server.java
Environment
Windows 7, Eclipse Kepler
Affected Versions
[2.0]