6 Replies Latest reply on Sep 6, 2007 12:36 PM by nkhilnani

    Trouble Deploying Seam App To Tomcat

    strickla

      I'm trying to deploy my seam app on Tomcat (with embedded JBoss) without much luck. I'm getting the following exception but it doesn't make much sense to me.

      I've read and followed all the steps in http://docs.jboss.com/seam/2.0.0.B1/reference/en/html/configuration.html#config.install.embedded and http://wiki.jboss.org/wiki/Wiki.jsp?page=EmbeddedAndTomcat, including adding the embedded JBoss listener (last) in server.xml and the WEB-INF scanner listener in context.xml.

      I WAS able to run ant deploy.tomcat on the Seam booking example and it works just fine. I then tried modeling my app config files after the booking ones but I'm still getting the exception below. Any help/clues are appreciated.

      <UNKNOWN> -> ** UNRESOLVED AbstractDemandMetaData$DemandDependencyItem@1aee513{n
      ame=persistence.units:unitName=mmogwidgets dependsOn=null whenRequired=Described
       resolved=false demand=jboss.jca:name=mmogwidgetsDatasource,service=DataSourceBi
      nding} **
      
      
       at org.jboss.embedded.DeploymentGroup.checkIncomplete(DeploymentGroup.ja
      va:151)
       at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:129)
       at org.jboss.embedded.tomcat.WebinfScanner.lifecycleEvent(WebinfScanner.
      java:88)
       ... 24 more


        • 1. Re: Trouble Deploying Seam App To Tomcat
          strickla

          Sorry I should have mentioned: I'm using Tomcat 6.0.13 and Seam 2.0 Beta1

          also, here is my components.xml:

          <?xml version="1.0" encoding="UTF-8"?>
          <components xmlns="http://jboss.com/products/seam/components"
           xmlns:core="http://jboss.com/products/seam/core"
           xmlns:persistence="http://jboss.com/products/seam/persistence"
           xmlns:drools="http://jboss.com/products/seam/drools"
           xmlns:security="http://jboss.com/products/seam/security"
           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/persistence http://jboss.com/products/seam/persistence-2.0.xsd
           http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.0.xsd
           http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
           http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-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 debug="@debug@" jndi-pattern="@jndiPattern@"/>
          
           <core:manager concurrent-request-timeout="500"
           conversation-timeout="120000"
           conversation-id-parameter="cid"/>
          
           <transaction:ejb-transaction/>
          
           <!--
           <persistence:managed-persistence-context name="entityManager"
           auto-create="true"
           entity-manager-factory="#{mmogwidgetsEntityManagerFactory}"/>
          
           <persistence:entity-manager-factory name="mmogwidgetsEntityManagerFactory"
           persistence-unit-name="mmogwidgets"/>
          
           <drools:rule-base name="securityRules">
           <drools:rule-files><value>/security.drl</value></drools:rule-files>
           </drools:rule-base>
          
           -->
          
           <security:identity authenticate-method="#{authenticator.authenticate}"
           security-rules="#{securityRules}"
           remember-me="true"/>
          
           <event type="org.jboss.seam.notLoggedIn">
           <action expression="#{redirect.captureCurrentView}"/>
           </event>
           <event type="org.jboss.seam.postAuthenticate">
           <action expression="#{redirect.returnToCapturedView}"/>
           </event>
          
           <!--
          
           <mail:mail-session host="localhost" port="2525" username="test" password="test" />
           -->
           <!-- For use with jBPM pageflow or process management -->
           <!--
           <bpm:jbpm>
           <bpm:process-definitions></bpm:process-definitions>
           <bpm:pageflow-definitions></bpm:pageflow-definitions>
           </bpm:jbpm>
           -->
          
          </components>
          


          • 2. Re: Trouble Deploying Seam App To Tomcat
            gavin.king

            Looks like it has not deployed the persistence unit named "mmogwidgets". Is persistence.xml deployed correctly?

            • 3. Re: Trouble Deploying Seam App To Tomcat
              strickla

              No I don't think it was because I was initially confused as to the package structure of the deployed booking.war that I tried to mimic...here's a question. Why does seam setup not generate a project structure or build.xml that is equivalent to the seam examples?

              It would be trivial for me to duplicate the war setup for my project to be deployed to tomcat if all I had to do was run ant deploy.tomcat on MY project.

              As it is, it isn't trivial to move that target or Its dependency targets over to the generated build.xml because of the project structure differences.

              • 4. Re: Trouble Deploying Seam App To Tomcat
                strickla

                I've also noticed that I can't seem to have more than one Seam application deployed on Tomcat at once. It looks like including libs like jboss-seam.jar in each of your deployed applications causes problems.

                The following exceptions are generated:

                INFO: Deploying web application archive jboss-seam-booking.war
                ERROR 06-07 16:16:28,828 (DeployerWrapper.java:commitDeploy:177) -Error during
                deployment: vfsfile:/C:/apache/apache-tomcat-6.0.13/webapps/jboss-seam-booking/W
                EB-INF/lib/jboss-seam.jar
                org.jboss.deployers.spi.DeploymentException: java.lang.IllegalStateException: Co
                ntainer jboss.j2ee:jar=jboss-seam.jar,name=TimerServiceDispatcher,service=EJB3 i
                s already registered
                 at org.jboss.ejb3.deployers.EJBRegistrationDeployer.deploy(EJBRegistrati
                onDeployer.java:167)
                 at org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer.commitDep
                loy(AbstractSimpleDeployer.java:52)
                 at org.jboss.deployers.plugins.deployer.DeployerWrapper.commitDeploy(Dep
                loyerWrapper.java:170)
                 at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(
                MainDeployerImpl.java:592)
                 at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainD
                eployerImpl.java:476)
                 at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainD
                eployerImpl.java:406)
                 at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:128)
                 at org.jboss.embedded.tomcat.WebinfScanner.lifecycleEvent(WebinfScanner.
                java:88)
                 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
                eSupport.java:117)
                 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
                236)
                 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
                .java:791)
                 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:77
                1)
                 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
                
                 at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
                
                 at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714
                )
                 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490
                )
                 at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1206)
                 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
                :293)
                 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
                eSupport.java:117)
                 at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBas
                e.java:1337)
                 at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
                rocessChildren(ContainerBase.java:1601)
                 at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
                rocessChildren(ContainerBase.java:1610)
                 at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.r
                un(ContainerBase.java:1590)
                 at java.lang.Thread.run(Thread.java:595)
                Caused by: java.lang.IllegalStateException: Container jboss.j2ee:jar=jboss-seam.
                jar,name=TimerServiceDispatcher,service=EJB3 is already registered
                 at org.jboss.ejb3.Ejb3Registry.register(Ejb3Registry.java:80)
                 at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:465)
                 at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:410)
                 at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:392)
                 at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:358)
                 at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:313)
                 at org.jboss.ejb3.deployers.EJBRegistrationDeployer.deploy(EJBRegistrati
                onDeployer.java:157)
                 ... 23 more
                WARN 06-07 16:16:30,859 (JBossTimerServiceFactory.java:restoreTimerService:112)
                 -TIMER SERVICE IS NOT INSTALLED
                Jul 6, 2007 4:16:31 PM org.apache.tomcat.util.modeler.Registry registerComponent
                
                SEVERE: Null component Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/j
                boss-seam-booking,J2EEApplication=none,J2EEServer=none
                Jul 6, 2007 4:16:31 PM org.apache.catalina.startup.HostConfig deployWAR
                SEVERE: Error deploying web application archive jboss-seam-booking.war
                java.lang.RuntimeException: org.jboss.deployers.spi.IncompleteDeploymentExceptio
                n: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
                
                *** DEPLOYMENTS IN ERROR: Name -> Error
                
                vfsfile:/C:/apache/apache-tomcat-6.0.13/webapps/jboss-seam-booking/WEB-INF/lib/j
                boss-seam.jar -> java.lang.IllegalStateException: Container jboss.j2ee:jar=jboss
                -seam.jar,name=TimerServiceDispatcher,service=EJB3 is already registered
                
                
                 at org.jboss.embedded.tomcat.WebinfScanner.lifecycleEvent(WebinfScanner.
                java:92)
                 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
                eSupport.java:117)
                 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
                236)
                 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
                .java:791)
                 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:77
                1)
                 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
                
                 at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
                
                 at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714
                )
                 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490
                )
                 at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1206)
                 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
                :293)
                 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
                eSupport.java:117)
                 at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBas
                e.java:1337)
                 at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
                rocessChildren(ContainerBase.java:1601)
                 at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
                rocessChildren(ContainerBase.java:1610)
                 at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.r
                un(ContainerBase.java:1590)
                 at java.lang.Thread.run(Thread.java:595)
                Caused by: org.jboss.deployers.spi.IncompleteDeploymentException: Summary of inc
                omplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
                
                *** DEPLOYMENTS IN ERROR: Name -> Error
                
                vfsfile:/C:/apache/apache-tomcat-6.0.13/webapps/jboss-seam-booking/WEB-INF/lib/j
                boss-seam.jar -> java.lang.IllegalStateException: Container jboss.j2ee:jar=jboss
                -seam.jar,name=TimerServiceDispatcher,service=EJB3 is already registered
                
                
                 at org.jboss.embedded.DeploymentGroup.checkIncomplete(DeploymentGroup.ja
                va:151)
                 at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:129)
                 at org.jboss.embedded.tomcat.WebinfScanner.lifecycleEvent(WebinfScanner.
                java:88)
                 ... 16 more


                • 5. Re: Trouble Deploying Seam App To Tomcat
                  gavin.king

                  Yeah, I don't know the answer to this problem myself. Please chase Bill on this one. Thanks.

                  • 6. Re: Trouble Deploying Seam App To Tomcat

                    Theres an issue in JIRA to track this. http://jira.jboss.com/jira/browse/JBSEAM-1663