Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-12798

HealthCheck HTTP endpoint does not support CDI @RequestScoped scope

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 18.0.0.Final
    • MP Health
    • None
    • Hide

      Use MP-Health in RequestScoped Beans, e.g. in a rest resource.

      Show
      Use MP-Health in RequestScoped Beans, e.g. in a rest resource.
    • Workaround Exists
    • Hide

      Use Another Scope -> In our case we need to extract all checks from the rest resources into a seperate cdi bean.

      Show
      Use Another Scope -> In our case we need to extract all checks from the rest resources into a seperate cdi bean.

    Description

      2019-11-15 15:26:11,717 ERROR [org.wildfly.extension.microprofile.health.smallrye] (management I/O-1) Error processing Health Checks: org.jboss.weld.contexts.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.enterprise.context.RequestScoped
      at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:647)
      at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:89)
      at org.jboss.weld.bean.ContextualInstanceStrategy$CachingContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:164)
      at org.jboss.weld.bean.ContextualInstance.getIfExists(ContextualInstance.java:63)
      at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:87)
      at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:131)
      at at.arz.bpe.boundary.PingCheck$Proxy$_$$_WeldClientProxy.call(Unknown Source)
      at org.wildfly.extension.microprofile.health.HealthReporter.jsonObject(HealthReporter.java:120)
      at org.wildfly.extension.microprofile.health.HealthReporter.fillCheck(HealthReporter.java:107)
      at org.wildfly.extension.microprofile.health.HealthReporter.processChecks(HealthReporter.java:96)
      at org.wildfly.extension.microprofile.health.HealthReporter.getHealth(HealthReporter.java:79)
      at org.wildfly.extension.microprofile.health.HealthReporter.getHealth(HealthReporter.java:60)
      at org.wildfly.extension.microprofile.health.HealthContextService$HealthCheckHandler.handleRequest(HealthContextService.java:100)
      at org.jboss.as.domain.http.server.security.RealmReadinessHandler.handleRequest(RealmReadinessHandler.java:51)
      at org.jboss.as.domain.http.server.security.ServerErrorReadinessHandler.handleRequest(ServerErrorReadinessHandler.java:35)
      at io.undertow.server.handlers.PathHandler.handleRequest(PathHandler.java:91)
      at io.undertow.server.handlers.ChannelUpgradeHandler.handleRequest(ChannelUpgradeHandler.java:211)
      at io.undertow.server.handlers.cache.CacheHandler.handleRequest(CacheHandler.java:92)
      at io.undertow.server.handlers.error.SimpleErrorPageHandler.handleRequest(SimpleErrorPageHandler.java:78)
      at io.undertow.server.handlers.CanonicalPathHandler.handleRequest(CanonicalPathHandler.java:49)
      at org.jboss.as.domain.http.server.ManagementHttpRequestHandler.handleRequest(ManagementHttpRequestHandler.java:57)
      at org.jboss.as.domain.http.server.cors.CorsHttpHandler.handleRequest(CorsHttpHandler.java:75)
      at org.jboss.as.domain.http.server.ManagementHttpServer$UpgradeFixHandler.handleRequest(ManagementHttpServer.java:666)
      at io.undertow.server.Connectors.executeRootHandler(Connectors.java:376)
      at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:255)
      at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136)
      at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:162)
      at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:100)
      at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:57)
      at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
      at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:291)
      at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:286)
      at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
      at org.xnio.nio.QueuedNioTcpServer$1.run(QueuedNioTcpServer.java:132)
      at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:612)
      at org.xnio.nio.WorkerThread.run(WorkerThread.java:479)

      MP-Health Spec doesnt enforce a scope and it worked with wildfly 17.0.0.1-Final.
      https://github.com/eclipse/microprofile-health/issues/109

      Attachments

        Issue Links

          Activity

            People

              mstefank Martin Stefanko
              flow80 Florian Sailer (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: