1 Reply Latest reply on May 31, 2010 5:34 AM by Branimir Minkov

    Seam 2.1.1 @Roles installment problem

    Branimir Minkov Newbie

      Hello, I have a problem at deploy time with components having the same @Role name. Jboss server 4.2.1, Seam 2.1.1.GA. The components' annotation code is:


      @Stateful
      @Name("advancedCompEditor")
      @Scope(CONVERSATION)
      @Roles({
          @Role(name = "SomeAdmin"),
          @Role(name = "GroupAdmin")
      })
      public class AdvancedCompEditableAction implements AdvancedCompEditableLocal {...}




      and




      @Stateful
      @Name("compEditor")
      @Scope(CONVERSATION)
      @Roles({
          @Role(name = "SomeAdmin"),
          @Role(name = "GroupAdmin")
      })
      public class RegisteredCompEditableAction implements RegisteredCompEditableLocal {...}



      The deploy-time log is :


      31/05/10 11:05:55 INFO  seam.init.Initialization            - two components with same name, higher precedence wins: SomeAdmin
      31/05/10 11:14:34 ERROR web].[localhost].[/SomeApplication] - Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
      java.lang.IllegalStateException: Two components with the same name and precedence - component name: SomeAdmin, component classes: xxx.AdvancedCompEditableAction, xxx.RegisteredCompEditableAction
           at org.jboss.seam.init.Initialization.addComponentDescriptor(Initialization.java:596)
           at org.jboss.seam.init.Initialization.installRole(Initialization.java:971)
           at org.jboss.seam.init.Initialization.installScannedComponentAndRoles(Initialization.java:960)
           at org.jboss.seam.init.Initialization.scanForComponents(Initialization.java:889)
           at org.jboss.seam.init.Initialization.init(Initialization.java:701)
           at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:35)
           ...



      What am I doing wrong in this case? Thank you in advance.