Bug 1114479 - Sever level MBean hasn't been initialized yet when a web app starts up, causing javax.management.InstanceNotFoundException
Summary: Sever level MBean hasn't been initialized yet when a web app starts up, causi...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web
Version: 6.1.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER10
: EAP 6.3.0
Assignee: Rémy Maucherat
QA Contact: Radim Hatlapatka
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-30 07:41 UTC by Osamu Nagano
Modified: 2018-12-06 17:05 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-07-31 11:15:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
test_valve.jar and TestWAR.war and config files (13.98 KB, application/zip)
2014-06-30 07:41 UTC, Osamu Nagano
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFLY-3557 0 Major Open Sever level MBean hasn't been initialized yet when a web app starts up, causing javax.management.InstanceNotFoundExcepti... 2017-06-23 01:57:57 UTC

Description Osamu Nagano 2014-06-30 07:41:16 UTC
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.

Comment 1 Martin Velas 2014-07-31 11:15:05 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.