9 Replies Latest reply on Aug 30, 2006 8:23 AM by camunda

    Problem in deploying a Seam Project into Tomcat

    mnrz

      Hi all
      I am new to Seam framework. I want to deploy one of the examples of the Seam framework (jboss-seam-numberguess) into Tomcat (ver. 5.5.9 with Jdk5) but during deployment following exception occurs:

      -------------------
      ERROR 02-07 16:35:43,578 (Log4JLogger.java:error:119) -Exception sending context initialized event to listene
      r instance of class org.jboss.seam.servlet.SeamListener
      java.lang.NullPointerException
      at sun.beans.editors.BoolEditor.setAsText(BoolEditor.java:38)
      at org.jboss.seam.Component.initInitializers(Component.java:314)
      at org.jboss.seam.Component.(Component.java:209)
      at org.jboss.seam.Component.(Component.java:159)
      at org.jboss.seam.Component.(Component.java:154)
      at org.jboss.seam.Component.(Component.java:149)
      at org.jboss.seam.init.Initialization.addComponent(Initialization.java:381)
      at org.jboss.seam.init.Initialization.addComponents(Initialization.java:255)
      at org.jboss.seam.init.Initialization.init(Initialization.java:195)
      at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:32)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
      at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:788)
      at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:677)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:473)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
      at org.apache.catalina.core.StandardService.start(StandardService.java:450)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
      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.catalina.startup.Bootstrap.start(Bootstrap.java:271)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
      Jul 2, 2006 4:35:43 PM org.apache.catalina.core.StandardContext start
      SEVERE: Error listenerStart
      Jul 2, 2006 4:35:43 PM org.apache.catalina.core.StandardContext start
      SEVERE: Context [/jboss-seam-numberguess] startup failed due to previous errors

      ---------------
      please help me out, it really confused me. I didnt change any line of the codes or configuration file everything is the same as in seam framework zip file.

      any help will be appreciated.

      regards
      mohammad

        • 1. Re: Problem in deploying a Seam Project into Tomcat
          gavin.king

          That is _extremely_ wierd. It is working perfectly for me on Tomcat 5.5.12.

          Do you have any other applications installed in the server?

          • 2. Re: Problem in deploying a Seam Project into Tomcat
            mnrz

             

            "gavin.king@jboss.com" wrote:
            That is _extremely_ wierd. It is working perfectly for me on Tomcat 5.5.12.

            Do you have any other applications installed in the server?


            Hi
            yes I have some other application, but first of all I delete any additional jar file from the tomcat lib directory and tried to deploy my seam application but the problem didnt resolved. let me tell you, I put every needed jar files on the lib directory of the project, afterwards, I put some of them in the lib of tomcat. just that, I never did any thing else.

            thanks



            • 3. Re: Problem in deploying a Seam Project into Tomcat
              gavin.king

              Just to make sure, you have deployed the example by typing "ant deploy.tomcat" in a totally fresh unzip of the Seam distributing, right? Not by some other means...

              • 4. Re: Problem in deploying a Seam Project into Tomcat
                mnrz

                No I am using Eclipse to run the Ant task. but again, I tried to build a war file myself to deploy it.

                Are you mean I do it in command console by typing "ant..."?

                • 5. Re: Problem in deploying a Seam Project into Tomcat
                  gavin.king

                  Definitely don't try to build the war file yourself.

                  The Ant task does some replacements of @foo@ in components.xml.

                  • 6. Re: Problem in deploying a Seam Project into Tomcat
                    mnrz

                    Hi Gavin

                    I ran the command "ant deploy.tomcat" and ant build a war file to deploy into Tomcat but still the problem exists. however, the error message has been changed to this:
                    ----------
                    INFO: Deploying web application archive jboss-seam-numberguess.war
                    ERROR 03-07 08:30:50,031 (Log4JLogger.java:error:119) -Exception sending context initialized event to listene
                    r instance of class com.sun.faces.config.ConfigureListener
                    javax.faces.FacesException: java.lang.ClassCastException: org.jboss.seam.jsf.SeamPhaseListener
                    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:336)
                    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669)
                    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104)
                    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
                    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
                    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
                    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:788)
                    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:677)
                    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:473)
                    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102)
                    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
                    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
                    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
                    at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
                    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
                    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
                    at org.apache.catalina.core.StandardService.start(StandardService.java:450)
                    at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
                    at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
                    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.catalina.startup.Bootstrap.start(Bootstrap.java:271)
                    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
                    Caused by: java.lang.ClassCastException: org.jboss.seam.jsf.SeamPhaseListener
                    at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:741)
                    at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:400)
                    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:332)
                    ... 24 more
                    INFO 03-07 08:30:50,406 (Log4JLogger.java:info:94) -Reading standard config org/apache/myfaces/resource/stan
                    dard-faces-config.xml
                    INFO 03-07 08:30:51,562 (Log4JLogger.java:info:94) -Reading config jar:file:/E:/Tomcat/jakarta-tomcat-5.5.9/
                    webapps/jboss-seam-numberguess/WEB-INF/lib/jboss-seam.jar!/META-INF/faces-config.xml
                    INFO 03-07 08:30:51,593 (Log4JLogger.java:info:94) -Reading config /WEB-INF/faces-config.xml
                    WARN 03-07 08:30:51,828 (Log4JLogger.java:warn:104) -Locale name in faces-config.xml null or empty, setting
                    locale to default locale : fa_IR
                    WARN 03-07 08:30:52,250 (Log4JLogger.java:warn:104) -There should only be one Seam phase listener per applic
                    ation
                    INFO 03-07 08:30:52,296 (Log4JLogger.java:info:94) -ServletContext 'E:\Tomcat\jakarta-tomcat-5.5.9\webapps\j
                    boss-seam-numberguess\' initialized.
                    INFO 03-07 08:30:52,296 (Log4JLogger.java:info:94) -Welcome to Seam 1.0.1.GA
                    INFO 03-07 08:30:52,328 (Log4JLogger.java:info:94) -reading components.xml
                    INFO 03-07 08:30:52,968 (Log4JLogger.java:info:94) -reading properties from: /seam.properties
                    INFO 03-07 08:30:52,984 (Log4JLogger.java:info:94) -reading properties from: /jndi.properties
                    INFO 03-07 08:30:53,000 (Log4JLogger.java:info:94) -initializing Seam
                    INFO 03-07 08:30:53,187 (Log4JLogger.java:info:94) -Component: org.jboss.seam.core.init, scope: APPLICATION,
                    type: JAVA_BEAN, class: org.jboss.seam.core.Init
                    INFO 03-07 08:30:53,890 (Log4JLogger.java:info:94) -Component: org.jboss.seam.core.pages, scope: APPLICATION
                    , type: JAVA_BEAN, class: org.jboss.seam.core.Pages
                    INFO 03-07 08:30:53,953 (Log4JLogger.java:info:94) -Component: events, scope: APPLICATION, type: JAVA_BEAN,
                    class: org.jboss.seam.core.Events
                    INFO 03-07 08:30:53,984 (Log4JLogger.java:info:94) -Component: org.jboss.seam.core.manager, scope: EVENT, ty
                    pe: JAVA_BEAN, class: org.jboss.seam.core.Manager
                    INFO 03-07 08:30:54,078 (Log4JLogger.java:info:94) -Component: switcher, scope: PAGE, type: JAVA_BEAN, class
                    : org.jboss.seam.core.Switcher
                    INFO 03-07 08:30:54,109 (Log4JLogger.java:info:94) -Component: redirect, scope: CONVERSATION, type: JAVA_BEA
                    N, class: org.jboss.seam.core.Redirect
                    INFO 03-07 08:30:54,140 (Log4JLogger.java:info:94) -Component: httpError, scope: APPLICATION, type: JAVA_BEA
                    N, class: org.jboss.seam.core.HttpError
                    INFO 03-07 08:30:54,171 (Log4JLogger.java:info:94) -Component: userPrincipal, scope: APPLICATION, type: JAVA
                    _BEAN, class: org.jboss.seam.core.UserPrincipal
                    INFO 03-07 08:30:54,203 (Log4JLogger.java:info:94) -Component: isUserInRole, scope: APPLICATION, type: JAVA_
                    BEAN, class: org.jboss.seam.core.IsUserInRole
                    INFO 03-07 08:30:54,234 (Log4JLogger.java:info:94) -Component: conversation, scope: CONVERSATION, type: JAVA
                    _BEAN, class: org.jboss.seam.core.Conversation
                    INFO 03-07 08:30:54,281 (Log4JLogger.java:info:94) -Component: conversationList, scope: PAGE, type: JAVA_BEA
                    N, class: org.jboss.seam.core.ConversationList
                    INFO 03-07 08:30:54,312 (Log4JLogger.java:info:94) -Component: conversationStack, scope: PAGE, type: JAVA_BE
                    AN, class: org.jboss.seam.core.ConversationStack
                    INFO 03-07 08:30:54,343 (Log4JLogger.java:info:94) -Component: facesContext, scope: APPLICATION, type: JAVA_
                    BEAN, class: org.jboss.seam.core.FacesContext
                    INFO 03-07 08:30:54,375 (Log4JLogger.java:info:94) -Component: pageContext, scope: APPLICATION, type: JAVA_B
                    EAN, class: org.jboss.seam.core.PageContext
                    INFO 03-07 08:30:54,453 (Log4JLogger.java:info:94) -Component: eventContext, scope: APPLICATION, type: JAVA_
                    BEAN, class: org.jboss.seam.core.EventContext
                    INFO 03-07 08:30:54,468 (Log4JLogger.java:info:94) -Component: sessionContext, scope: APPLICATION, type: JAV
                    A_BEAN, class: org.jboss.seam.core.SessionContext
                    INFO 03-07 08:30:54,500 (Log4JLogger.java:info:94) -Component: statelessContext, scope: APPLICATION, type: J
                    AVA_BEAN, class: org.jboss.seam.core.StatelessContext
                    INFO 03-07 08:30:54,531 (Log4JLogger.java:info:94) -Component: applicationContext, scope: APPLICATION, type:
                    JAVA_BEAN, class: org.jboss.seam.core.ApplicationContext
                    INFO 03-07 08:30:54,546 (Log4JLogger.java:info:94) -Component: conversationContext, scope: APPLICATION, type
                    : JAVA_BEAN, class: org.jboss.seam.core.ConversationContext
                    INFO 03-07 08:30:54,578 (Log4JLogger.java:info:94) -Component: businessProcessContext, scope: APPLICATION, t
                    ype: JAVA_BEAN, class: org.jboss.seam.core.BusinessProcessContext
                    INFO 03-07 08:30:54,609 (Log4JLogger.java:info:94) -Component: locale, scope: STATELESS, type: JAVA_BEAN, cl
                    ass: org.jboss.seam.core.Locale
                    INFO 03-07 08:30:54,640 (Log4JLogger.java:info:94) -Component: messages, scope: SESSION, type: JAVA_BEAN, cl
                    ass: org.jboss.seam.core.Messages
                    INFO 03-07 08:30:54,671 (Log4JLogger.java:info:94) -Component: interpolator, scope: STATELESS, type: JAVA_BE
                    AN, class: org.jboss.seam.core.Interpolator
                    INFO 03-07 08:30:54,703 (Log4JLogger.java:info:94) -Component: facesMessages, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.FacesMessages
                    INFO 03-07 08:30:54,750 (Log4JLogger.java:info:94) -Component: resourceBundle, scope: SESSION, type: JAVA_BE
                    AN, class: org.jboss.seam.core.ResourceBundle
                    INFO 03-07 08:30:54,781 (Log4JLogger.java:info:94) -Component: localeSelector, scope: SESSION, type: JAVA_BE
                    AN, class: org.jboss.seam.core.LocaleSelector
                    INFO 03-07 08:30:54,828 (Log4JLogger.java:info:94) -Component: uiComponent, scope: STATELESS, type: JAVA_BEA
                    N, class: org.jboss.seam.core.UiComponent
                    INFO 03-07 08:30:54,843 (Log4JLogger.java:info:94) -Component: org.jboss.seam.remoting.messaging.subscriptio
                    nRegistry, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.remoting.messaging.SubscriptionRegistry
                    INFO 03-07 08:30:54,890 (Log4JLogger.java:info:94) -Component: pojoCache, scope: APPLICATION, type: JAVA_BEA
                    N, class: org.jboss.seam.core.PojoCache
                    INFO 03-07 08:30:54,968 (Log4JLogger.java:info:94) -Component: org.jboss.seam.debug.introspector, scope: EVE
                    NT, type: JAVA_BEAN, class: org.jboss.seam.debug.Introspector
                    INFO 03-07 08:30:55,093 (Log4JLogger.java:info:94) -Component: org.jboss.seam.debug.contexts, scope: APPLICA
                    TION, type: JAVA_BEAN, class: org.jboss.seam.debug.Contexts
                    INFO 03-07 08:30:55,125 (Log4JLogger.java:info:94) -Component: actor, scope: SESSION, type: JAVA_BEAN, class
                    : org.jboss.seam.core.Actor
                    INFO 03-07 08:30:55,140 (Log4JLogger.java:info:94) -Component: org.jboss.seam.core.process, scope: CONVERSAT
                    ION, type: JAVA_BEAN, class: org.jboss.seam.core.Process
                    INFO 03-07 08:30:55,171 (Log4JLogger.java:info:94) -Component: org.jboss.seam.core.pageflow, scope: CONVERSA
                    TION, type: JAVA_BEAN, class: org.jboss.seam.core.Pageflow
                    INFO 03-07 08:30:55,234 (Log4JLogger.java:info:94) -Component: transition, scope: CONVERSATION, type: JAVA_B
                    EAN, class: org.jboss.seam.core.Transition
                    INFO 03-07 08:30:55,250 (Log4JLogger.java:info:94) -Component: pooledTask, scope: APPLICATION, type: JAVA_BE
                    AN, class: org.jboss.seam.core.PooledTask
                    INFO 03-07 08:30:55,312 (Log4JLogger.java:info:94) -Component: taskInstance, scope: APPLICATION, type: JAVA_
                    BEAN, class: org.jboss.seam.core.TaskInstance
                    INFO 03-07 08:30:55,343 (Log4JLogger.java:info:94) -Component: processInstance, scope: APPLICATION, type: JA
                    VA_BEAN, class: org.jboss.seam.core.ProcessInstance
                    INFO 03-07 08:30:55,359 (Log4JLogger.java:info:94) -Component: taskInstanceList, scope: APPLICATION, type: J
                    AVA_BEAN, class: org.jboss.seam.core.TaskInstanceList
                    INFO 03-07 08:30:55,390 (Log4JLogger.java:info:94) -Component: pooledTaskInstanceList, scope: APPLICATION, t
                    ype: JAVA_BEAN, class: org.jboss.seam.core.PooledTaskInstanceList
                    INFO 03-07 08:30:55,421 (Log4JLogger.java:info:94) -Component: taskInstanceListForType, scope: APPLICATION,
                    type: JAVA_BEAN, class: org.jboss.seam.core.TaskInstanceListForType
                    INFO 03-07 08:30:55,453 (Log4JLogger.java:info:94) -Component: jbpmContext, scope: EVENT, type: JAVA_BEAN, c
                    lass: org.jboss.seam.core.ManagedJbpmContext
                    INFO 03-07 08:30:55,500 (Log4JLogger.java:info:94) -Component: org.jboss.seam.core.jbpm, scope: APPLICATION,
                    type: JAVA_BEAN, class: org.jboss.seam.core.Jbpm
                    INFO 03-07 08:30:55,562 (Log4JLogger.java:info:94) -scanning: /E:/Tomcat/jakarta-tomcat-5.5.9/webapps/jboss-
                    seam-numberguess/WEB-INF/lib/jboss-seam-numberguess.jar
                    WARN 03-07 08:30:55,578 (Log4JLogger.java:warn:104) -Component class should be serializable: numberGuess
                    INFO 03-07 08:30:55,593 (Log4JLogger.java:info:94) -Component: numberGuess, scope: CONVERSATION, type: JAVA_
                    BEAN, class: org.jboss.seam.example.numberguess.NumberGuess
                    INFO 03-07 08:30:56,390 (Log4JLogger.java:info:94) -done initializing Seam
                    Jul 3, 2006 8:30:56 AM org.apache.catalina.core.StandardContext start
                    SEVERE: Error listenerStart
                    Jul 3, 2006 8:30:56 AM org.apache.catalina.core.StandardContext start
                    SEVERE: Context [/jboss-seam-numberguess] startup failed due to previous errors
                    Jul 3, 2006 8:30:56 AM org.apache.catalina.startup.HostConfig deployWAR

                    -------------
                    now as you can see it can not register the listener.

                    thank you in advance

                    • 7. Re: Problem in deploying a Seam Project into Tomcat
                      mnrz

                      if you see the error messages somewhere it warned :

                      WARN 03-07 08:30:52,250 (Log4JLogger.java:warn:104) -There should only be one Seam phase listener per application

                      and it seems there are more than one listener registered, however, it might be a useless warning.

                      • 8. Re: Problem in deploying a Seam Project into Tomcat
                        mnrz

                        Resolved

                        I deleted all useless jar files of Tomcal lib directory and undeployed other application and also use ant command to deploy the project. and now everything is OK.

                        thank you so much Gavin

                        • 9. Re: Problem in deploying a Seam Project into Tomcat
                          camunda

                          I ran into the same problems while building the war file with my own build file.

                          But the exception only occurs if you forget to replace the properties @xxx@ in the components.xml. If I replace them with ant, everything is fine...