-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
3.6.0.Final, 4.0.0.Beta4
-
None
While working on https://github.com/resteasy/Resteasy/pull/1572 I noticed that the thread running `SseEventSourceImpl` has no thread context set-up for `ResteasyProviderFactory` and will use a singleton instead, which means it has no `Dispatcher` and all other required objects:
java.lang.RuntimeException: java.lang.NullPointerException at org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuiltin.java:49) at org.jboss.resteasy.spi.ResteasyProviderFactory.getInstance(ResteasyProviderFactory.java:741) at org.jboss.resteasy.plugins.providers.sse.InboundSseEventImpl.readData(InboundSseEventImpl.java:194) at org.jboss.resteasy.plugins.providers.sse.InboundSseEventImpl.readData(InboundSseEventImpl.java:182) at org.jboss.resteasy.plugins.providers.sse.InboundSseEventImpl.readData(InboundSseEventImpl.java:172) at org.jboss.resteasy.plugins.providers.sse.InboundSseEventImpl.toString(InboundSseEventImpl.java:236) at java.lang.String.valueOf(String.java:2994) at java.lang.StringBuilder.append(StringBuilder.java:131) at org.jboss.resteasy.plugins.providers.sse.client.SseEventSourceImpl$EventHandler.run(SseEventSourceImpl.java:398) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NullPointerException at org.resteasy.reactivecontext.ContextFeature.configure(ContextFeature.java:25) at org.jboss.resteasy.spi.ResteasyProviderFactory.processProviderContracts(ResteasyProviderFactory.java:2015) at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1711) at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1661) at org.jboss.resteasy.plugins.providers.RegisterBuiltin.registerProviders(RegisterBuiltin.java:133) at org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuiltin.java:45) ... 15 more
- is related to
-
RESTEASY-1916 InboundSseEvent.readData doesn't appear to use registered providers
- Resolved