2 Replies Latest reply on May 27, 2006 12:18 PM by slawek t

    Seam can't see @Remove @Destroy method

    slawek t Novice

      Hi,

      What might be the reason of:

      [testng] java.lang.IllegalArgumentException: Stateful session bean component should have a method marked @Remove @Destroy: wizardStartAction
       [testng] at org.jboss.seam.Component.checkDestroyMethod(Component.java:230)
       [testng] at org.jboss.seam.Component.<init>(Component.java:186)
       [testng] at org.jboss.seam.Component.<init>(Component.java:151)
       [testng] at org.jboss.seam.Component.<init>(Component.java:146)
       [testng] at org.jboss.seam.Component.<init>(Component.java:141)
       [testng] at org.jboss.seam.init.Initialization.addComponent(Initialization.java:290)
       [testng] at org.jboss.seam.init.Initialization.addComponents(Initialization.java:252)
       [testng] at org.jboss.seam.init.Initialization.init(Initialization.java:109)
       [testng] at org.jboss.seam.mock.SeamTest.init(SeamTest.java:321)
       [testng] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [testng] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       [testng] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       [testng] at java.lang.reflect.Method.invoke(Method.java:585)
       [testng] at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
       [testng] at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:318)
       [testng] at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:152)
       [testng] at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:88)
       [testng] at org.testng.TestRunner.privateRun(TestRunner.java:682)
       [testng] at org.testng.TestRunner.run(TestRunner.java:566)
       [testng] at org.testng.SuiteRunner.privateRun(SuiteRunner.java:220)
       [testng] at org.testng.SuiteRunner.run(SuiteRunner.java:146)
       [testng] at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:713)
       [testng] at org.testng.TestNG.runSuitesLocally(TestNG.java:676)
       [testng] at org.testng.TestNG.run(TestNG.java:444)
       [testng] at org.testng.TestNG.privateMain(TestNG.java:803)
       [testng] at org.testng.TestNG.main(TestNG.java:745)



      My class:

      @Stateful
      @Name( "wizardStartAction" )
      @Scope( ScopeType.CONVERSATION )
      @Conversational(ifNotBegunOutcome = "startWizard")
      //@Interceptors( value = SeamInterceptor.class )
      public class WizardStartActionBean implements Serializable, WizardStartAction {
      ...
       @Destroy
       @Remove
       public void destroy( ) {
       }
      


      and @Local wizardStartAction interface with this method also.

      Seam can't see that I have method marked @Remove @Destroy from the beginning of existance of Seam action class. Recently everything was ok with this class until latest jars updating to newest ones (from CVS).

      How to solve this problem?

      Regards, Slawek