Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-1430

Cannot use @Service startup beans : java.lang.RuntimeException: Call setBeanContext, not setTargetObject

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 1.0.0-Beta4
    • AS 5.0.0.CR1
    • core
    • None

      A working Beta4 EJB3 application is broken with CR1.
      A RuntimeException appears when my @Service bean is loaded.
      The root cause is :

      Caused by: java.lang.RuntimeException: Call setBeanContext, not setTargetObject
      at org.jboss.ejb3.interceptors.container.ContainerMethodInvocation.setTargetObject(ContainerMethodInvocation.java:120)
      at org.jboss.ejb3.service.ServiceContainer.populateInvocation(ServiceContainer.java:473)
      at org.jboss.ejb3.service.ServiceContainer.localInvoke(ServiceContainer.java:371)
      at org.jboss.ejb3.service.ServiceContainer.localInvoke(ServiceContainer.java:343)
      at org.jboss.ejb3.service.ServiceMBeanDelegate.invoke(ServiceMBeanDelegate.java:215)

      This seems to be related to JBAS-5477.

      I have
      @Management
      public interface StartupMgmt

      {...}

      and

      @Service
      public class Startup implements StartupMgmt {
      void create() throws Exception;
      void start() throws Exception;
      void stop() throws Exception;
      void destroy();
      }

              rhn-engineering-cdewolf Carlo de Wolf
              dcausse_jira David Causse (Inactive)
              Votes:
              5 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: