[jboss-jira] [JBoss JIRA] Created: (JBAS-5697) Cannot use @Service startup beans : java.lang.RuntimeException: Call setBeanContext, not setTargetObject

David Causse (JIRA) jira-events at lists.jboss.org
Tue Jul 1 10:51:42 EDT 2008


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

                 Key: JBAS-5697
                 URL: http://jira.jboss.com/jira/browse/JBAS-5697
             Project: JBoss Application Server
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: EJB3
    Affects Versions: JBossAS-5.0.0.CR1
            Reporter: David Causse
         Assigned To: Carlo de Wolf
             Fix For: JBossAS-5.0.0.CR2


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();
}



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list