3 Replies Latest reply on Dec 16, 2011 4:47 AM by xantos92

    Two components with the same name and precedence

    xantos92

      Hello

       

      i have a problem with two components with the same name and precedence. Because i am new to this, i don't know how to solve this.

       

      -----

      14:39:10,265 INFO  [TomcatDeployment]  deploy, ctxPath=/myProject/webservices

      14:39:10,295 WARNING [config]  Unable to process deployment descriptor for context '/myProject/webservices'

      14:39:10,295 INFO  [config]  Initializing Mojarra (1.2_12-b01-FCS) for context '/myProject/webservices'

      14:39:11,047 INFO  [TomcatDeployment]  deploy, ctxPath=/myProject

      14:39:11,088 INFO  [config]  Initializing Mojarra (1.2_12-b01-FCS) for context '/myProject'

      14:39:11,569 WARN  [SeamPhaseListener]  There should only be one Seam phase listener per application

      14:39:11,927 INFO  [ServletContextListener]  Welcome to Seam 2.2.2.Final

      14:39:22,889 ERROR [[/myProject]]  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: org.jboss.seam.security.identity, component classes: org.jboss.portletbridge.seam.PortalIdentity, Jonas.module.core.authentification.session.PanIdentity

      -----

       

      My class PanIdentity extends Idendity. By using Google, i found a similar problem " [Initialization] two components with same name, higher precedence wins:", i would like to solve this problem by using my PanIdendity-Class instead of PortalIdendity.


      I am using Jboss 5.1, Seam 2.2.2.Final and Portletbridge 2.2.0., but i also tried Portletbridge 2.1.0 - same issue.

       

      Thanks a lot

      greetings

      Jonas

        • 1. Re: Two components with the same name and precedence
          xantos92

          lol, i am so stupid of course it doesn't work, there are two classes with the same name..

           

          @Name("org.jboss.seam.security.identity")

          • 2. Re: Two components with the same name and precedence
            kenfinni

            Jonas,

             

            If you want to add additional info into Identity within a Portal, it's best to extend PortalIdentity as opposed to the Seam one, as there is Portal specific integration points within PortalIdentity that you would miss.

            1 of 1 people found this helpful
            • 3. Re: Two components with the same name and precedence
              xantos92

              Hi Ken.

               

              Well, i solved the problem by modifing my own class:

              @Install(precedence = Install.FRAMEWORK+1) and copied the source code of Portalidentity into my own class to combine both classes into one.

               

               

              I also though about extending, but importing portalidentityclass is a little bit complicated (because Seam web Project). I also thought about modify the sourcecode of portletbridge, but this seems not necessary.

               

              Well, there is another error, but i haven't found the reason yet.

               

              Greetings