Created attachment 913277 [details] test_valve.jar and TestWAR.war and config files Description of problem: With "-Dorg.apache.tomcat.util.ENABLE_MODELER=true", server level MBeans like a global valve become available. Those should be visible from start phase of a web app, though sometimes those are missing and javax.management.InstanceNotFoundException is thrown. How reproducible: This sporadically happens due to the parallel nature of WildFly start up. It is reproducible by using a debugger (Eclipse is better than JDB, because JDB stops all threads). Steps to Reproduce: Follow the steps described in WFLY-3557. Here is the summary of it. 1. Unzip attached sample.zip onto $JBOSS_HOME of EAP 6.1.1. 2. Set break point at org.apache.catalina.core.ContainerBase:1203. 3. Start the server. Actual results: ~~~ 09:46:06,302 INFO [stdout] (ServerService Thread Pool -- 53) --- TestValve2 : start 09:46:06,303 INFO [stdout] (ServerService Thread Pool -- 53) --- TestValve2 : getGlobalConfiguration 09:46:06,304 INFO [stdout] (ServerService Thread Pool -- 53) --- TestValve2 : getGlobalConfiguration error 09:46:06,306 ERROR [stderr] (ServerService Thread Pool -- 53) javax.management.InstanceNotFoundException: jboss.web:name=TestValve,type=Valve 09:46:06,306 ERROR [stderr] (ServerService Thread Pool -- 53) at org.jboss.as.jmx.PluggableMBeanServerImpl.findDelegate(PluggableMBeanServerImpl.java:94) 09:46:06,307 ERROR [stderr] (ServerService Thread Pool -- 53) at org.jboss.as.jmx.PluggableMBeanServerImpl.getAttribute(PluggableMBeanServerImpl.java:171) 09:46:06,307 ERROR [stderr] (ServerService Thread Pool -- 53) at test.valve.TestValve2.getGlobalConfiguration(TestValve2.java:100) 09:46:06,307 ERROR [stderr] (ServerService Thread Pool -- 53) at test.valve.TestValve2.start(TestValve2.java:68) 09:46:06,308 ERROR [stderr] (ServerService Thread Pool -- 53) at org.apache.catalina.core.StandardPipeline.start(StandardPipeline.java:223) 09:46:06,309 ERROR [stderr] (ServerService Thread Pool -- 53) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3713) 09:46:06,310 ERROR [stderr] (ServerService Thread Pool -- 53) at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) 09:46:06,310 ERROR [stderr] (ServerService Thread Pool -- 53) at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) 09:46:06,311 ERROR [stderr] (ServerService Thread Pool -- 53) at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) 09:46:06,311 ERROR [stderr] (ServerService Thread Pool -- 53) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 09:46:06,311 ERROR [stderr] (ServerService Thread Pool -- 53) at java.util.concurrent.FutureTask.run(FutureTask.java:262) 09:46:06,312 ERROR [stderr] (ServerService Thread Pool -- 53) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 09:46:06,312 ERROR [stderr] (ServerService Thread Pool -- 53) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 09:46:06,312 ERROR [stderr] (ServerService Thread Pool -- 53) at java.lang.Thread.run(Thread.java:744) 09:46:06,313 ERROR [stderr] (ServerService Thread Pool -- 53) at org.jboss.threads.JBossThread.run(JBossThread.java:122) ~~~ Expected results: MBean "jboss.web:name=TestValve,type=Valve" should be available in start() method of TestValve2. Additional info: WildFly 8+ replaced the web server with Undertow so the reproducing steps are not applicable to the recent upstream versions.
This issue reported against older version, cannot be reproduced against latest 6.3.0.ER10 bits, which means it was fixed earlier. Therefore, we are closing this bug. Thank you for reporting this issue.