Amos Feng created WFCORE-449:
--------------------------------
Summary: MBeanRegistrationService throws NameNotFoundException
"java:comp/BeanManager" when starting/stoping the MBean
Key: WFCORE-449
URL:
https://issues.jboss.org/browse/WFCORE-449
Project: WildFly Core
Issue Type: Bug
Affects Versions: 1.0.0.Alpha13
Reporter: Amos Feng
Assignee: Amos Feng
Fix For: 1.0.0.Alpha14
The steps to reproduce the issue is the following:
{code}
git clone
https://github.com/zhfeng/test_jmx_ejb
cd test_jmx_ejb
mvn clean install
after starting the wildfly server, copy the test_jmx_ejb-1.0.jar to the deployment
directory of the wildfly
{code}
you will see the exception
{code}
11:39:30,064 ERROR [org.jboss.as.weld] (MSC service thread 1-8) WFLYWELD0002: Failed to
tear down Weld contexts: javax.naming.NameNotFoundException: java:comp/BeanManager
at
org.jboss.as.naming.InitialContext$DefaultInitialContext.findContext(InitialContext.java:187)
at
org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:231)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:188)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:184)
at javax.naming.InitialContext.lookup(InitialContext.java:411) [rt.jar:1.7.0_21]
at javax.naming.InitialContext.lookup(InitialContext.java:411) [rt.jar:1.7.0_21]
at org.jboss.as.weld.arquillian.WeldContextSetup.teardown(WeldContextSetup.java:108)
at org.jboss.as.jmx.MBeanRegistrationService.start(MBeanRegistrationService.java:106)
[wildfly-jmx-1.0.0.Alpha9.jar:1.0.0.Alpha9]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_21]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
{code}
It looks like the JavaNamespaceSetup teardown happens before the WeldContextSetup so it
throws NameNotFoundException in the WeldContextSetup teardown.
The possible fix is to reverse calling the setupActions.
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)