[jboss-jira] [JBoss JIRA] (WFLY-776) Inject POJO to MBean by using <inject bean="XXX"> in jboss-service.xml does not work in SAR

Eduardo Silva (JIRA) jira-events at lists.jboss.org
Mon Nov 25 07:37:05 EST 2013


    [ https://issues.jboss.org/browse/WFLY-776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12926477#comment-12926477 ] 

Eduardo Silva commented on WFLY-776:
------------------------------------

I did not find the problem yet. I thought that was something related to the time to solve the dependencies, so I've increased the time on the
awaitingMonitor to huge 20 seconds, just to test. The problem persists. After that I've investigated the PARSER phase of the injected bean,
it is working as well, I'm not really sure that the injection part after that is OK, still investigating. Seems to me that in some point the class loader
is being changed causing the dependency resolution problem.  

service jboss.deployment.unit."HelloService.sar".FIRST_MODULE_USE
service jboss.deployment.unit."HelloService.sar".POST_MODULE
service jboss.deployment.unit."HelloService.sar".INSTALL
service jboss.deployment.unit."HelloService.sar".moduleDeploymentRuntimeInformation
service jboss.pojo.myTask.INSTANTIATED
service jboss.pojo."ModuleClassLoader for Module \"deployment.HelloService.sar:main\" from Service Module Loader"."com.redhat.jboss.support.SimpleTask".INSTANTIATED
service jboss.deployment.unit."HelloService.sar".deploymentCompleteService
service jboss.pojo.myTask.CONFIGURED
service jboss.pojo.SystemClassLoader."java.lang.Runnable".INSTANTIATED
service jboss.pojo."ModuleClassLoader for Module \"deployment.HelloService.sar:main\" from Service Module Loader"."com.redhat.jboss.support.SimpleTask".CONFIGURED

                
> Inject POJO to MBean by using <inject bean="XXX"> in jboss-service.xml does not work in SAR
> -------------------------------------------------------------------------------------------
>
>                 Key: WFLY-776
>                 URL: https://issues.jboss.org/browse/WFLY-776
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: JMX, POJO
>            Reporter: Masafumi Miura
>         Attachments: HelloService-AS7-inject-reproducer.tar.gz
>
>
> When injecting POJO to MBean by using {{<inject bean="myTask"/>}} in {{jboss-service.xml}} of SAR like the following:
> * META-INF/jboss-service.xml:
> {code:xml}
> <server>
>   <mbean code="com.redhat.jboss.support.HelloService"
>          name="example:type=HelloService,service=Hello">
>      <attribute name="Message">Hello!!</attribute>
>      <attribute name="Task"><inject bean="myTask"/></attribute>
>   </mbean>
> </server>
> {code}
> * META-INF/jboss-beans.xml:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <deployment ... >
>   <bean name="myTask" class="com.redhat.jboss.support.SimpleTask">
>   </bean>
> </deployment>
> {code}
> Then the following ERROR is happened at deployment of SAR:
> {noformat:title=7.1.4.Final}
> ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.mbean.service.example:type=HelloService,service=Hello.start Missing[jboss.mbean.service.myTask.start]","jboss.mbean.registration.example:type=HelloService,service=Hello Missing[JBAS014861: <one or more transitive dependencies>]","jboss.mbean.service.example:type=HelloService,service=Hello.create Missing[jboss.mbean.service.myTask.create]"]}}}
> {noformat}
> {noformat:title=7.2.0.Alpha1}
> ERROR [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "HelloService.sar" was rolled back with the following failure message: 
> {"JBAS014771: Services with missing/unavailable dependencies" => [
>     "jboss.mbean.service.example:type=HelloService,service=Hello.start is missing [jboss.mbean.service.myTask.start]",
>     "jboss.mbean.service.example:type=HelloService,service=Hello.create is missing [jboss.mbean.service.myTask.create]"
> ]}
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list