[jboss-jira] [JBoss JIRA] (AS7-4249) Inherited start/stop methods are not invoked on a POJO

Kian Mirjalali (JIRA) jira-events at lists.jboss.org
Mon Sep 10 08:20:33 EDT 2012


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

Kian Mirjalali commented on AS7-4249:
-------------------------------------

The result of this bug is an exception like this:
{code}
14:44:51,990 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.pojo.myBeanName.START: org.jboss.msc.service.StartException in service jboss.pojo.myBeanName.START: java.lang.IllegalArgumentException: JBAS017076: Method not found start[] for class aaa.bbb.ChildClass.
        at org.jboss.as.pojo.service.LifecyclePojoPhase.start(LifecyclePojoPhase.java:50)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_32]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_32]
        at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_32]
Caused by: java.lang.IllegalArgumentException: JBAS017076: Method not found start[] for class aaa.bbb.ChildClass.
        at org.jboss.as.pojo.service.Configurator.findMethod(Configurator.java:191)
        at org.jboss.as.pojo.service.DefaultBeanInfo.findMethod(DefaultBeanInfo.java:134)
        at org.jboss.as.pojo.service.BeanUtils.createJoinpoint(BeanUtils.java:179)
        at org.jboss.as.pojo.service.BeanUtils.dispatchLifecycleJoinpoint(BeanUtils.java:156)
        at org.jboss.as.pojo.service.LifecyclePojoPhase.dispatchJoinpoint(LifecyclePojoPhase.java:42)
        at org.jboss.as.pojo.service.LifecyclePojoPhase.start(LifecyclePojoPhase.java:48)
        ... 5 more
{code} 
The problem not only appears for {{start}} and {{stop}} methods, but also for {{create}}, {{destroy}} and probably any other method referenced in the xml but defined in a super class.

Providing such texts and letting the search engines to index them, helps some developers who just see some strange exceptions and have no idea what's wrong with their codes!

                
> Inherited start/stop methods are not invoked on a POJO
> ------------------------------------------------------
>
>                 Key: AS7-4249
>                 URL: https://issues.jboss.org/browse/AS7-4249
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: POJO
>    Affects Versions: 7.1.1.Final
>            Reporter: Ivo Studensky
>            Assignee: Ales Justin
>             Fix For: 7.1.2.Final (EAP)
>
>
> Let's say we have a POJO A which extends a class B. The start/stop
> methods are defined in the class B. In the jboss-beans.xml file is
> something like this:
> <bean name="A" class="blah.blah.A"/>
> Then, only the constructor of A is invoked by AS7, but no invocation of
> start/stop methods occur. The start/stop methods are invoked only if
> they are directly defined in A.

--
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