-
Bug
-
Resolution: Done
-
Major
-
16.0.0.Final
-
None
When a .war that has servlets declared using @WebServlet fails to deploy, the console cannot list any deployments.
Here is the exception that is logged by WildFly:
09:52:08.629 [org.jboss.as.controller.management-operation] WFLYCTL0013: Operation ("read-attribute") failed - address: ([ ("deployment" => "test-war.war"), ("subsystem" => "undertow"), ("servlet" => "com.test.TestServlet") ]): java.lang.IllegalStateException at org.jboss.msc.value.InjectedValue.getValue(InjectedValue.java:50) at org.wildfly.extension.undertow.DeploymentServletDefinition$AbstractMetricsHandler$1.execute(DeploymentServletDefinition.java:175) at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:999) at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:743) at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:467) at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1412) at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:423) at org.jboss.as.controller.ModelControllerImpl.lambda$execute$1(ModelControllerImpl.java:243) at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:289) at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:255) at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:243) at org.jboss.as.domain.http.server.DomainApiHandler.handleRequest(DomainApiHandler.java:212) at io.undertow.server.handlers.encoding.EncodingHandler.handleRequest(EncodingHandler.java:72) at org.jboss.as.domain.http.server.DomainApiCheckHandler.handleRequest(DomainApiCheckHandler.java:93) at org.jboss.as.domain.http.server.security.ElytronIdentityHandler.lambda$handleRequest$0(ElytronIdentityHandler.java:62) at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:313) at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:270) at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:254) at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:225) at org.jboss.as.domain.http.server.security.ElytronIdentityHandler.handleRequest(ElytronIdentityHandler.java:61) at io.undertow.server.handlers.BlockingHandler.handleRequest(BlockingHandler.java:56) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:364) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377) at java.lang.Thread.run(Thread.java:748) at org.jboss.threads.JBossThread.run(JBossThread.java:485)
I have pushed a small reproducer .war application here: https://github.com/philippejulien/test-war