2 Replies Latest reply on Nov 14, 2009 3:39 AM by daverdoo

    Seam being loaded twice

    daverdoo

      I am getting the error: Caused by: java.lang.IllegalStateException: Two components with the same name and precedence - component name: org.jboss.seam.core.init, component classes: org.jboss.seam.core.Init, org.jboss.seam.core.Init


      The only jar file that has the class file org.jboss.seam.core.Init is the jboss-seam-2.2.0.jar file. There is only one installed in the application.xml as an ejb.


      Somehow, it is reloading the seam jar twice and throwing an exception that the org.jboss.seam.core.init component is being loaded twice.


      I do however see that the seam jar file is being copied twice into the tmp/deploy directory. I can't imagine why.


      Any help would be greatly appreciated.


      Thanks in advance!
      Dave

        • 1. Re: Seam being loaded twice
          asookazian

          Are you sure the container is reloading the same JAR twice?  Perhaps you have the JAR in the classpath twice under two different names...


          If you're using JBoss, try re-extracting JBoss and re-deploying your EAR/WAR and doing an 'ant clean deploy'.


          It seems like it's something pretty basic related to classpath/classloader issue...

          • 2. Re: Seam being loaded twice
            daverdoo
            I figured out why this was happening. I was placing the seam.properties file in the ear root. I moved it to the ejb root and everything worked fine.


            moved from:
            ear
            ->seam.properties
            ->ejb

            to:
            ear
            ->ejb
              -->seam.properties