1 2 Previous Next 20 Replies Latest reply: Apr 13, 2012 12:42 PM by Carlos Celis Osorio RSS

Duplicate websession with Seam 2.1.0.BETA1

Olivier Thierry Apprentice

Hi,


I just upgraded to Seam 2.1.0.BETA1 but now I have this exception on server startup :


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:3854)
     at org.apache.catalina.core.StandardContext.start(StandardContext.java:4359)
     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
     at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
     at org.apache.catalina.core.StandardContext.init(StandardContext.java:5310)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
     at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
     at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
     at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
     at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
     at org.jboss.web.WebModule.startModule(WebModule.java:83)
     at org.jboss.web.WebModule.startService(WebModule.java:61)
     at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
     at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
     at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
     at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
     at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
     at $Proxy0.start(Unknown Source)
     at org.jboss.system.ServiceController.start(ServiceController.java:417)
     at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
     at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
     at $Proxy45.start(Unknown Source)
     at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
     at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
     at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
     at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
     at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
     at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
     at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
     at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
     at $Proxy46.start(Unknown Source)
     at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
     at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
     at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
     at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
     at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
     at $Proxy9.deploy(Unknown Source)
     at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
     at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
     at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
     at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
     at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
     at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
     at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
     at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
     at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
     at $Proxy0.start(Unknown Source)
     at org.jboss.system.ServiceController.start(ServiceController.java:417)
     at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
     at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
     at $Proxy4.start(Unknown Source)
     at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
     at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
     at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
     at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
     at $Proxy5.deploy(Unknown Source)
     at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
     at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
     at org.jboss.Main.boot(Main.java:200)
     at org.jboss.Main$1.run(Main.java:508)
     at java.lang.Thread.run(Thread.java:595)



It used to work with Seam 2.1.0.A1.


Any idea where the problem comes from ?

  • 1. Re: Duplicate websession with Seam 2.1.0.BETA1
    Jay Balunas Novice

    Could you post your components.xml, and any other information that might be related ( other config files, etc...)?

  • 2. Re: Duplicate websession with Seam 2.1.0.BETA1
    Olivier Thierry Apprentice

    Hi Jay,


    My application is an EAR including one JAR with Seam components. This JAR contains the following components.xml file :


    <?xml version="1.0" encoding="UTF-8"?>
    <components xmlns="http://jboss.com/products/seam/components"
                xmlns:core="http://jboss.com/products/seam/core"
                xmlns:bpm="http://jboss.com/products/seam/bpm"
                xmlns:persistence="http://jboss.com/products/seam/persistence"
                xmlns:security="http://jboss.com/products/seam/security"
                xmlns:framework="http://jboss.com/products/seam/framework"
                xmlns:transaction="http://jboss.com/products/seam/transaction"
                xmlns:mail="http://jboss.com/products/seam/mail"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation=
                    "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd 
                     http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.0.xsd 
                     http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd 
                     http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
                     http://jboss.com/products/seam/framework http://jboss.com/products/seam/framework-2.0.xsd
                     http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd
                     http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.0.xsd">
    
        <core:init jndi-pattern="t4-ihm-self-ear-1.0-SNAPSHOT/#{ejbName}/local" debug="true"/>    
    
         <transaction:ejb-transaction />
    
        <core:manager 
             conversation-timeout="120000" 
            concurrent-request-timeout="500"
            conversation-id-parameter="cid" />
    
          <core:resource-loader>
              <core:bundle-names>
                   <value>messages</value>
                   <value>labels</value>
                   <value>formats</value>
              </core:bundle-names>
          </core:resource-loader>
    
        <security:identity 
             authenticate-method="#{authenticator.authenticate}"
              />
        
        <bpm:jbpm>
             <bpm:process-definitions>
                  <value>bpm/automaticValidation/processdefinition.xml</value>
                  <value>bpm/onePhaseValidation/processdefinition.xml</value>
                  <value>bpm/twoPhasesValidation/processdefinition.xml</value>
             </bpm:process-definitions>
            <bpm:pageflow-definitions>
                 <value>WEB-INF/pageflow/simplifiedAbsenceRequest/simplifiedAbsenceRequest.jpdl.xml</value>
                 <value>WEB-INF/pageflow/processCrud/processCrud.xml</value>
            </bpm:pageflow-definitions>
         </bpm:jbpm>
         
         <mail:mail-session session-jndi-name="java:/Mail" />
    
         <component class="org.jboss.seam.web.MultipartFilter">
              <property name="createTempFiles">true</property>
              <property name="maxRequestSize">1000000</property>
         </component>
              
        <component
            name="processTemplate"
            class="t4.core.process.facade.VOProcessTemplate"
            scope="CONVERSATION"/>
    
        <component
            name="processFeature"
            class="t4.core.process.facade.VOProcessFeature"
            scope="CONVERSATION"/>
    
        <component
            name="process"
            class="t4.core.process.facade.VOProcess"
            scope="CONVERSATION"/>
    
        <component
            name="absenceRequest"
            class="t4.module.commons.absence.VOAbsenceRequest"
            scope="CONVERSATION"/>
    
        <component
            name="absenceRequestLine"
            class="t4.module.commons.absence.VOAbsenceRequestLine"
            scope="CONVERSATION"/>
    
        <component
            name="absenceReason"
            class="t4.module.commons.absence.VOAbsenceReason"
            scope="CONVERSATION"/>
    
        <component
            name="userAccount"
            class="t4.core.user.facade.VOUserAccount"
            scope="CONVERSATION"/>
    
        <component
            name="currentUser"
            class="t4.core.user.facade.VOUserAccount"
            scope="SESSION"/>
            
        <component
            name="organization"
            class="t4.core.organization.facade.VOOrganization"
            scope="CONVERSATION"/>
    
        <component
            name="unitRole"
            class="t4.core.organization.facade.VOUnitRole"
            scope="CONVERSATION"/>
    
        <component
            name="organizationalUnit"
            class="t4.core.organization.facade.VOOrganizationalUnit"
            scope="CONVERSATION"/>
    
        <component
            name="organizationalUnitMember"
            class="t4.core.organization.facade.VOOrganizationalUnitMember"
            scope="CONVERSATION"/>
    
        <component
            name="organizationalUnitRole"
            class="t4.core.organization.facade.VOOrganizationalUnitRole"
            scope="CONVERSATION"/>
    
        <component
            name="employee"
            class="t4.core.employee.facade.VOEmployee"
            scope="CONVERSATION"/>
              
    </components>



    My EAR also refers to other jars containing Seam components, each of them has a components.xml file that just declares Seam components. Something like this :



    <?xml version="1.0" encoding="UTF-8"?>
    <components xmlns="http://jboss.com/products/seam/components"
                xmlns:core="http://jboss.com/products/seam/core"
                xmlns:bpm="http://jboss.com/products/seam/bpm"
                xmlns:persistence="http://jboss.com/products/seam/persistence"
                xmlns:security="http://jboss.com/products/seam/security"
                xmlns:framework="http://jboss.com/products/seam/framework"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation=
                    "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd 
                     http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.0.xsd 
                     http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd 
                     http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
                     http://jboss.com/products/seam/framework http://jboss.com/products/seam/framework-2.0.xsd
                     http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">
    
        <component
            name="employeeService"
            class="t4.module.commons.employee.EmployeeServiceBean"
            scope="STATELESS" />
            
        <component
            name="absenceService"
            class="t4.module.commons.absence.AbsenceServiceBean"
            scope="STATELESS" />
            
        <component
            name="processHandler"
            class="t4.module.commons.bpm.ProcessHandlerBean"
            scope="STATELESS" />
            
        <component
            name="assignmentHandler"
            class="t4.module.commons.bpm.AssignmentHandlerBean"
            scope="STATELESS" />
            
        <component
            name="decisionHandler"
            class="t4.module.commons.bpm.DecisionHandlerBean"
            scope="STATELESS" />
            
        <component
            name="processInstanceHandler"
            class="t4.module.commons.bpm.ProcessInstanceHandlerBean"
            scope="STATELESS" />
                
    </components>



    I can't see anything related to a websession component in my components.xml file. By the way, I deploy my EAR on JBoss AS 4.2.0.GA.


    Other config files have nothing to see with Seam. Anyway, if you need a specific config file, please tell me.


    Thanks for your help

  • 3. Re: Duplicate websession with Seam 2.1.0.BETA1
    Jay Balunas Novice

    In 2.1.0.BETA1 there is now a webSession factory defined in the default components.xml.  This was to solve JBSEAM-2888.  If your's is a duplicate try removing your websession definition.  If not please let us know what your config is?


    <factory name="org.jboss.seam.web.webSession" auto-create="true" scope="stateless" value="#{org.jboss.seam.web.session}" />
    

  • 4. Re: Duplicate websession with Seam 2.1.0.BETA1
    Olivier Thierry Apprentice

    Not sure to understand ... I don't declare this webSession component in any components.xml file, so where should I remove it from ?

  • 5. Re: Duplicate websession with Seam 2.1.0.BETA1
    Jay Balunas Novice

    I think our posts got crossed ;-) 


    Could look the the output of the server startup from the exception up to where it starts loading the application.  The extra webSession should be listed there somehwere, and we should be able to tell where it is getting set from.


    thanks
    -Jay

  • 6. Re: Duplicate websession with Seam 2.1.0.BETA1
    Olivier Thierry Apprentice

    The only webSession component definition I can find in server output is this one :


    17:31:47,682 INFO  [Component] Component: org.jboss.seam.web.session, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.web.Session


  • 7. Re: Duplicate websession with Seam 2.1.0.BETA1
    Jay Balunas Novice

    is it possible that you have two jboss-seam.jar's in your application or classpath?  Something is loading a second webSession factory.

  • 8. Re: Duplicate websession with Seam 2.1.0.BETA1
    Bernard Labno Master

    If application is deployed in form of exploded archive then jboss-seam.jar may be located in a single place but can be on a classpath in MANIFEST.MF of WEB or EJB modules and it will cause similar trouble too.

  • 9. Re: Duplicate websession with Seam 2.1.0.BETA1
    Olivier Thierry Apprentice

    Yes, you are right ... I build my application with Maven and I had a dependency to some Seam jars in my web subproject, and so a jboss-seam.jar put my WAR WEB-INF/lib directory. I can't remember why I did this but there is no need to do this, nor with 2.1.0.A1 or 2.1.0.BETA1. Startup goes further now, thanks a lot for your help.


    Anyway I still have problems on startup, about org.jboss.seam.bpm.jbpm Seam component this time. Seam can't instantiate it because of this :


    Caused by: java.lang.NoClassDefFoundError: org/jboss/el/lang/ExtendedFunctionMapper
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:675)
         at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:655)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:193)
         at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131)
         at org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399)
         at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:520)
         at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at org.jboss.seam.bpm.Jbpm.startup(Jbpm.java:82)
    



    I will have a look on this tomorrow (I have to go ...), maybe this is a known problem. And thanks again for your help !

  • 10. Re: Duplicate websession with Seam 2.1.0.BETA1
    Jay Balunas Novice

    I'm glad that you found the duplicate - that type of issue can be hard to find.


    As for the el issue.  That class is in the jboss-el.jar that is included in the distribution.  Please check that it is in your application.


    Jay

  • 11. Re: Duplicate websession with Seam 2.1.0.BETA1
    Olivier Thierry Apprentice

    I had a jboss-el.jar in my application, but not the right version.
    I upgraded from 2.0.1.GA to 2.0.2.CR1 and it works OK. Is it something expected ?

  • 12. Re: Duplicate websession with Seam 2.1.0.BETA1
    Olivier Thierry Apprentice

    Olivier Thierry wrote on Aug 27, 2008 18:21:


    I build my application with Maven and I had a dependency to some Seam jars in my web subproject, and so a jboss-seam.jar put my WAR WEB-INF/lib directory. I can't remember why I did this but there is no need to do this, nor with 2.1.0.A1 or 2.1.0.BETA1.


    I found why I did this, and I think this could be useful for people using Maven to develop Seam applications. My Maven application has a subproject for EAR, one for WAR and one for Seam components JAR. In my WAR application I need to add depdencies to jboss-seam-debug, jboss-seam-ui and jboss-seam-pdf. Since these jars have transitive dependencies to jboss-seam, Maven adds jboss-seam.jar to WEB-INF/lib when packaging the war.


    To avoid this, you have to add exclusions for jboss-seam when defining dependencies in war project pom.xml. Something like this :



    <dependency>
       <groupId>org.jboss.seam</groupId>
       <artifactId>jboss-seam-debug</artifactId>
       <exclusions>
          <exclusion>
             <groupId>org.jboss.seam</groupId>
             <artifactId>jboss-seam</artifactId>
          </exclusion>
       </exclusions>
    </dependency>
    <dependency>
       <groupId>org.jboss.seam</groupId>
       <artifactId>jboss-seam-ui</artifactId>
       <exclusions>
          <exclusion>
             <groupId>org.jboss.seam</groupId>
             <artifactId>jboss-seam</artifactId>
          </exclusion>
       </exclusions>
    </dependency>
    <dependency>
       <groupId>org.jboss.seam</groupId>
       <artifactId>jboss-seam-pdf</artifactId>
       <exclusions>
          <exclusion>
             <groupId>org.jboss.seam</groupId>
             <artifactId>jboss-seam</artifactId>
          </exclusion>
       </exclusions>
    </dependency>



    This solves the problem. Hope it will help anyone ;)

  • 13. Re: Duplicate websession with Seam 2.1.0.BETA1
    chit ko Newbie

    here is the quick-fix:


    Unzipped jboss-seam.jar. Go to /META-INF/components.xml. Uncomment factory names!
    it should be like this following:



    <?xml version="1.0" encoding="UTF-8"?>
    <components xmlns="http://jboss.com/products/seam/components"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd">
    
      <import>org.jboss.seam.core</import>
      <import>org.jboss.seam.cache</import>
      <import>org.jboss.seam.transaction</import>
      <import>org.jboss.seam.framework</import>
      <import>org.jboss.seam.web</import>
      <import>org.jboss.seam.faces</import>
      <import>org.jboss.seam.international</import>
      <import>org.jboss.seam.theme</import>
      <import>org.jboss.seam.pageflow</import>
      <import>org.jboss.seam.bpm</import>
      <import>org.jboss.seam.jms</import>
      <import>org.jboss.seam.mail</import>
      <import>org.jboss.seam.security</import>
      <import>org.jboss.seam.security.management</import>  
      <import>org.jboss.seam.security.permission</import>
      <import>org.jboss.seam.captcha</import>
      <import>org.jboss.seam.excel.exporter</import>
    <!--
      <factory name="org.jboss.seam.web.webSession" auto-create="true" scope="stateless" value="#{org.jboss.seam.web.session}" />
    
      <factory name="facesMessages" auto-create="true" scope="stateless" value="#{org.jboss.seam.international.statusMessages}" />
    -->    
      <factory name="org.jboss.seam.faces.facesMessages" auto-create="true" scope="stateless" value="#{org.jboss.seam.international.statusMessages}" />
    
    </components>
    




  • 14. Re: Duplicate websession with Seam 2.1.0.BETA1
    Tobias Hill Newbie

    We have exactly same problem (using a nightly build from yesterday) but cannot really say that it has to do with two jboss-seam.jars being deployed (we have carefully examined the ear which we deploy).


    We would be very thinkful for any other ideas which you might have?


    Best regards,
    Tobias

1 2 Previous Next