Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-2791

"duplicate factory for: org.jboss.seam.web.webSession (duplicate is specified in components.xml)" error after creating a newseam project

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Critical Critical
    • 3.0.0.cr1
    • 3.0.0.alpha
    • seam2
    • None

      After creating a new Seam project via the wizard (EAR packaging, configuration "Dynamic Web project with Seam 2.0"), starting up JBoss produces the following error:

      duplicate factory for: org.jboss.seam.web.webSession (duplicate is specified in components.xml)

      Even after removing jboss-seam.jar from the war MANIFEST.INF as suggested here (http://www.seamframework.org/Community/HowToUpdateProjectFrom20To21Seam) the error still occurs.

      This is the only other reference that I've found to this error (http://jira.jboss.com/jira/browse/JBSEAM-2981) but it looks slightly unrelated to me.

      Stack trace:
      19:05:32,116 ERROR [[/hellome]] Excepción enviando evento inicializado de contexto a instancia de escuchador de clase org.jboss.seam.servlet.SeamListener
      java.lang.IllegalStateException: duplicate factory for: org.jboss.seam.web.webSession (duplicate is specified in components.xml)
      at org.jboss.seam.core.Init.checkDuplicateFactoryExpressions(Init.java:222)
      at org.jboss.seam.core.Init.checkDuplicateFactory(Init.java:215)
      at org.jboss.seam.core.Init.addFactoryValueExpression(Init.java:278)
      at org.jboss.seam.init.Initialization.installComponents(Initialization.java:983)
      at org.jboss.seam.init.Initialization.init(Initialization.java:631)
      at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      ....

      I believe also these others warnings might be related to the same problem (which i suspect is duplicate jar in the classpath of the war):

      19:49:24,506 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
      19:49:25,506 INFO [EARDeployer] Init J2EE application: file:/D:/Java/jboss-4.2.3.GA/server/default/deploy/hellome-ear.ear/
      19:49:35,459 WARN [MainDeployer] Found non-jar deployer for jboss-seam.jar: MBeanProxyExt[jboss.ejb3:service=EJB3Deployer]
      19:49:42,381 WARN [DeploymentInfo] Only the root deployment can set the loader repository, ignoring config=LoaderRepositoryConfig(repositoryName: seam.jboss.org:loader=hellome, repositoryClassName: org.jboss.mx.loading.HeirarchicalLoaderRepository3, configParserClassName: org.jboss.mx.loading.HeirarchicalLoaderRepository3ConfigParser, repositoryConfig: java2ParentDelegation=false)
      19:50:00,679 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.entity.PersistenceUnitDeployment

      19:50:04,976 INFO [TomcatDeployer] deploy, ctxPath=/hellome, warUrl=.../deploy/hellome-ear.ear/hellome.war/
      19:50:13,554 WARN [SeamPhaseListener] There should only be one Seam phase listener per application
      19:50:20,726 INFO [ServletContextListener] Welcome to Seam 2.1.0.BETA1

            manderse@redhat.com Max Andersen
            barakka_jira Riccardo Serafin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: