[ 
https://issues.jboss.org/browse/JBSEAM-4856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662448#comment-12662448
 ] 

Marek Novotny edited comment on JBSEAM-4856 at 1/27/12 10:35 AM:
-----------------------------------------------------------------

I was exploring the issue also from other point of view and found out proper 
workaround without changing source code in Seam, but not sure if that is what 
it should be as an result of this issue ;-). So in meanwhile this works for me 
on attached test case and on the latest 2.3.0-SNAPSHOT

* I tried to add 
{noformat}<ear-subdeployments-isolated>true</ear-subdeployments-isolated> 
{noformat} into jboss-deployment-structure.xml file
* Second rewrote the generation of EAR's application.xml in EAR pom.xml to be 
Java EE 6 specific and 

{code:xml}
<plugin>
    <artifactId>maven-ear-plugin</artifactId>
    <version>2.6</version>
    <configuration>
        <version>6</version>
        <generateApplicationXml>true</generateApplicationXml>
        <defaultLibBundleDir>lib</defaultLibBundleDir>                          
        <initializeInOrder>true</initializeInOrder>
        <modules>
            <jarModule>
                <groupId>org.jboss.el</groupId>
                <artifactId>jboss-el</artifactId>
                <includeInApplicationXml>false</includeInApplicationXml>
                <bundleDir>lib</bundleDir>
            </jarModule>
            <ejbModule>
                <groupId>org.jboss.seam</groupId>
                <artifactId>jboss-seam</artifactId>
                <bundleFileName>jboss-seam.jar</bundleFileName>                 
                        
            </ejbModule>
            <ejbModule>
                <groupId>dk.lungogbendsen.seam</groupId>
                <artifactId>seam-hello-ejbs</artifactId>
                <bundleFileName>seam-hello-jbs.jar</bundleFileName>             
                                
            </ejbModule>
            <webModule>
                <groupId>dk.lungogbendsen.seam</groupId>
                <artifactId>seam-hello-web1</artifactId>
                <contextRoot>/seam-hello1</contextRoot>
                <bundleFileName>seam-hello-web1.war</bundleFileName>
            </webModule>
            <webModule>
                <groupId>dk.lungogbendsen.seam</groupId>
                <artifactId>seam-hello-web2</artifactId>
                <contextRoot>/seam-hello2</contextRoot>
                <bundleFileName>seam-hello-web2.war</bundleFileName>
            </webModule>                                                        
                        
        </modules>
    </configuration>
</plugin>

{code}
                
      was (Author: manaRH):
    I was exploring the issue also from other point of view and found out 
proper workaround without changing source code in Seam, but not sure if that is 
what it should be as an result of this issue ;-). So in meanwhile this works 
for me on attached test case and on the latest 2.3.0-SNAPSHOT

* I tried to add 
{noformat}<ear-subdeployments-isolated>false</ear-subdeployments-isolated> 
{noformat} into jboss-deployment-structure.xml file
* Second rewrote the generation of EAR's application.xml in EAR pom.xml to be 
Java EE 6 specific and 

{code:xml}
<plugin>
    <artifactId>maven-ear-plugin</artifactId>
    <version>2.6</version>
    <configuration>
        <version>6</version>
        <generateApplicationXml>true</generateApplicationXml>
        <defaultLibBundleDir>lib</defaultLibBundleDir>                          
        <initializeInOrder>true</initializeInOrder>
        <modules>
            <jarModule>
                <groupId>org.jboss.el</groupId>
                <artifactId>jboss-el</artifactId>
                <includeInApplicationXml>false</includeInApplicationXml>
                <bundleDir>lib</bundleDir>
            </jarModule>
            <ejbModule>
                <groupId>org.jboss.seam</groupId>
                <artifactId>jboss-seam</artifactId>
                <bundleFileName>jboss-seam.jar</bundleFileName>                 
                        
            </ejbModule>
            <ejbModule>
                <groupId>dk.lungogbendsen.seam</groupId>
                <artifactId>seam-hello-ejbs</artifactId>
                <bundleFileName>seam-hello-jbs.jar</bundleFileName>             
                                
            </ejbModule>
            <webModule>
                <groupId>dk.lungogbendsen.seam</groupId>
                <artifactId>seam-hello-web1</artifactId>
                <contextRoot>/seam-hello1</contextRoot>
                <bundleFileName>seam-hello-web1.war</bundleFileName>
            </webModule>
            <webModule>
                <groupId>dk.lungogbendsen.seam</groupId>
                <artifactId>seam-hello-web2</artifactId>
                <contextRoot>/seam-hello2</contextRoot>
                <bundleFileName>seam-hello-web2.war</bundleFileName>
            </webModule>                                                        
                        
        </modules>
    </configuration>
</plugin>

{code}
                  
> AS7 Multi-war ear Seam 2.2.2.Final fails deployment (race condition?)
> ---------------------------------------------------------------------
>
>                 Key: JBSEAM-4856
>                 URL: https://issues.jboss.org/browse/JBSEAM-4856
>             Project: Seam 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2.2.Final
>         Environment: Ubuntu 11.10,  Sun Java 1.6.0_26-b03, JBoss AS7 
> 7.0.1.Final
>            Reporter: Todd Sproule
>            Assignee: Marek Novotny
>              Labels: as7
>             Fix For: 2.3.0.BETA1
>
>   Original Estimate: 2 days
>  Remaining Estimate: 2 days
>
> Deployment of a multi-war Seam ear into AS7 causes a deployment exception 
> with duplicate component exception.  This is easy to reproduce with any AS7 
> Seam ear and two wars. 
> 16:19:13,605 ERROR 
> [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/seam-hello1]]
>  (MSC service thread 1-3) Exception sending context initialized event to 
> listener instance of class 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:227) 
> [jboss-seam-2.2.2.Final.jar:]
>           at org.jboss.seam.core.Init.checkDuplicateFactory(Init.java:220) 
> [jboss-seam-2.2.2.Final.jar:]
>           at 
> org.jboss.seam.core.Init.addFactoryValueExpression(Init.java:283) 
> [jboss-seam-2.2.2.Final.jar:]
>           at 
> org.jboss.seam.init.Initialization.installComponents(Initialization.java:1152)
>  [jboss-seam-2.2.2.Final.jar:]
>           at org.jboss.seam.init.Initialization.init(Initialization.java:737) 
> [jboss-seam-2.2.2.Final.jar:]
>           at 
> org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36) 
> [jboss-seam-2.2.2.Final.jar:]
>           at 
> org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368)
>  [jbossweb-7.0.1.Final.jar:7.0.1.Final]
>           at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) 
> [jbossweb-7.0.1.Final.jar:7.0.1.Final]
>           at 
> org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70)
>  [jboss-as-web-7.0.1.Final.jar:7.0.1.Final]
>           at 
> org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
>           at 
> org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
>           at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>  [:1.6.0_26]
>           at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>  [:1.6.0_26]
>           at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
seam-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/seam-issues

Reply via email to