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

org.jboss.msc.service.StartException: Unable to find ServletContextHandler for provided ServletContext

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 25.0.1.Final
    • Web (Undertow)
    • None

    Description

      I upgraded to wildfly 25 and now, when deploying "myapp.war", I get the following error:

      10:34:44,118 INFO [org.jboss.modules] (main) JBoss Modules version 1.12.0.Final
      10:34:45,542 INFO [org.jboss.msc] (main) JBoss MSC version 1.4.13.Final
      10:34:45,581 INFO [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final
      10:34:45,900 INFO [org.jboss.as] (MSC service thread 1-1) WFLYSRV0049: WildFly Full 25.0.1.Final (WildFly Core 17.0.3.Final) starting
      10:34:47,346 INFO [org.wildfly.security] (ServerService Thread Pool -- 20) ELY00001: WildFly Elytron version 1.17.1.Final
      ..
      ..
      10:34:51,808 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0027: Starting deployment of "myapp.war" (runtime-name: "myapp.war")
      10:34:51,902 INFO [org.jboss.ws.common.management] (MSC service thread 1-1) JBWS022052: Starting JBossWS 5.4.4.Final (Apache CXF 3.4.4) 
      10:35:09,753 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0059: Class Path entry jaxb-runtime-2.3.1.jar in /Users/server/wildfly-25.0.1.Final/standalone/deployments/myapp.war/WEB-INF/lib/jaxb-impl-2.3.1.jar does not point to a valid jar for a Class-Path reference.
      10:35:09,753 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0059: Class Path entry txw2-2.3.1.jar in /Users/server/wildfly-25.0.1.Final/standalone/deployments/myapp.war/WEB-INF/lib/jaxb-impl-2.3.1.jar does not point to a valid jar for a Class-Path reference.
      10:35:09,754 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0059: Class Path entry istack-commons-runtime-3.0.7.jar in /Users/server/wildfly-25.0.1.Final/standalone/deployments/myapp.war/WEB-INF/lib/jaxb-impl-2.3.1.jar does not point to a valid jar for a Class-Path reference.
      10:35:09,756 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0059: Class Path entry stax-ex-1.8.jar in /Users/server/wildfly-25.0.1.Final/standalone/deployments/myapp.war/WEB-INF/lib/jaxb-impl-2.3.1.jar does not point to a valid jar for a Class-Path reference.
      10:35:09,756 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0059: Class Path entry FastInfoset-1.2.15.jar in /Users/server/wildfly-25.0.1.Final/standalone/deployments/myapp.war/WEB-INF/lib/jaxb-impl-2.3.1.jar does not point to a valid jar for a Class-Path reference.
      10:35:15,093 INFO [org.jboss.weld.deployer] (MSC service thread 1-6) WFLYWELD0003: Processing weld deployment myapp.war
      10:35:15,522 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-6) HV000001: Hibernate Validator 6.0.22.Final
      WARNING: An illegal reflective access operation has occurred
      WARNING: Illegal reflective access by org.wildfly.clustering.marshalling.protostream.util.EnumMapMarshaller$1 (jar:file:/Users/server/wildfly-25.0.1.Final/modules/system/layers/base/org/wildfly/clustering/marshalling/protostream/main/wildfly-clustering-marshalling-protostream-25.0.1.Final.jar!/) to field java.util.EnumMap.keyType
      WARNING: Please consider reporting this to the maintainers of org.wildfly.clustering.marshalling.protostream.util.EnumMapMarshaller$1
      WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
      WARNING: All illegal access operations will be denied in a future release
      10:35:17,024 INFO [org.infinispan.CONTAINER] (ServerService Thread Pool -- 80) ISPN000128: Infinispan version: Infinispan 'Taedonggang' 12.1.7.Final
      10:35:17,224 INFO [org.infinispan.CONFIG] (MSC service thread 1-7) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
      10:35:17,231 INFO [org.infinispan.CONFIG] (MSC service thread 1-7) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
      10:35:17,328 INFO [io.jaegertracing.internal.JaegerTracer] (MSC service thread 1-6) No shutdown hook registered: Please call close() manually on application shutdown.
      ..
      ..
      10:35:17,618 INFO [org.infinispan.CONTAINER] (ServerService Thread Pool -- 80) ISPN000025: wakeUpInterval is <= 0, not starting expired purge thread
      10:35:17,686 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 80) WFLYCLINF0002: Started http-remoting-connector cache from ejb container
      10:35:18,150 INFO [org.jboss.weld.Version] (MSC service thread 1-8) WELD-000900: 3.1.8 (Final)
      10:35:18,954 WARN [org.jboss.weld.Bootstrap] (MSC service thread 1-6) WELD-000146: BeforeBeanDiscovery.addAnnotatedType(AnnotatedType<?>) used for class com.sun.faces.flow.FlowDiscoveryCDIHelper is deprecated from CDI 1.1!
      10:35:23,318 INFO [org.eclipse.jetty.util.log] (ServerService Thread Pool -- 80) Logging initialized @40887ms to org.eclipse.jetty.util.log.Slf4jLog
      10:35:23,328 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 80) MSC000001: Failed to start service jboss.deployment.unit."myapp.war".undertow-deployment: org.jboss.msc.service.StartException in service jboss.deployment.unit."myapp.war".undertow-deployment: java.lang.RuntimeException: java.lang.IllegalStateException: Unable to find ServletContextHandler for provided ServletContext
       at org.wildfly.extension.undertow@25.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:90)
       at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
       at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
       at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
       at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
       at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
       at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
       at java.base/java.lang.Thread.run(Thread.java:835)
       at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
      Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Unable to find ServletContextHandler for provided ServletContext
       at io.undertow.servlet@2.2.12.Final//io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:257)
       at org.wildfly.extension.undertow@25.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:105)
       at org.wildfly.extension.undertow@25.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:87)
       ... 8 more
      Caused by: java.lang.IllegalStateException: Unable to find ServletContextHandler for provided ServletContext
       at deployment.myapp.war//org.eclipse.jetty.websocket.server.NativeWebSocketServletContainerInitializer.onStartup(NativeWebSocketServletContainerInitializer.java:120)
       at io.undertow.servlet@2.2.12.Final//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:204)
       at io.undertow.servlet@2.2.12.Final//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:187)
       at io.undertow.servlet@2.2.12.Final//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
       at io.undertow.servlet@2.2.12.Final//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
       at org.wildfly.extension.undertow@25.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1544)
       at org.wildfly.extension.undertow@25.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1544)
       at org.wildfly.extension.undertow@25.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1544)
       at org.wildfly.extension.undertow@25.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1544)
       at io.undertow.servlet@2.2.12.Final//io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:255)
       ... 10 more
      10:35:23,337 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "myapp.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"myapp.war\".undertow-deployment" => "java.lang.RuntimeException: java.lang.IllegalStateException: Unable to find ServletContextHandler for provided ServletContext
       Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Unable to find ServletContextHandler for provided ServletContext
       Caused by: java.lang.IllegalStateException: Unable to find ServletContextHandler for provided ServletContext"}}
      10:35:23,442 INFO [org.jboss.as.server] (ServerService Thread Pool -- 45) WFLYSRV0010: Deployed "myapp.war" (runtime-name : "myapp.war")
      10:35:23,518 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
      WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."myapp.war".undertow-deployment: java.lang.RuntimeException: java.lang.IllegalStateException: Unable to find ServletContextHandler for provided ServletContext
      WFLYCTL0448: 1 additional services are down due to their dependencies being missing or failed
      10:35:23,599 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
      10:35:23,609 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 25.0.1.Final (WildFly Core 17.0.3.Final) started (with errors) in 40901ms - Started 542 of 745 services (3 services failed or missing dependencies, 341 services are lazy, passive or on-demand)
      10:35:23,638 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
      10:35:23,639 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
      

      Is this a bug from the server (undertow)? The error message "Unable to find ServletContextHandler for provided ServletContext" is very vague to me, because it does not point which specific ServletContext it means.

      I use JSF and JAX-RS endpoints in my application, maybe there is some issue with those servlets needing to be started by undertow/wildfly. However, in previous wildfly servers the same application does not throw the above error.

       

      Attachments

        Activity

          People

            flaviarnn Flavia Rainone
            nimo22 nimo stephan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: