1 2 Previous Next 18 Replies Latest reply on Jun 13, 2006 11:37 AM by Vamsi Poondla

    SEAM configuration problem

    Peter Repinc Newbie

      Hello

      I have tried to install and run SEAM configured Web application. I did make an EAR (symass.ear) archive which contains the folowing (symass is the name of the application:

      /META-INF/application.xml
      /META-INF/jboss-app.xml
      /jboss-seam.jar
      /symass.war

      application.xml contains the folowing:


      <display-name>SymAss</display-name>
      SymAss Prototype


      <web-uri>symass.war</web-uri>
      <context-root>/symass</context-root>




      jboss-app.xml contains the folowing:

      <jboss-app>
      <loader-repository>seam.jboss.org:loader=symass</loader-repository>
      </jboss-app>

      Symass war is packaged like this

      /index.xhtml
      /main.xhtml
      /WEB-INF/web.xml
      /WEB-INF/faces-config.xml
      /WEB-INF/faces-config-seam.xml
      /WEB-INF/lib contains all relevant libraries for facelets

      web.xml is defined like this:

      <?xml version="1.0"?>

      <!--
      * Copyright 2004 The Apache Software Foundation.
      *
      * Licensed under the Apache License, Version 2.0 (the "License");
      * you may not use this file except in compliance with the License.
      * You may obtain a copy of the License at
      *
      * http://www.apache.org/licenses/LICENSE-2.0
      *
      * Unless required by applicable law or agreed to in writing, software
      * distributed under the License is distributed on an "AS IS" BASIS,
      * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      * See the License for the specific language governing permissions and
      * limitations under the License.
      -->

      <web-app version="2.4"
      xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

      <!-- Seam Listener, that does all the startup work (configuration, init). -->

      <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>


      <!-- Seam - global JNDI name pattern for jboss EJB3 (change for other servers) -->
      <context-param>
      <param-name>org.jboss.seam.core.init.jndiPattern</param-name>
      <param-value>satchmo/#{ejbName}/local</param-value>
      </context-param>

      <context-param>
      <param-name>org.jboss.seam.core.init.componentClasses</param-name>
      <param-value>org.jboss.seam.core.Jbpm</param-value>
      </context-param>

      <!-- 300 second conversation timeout -->
      <context-param>
      <param-name>org.jboss.seam.core.manager.conversationTimeout</param-name>
      <param-value>300000</param-value>
      </context-param>

      <!-- JSF config files -->
      <context-param>
      <param-name>javax.faces.CONFIG_FILES</param-name>
      <param-value>/WEB-INF/faces-config.xml,/WEB-INF/faces-config-seam.xml</param-value>
      </context-param>

      <!-- JSF default suffix for view documents -->
      <context-param>
      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
      <param-value>.xhtml</param-value>
      </context-param>

      <!-- Propagate conversations across redirects -->

      <filter-name>Seam Redirect Filter</filter-name>
      <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>


      <filter-mapping>
      <filter-name>Seam Redirect Filter</filter-name>
      <url-pattern>*.seam</url-pattern>
      </filter-mapping>

      <!-- MyFaces specific filter extensions -->

      <filter-name>extensionsFilter</filter-name>
      <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
      <init-param>
      <param-name>uploadMaxFileSize</param-name>
      <param-value>100m</param-value>
      </init-param>
      <init-param>
      <param-name>uploadThresholdSize</param-name>
      <param-value>100k</param-value>
      </init-param>
      <!-- <init-param>
      <param-name>uploadRepositoryPath</param-name>
      <param-value>/temp</param-value>
      Set the path where the intermediary files will be stored.

      </init-param>-->


      <filter-mapping>
      <filter-name>extensionsFilter</filter-name>
      <url-pattern>*.seam</url-pattern>
      </filter-mapping>

      <!-- MyFaces -->

      <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>


      <context-param>
      <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
      <param-value>true</param-value>
      </context-param>

      <context-param>
      <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
      <param-value>true</param-value>
      </context-param>

      <context-param>
      <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
      <param-value>true</param-value>
      </context-param>

      <!-- JSF state saving configuration -->
      <context-param>
      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
      <param-value>client</param-value>
      </context-param>

      <!-- Facelets configuration parameters -->
      <context-param>
      <param-name>facelets.REFRESH_PERIOD</param-name>
      <param-value>2</param-value>
      </context-param>

      <context-param>
      <param-name>facelets.DEVELOPMENT</param-name>
      <param-value>true</param-value>
      </context-param>


      <servlet-name>Faces Servlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>


      <!-- Faces Servlet Mapping -->
      <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.seam</url-pattern>
      </servlet-mapping>

      <!-- Welcome Files -->
      <welcome-file-list>
      <welcome-file>index.xhtml</welcome-file>
      </welcome-file-list>
      </web-app>

      faces-config.xml is defined:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
      <faces-config>

      <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
      <locale-config>
      <default-locale>sl_SI</default-locale>
      </locale-config>

      </faces-config>

      faces-config-seam.xml is defined like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
      <faces-config>
      <!-- Select one of the three standard persistence lifecycle models for the Seam application -->

      <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
      <!--phase-listener>org.jboss.seam.jsf.SeamTransactionManagedPersistencePhaseListener</phase-listener-->
      <!--phase-listener>org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener</phase-listener-->

      </faces-config>


      This is what i get when deploying symass.ear to the container (JBoss 4.0.4 RC 1)

      13:42:43,675 INFO [JkMain] Jk running ID=0 time=0/79 config=null
      13:42:43,706 INFO [Server] JBoss (MX MicroKernel) [4.0.4RC1 (build: CVSTag=JBoss_4_0_4_RC1 date=200602071519)] Started in 54s:344ms
      13:44:08,628 WARN [MainDeployer] undeploy 'file:/D:/odateam/ApplicationServers/jboss-4.0.4/server/default/deploy/symass.ear' : package not deployed
      13:44:08,721 INFO [EARDeployer] Init J2EE application: file:/D:/odateam/ApplicationServers/jboss-4.0.4/server/default/deploy/symass.ear
      13:44:09,362 INFO [TomcatDeployer] deploy, ctxPath=/symass, warUrl=.../tmp/deploy/tmp18694symass.ear-contents/symass-exp.war/
      13:44:09,534 ERROR [[/symass]] Error configuring application listener of class org.jboss.seam.servlet.SeamListener
      java.lang.ClassNotFoundException: org.jboss.seam.servlet.SeamListener
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1338)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1187)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3640)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4127)
      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 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.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
      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:5031)
      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.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
      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.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297)
      at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
      at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
      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.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.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:974)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:417)
      at sun.reflect.GeneratedMethodAccessor5.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:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
      at $Proxy47.start(Unknown Source)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:469)
      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.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
      at $Proxy48.start(Unknown Source)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
      at sun.reflect.GeneratedMethodAccessor6.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:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:334)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:504)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:207)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:218)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:197)
      13:44:09,565 ERROR [[/symass]] Skipped installing application listeners due to previous error(s)


      Why I didn't put jboss-seam.jar inside WEB-INF/lib. Because I wanted to create application with EJBs and also all examples from SEAM are packaged in this way.
      I cannot understand why examples from SEAM work and my example does not work. I cannot find any clues what is different from SEAM examples.

      Best Regard
      Silvo Koren

        • 1. Re: SEAM configuration problem
          Peter Repinc Newbie

          By the way what I additionaly foud out is that "jboss-seam.jar" was not loaded into loader repository which I registered in jboss-app.xml but it was loaded in SEAM examples. Is there somethin I should configure additionally so that jboss-seam.jar will be picked up.

          Silvo Koren

          • 2. Re: SEAM configuration problem
            Keith Counsell Newbie

            How are you building the EAR/WAR? The Class-Path entry might not be populated in the manifest for your web app. Make sure that this line appears:

            Class-Path: jboss-seam.jar


            • 3. Re: SEAM configuration problem
              Peter Repinc Newbie

              Thank you SOOOOOOOO MUCHHHHH!!

              Silvo Koren

              • 4. Re: SEAM configuration problem
                David Bernard Newbie

                An other option (when you can't overwrite Manifest like me) is to add the following code into application.xml :

                 <module>
                 <java>jboss-seam-1.0-beta2.jar</java>
                 </module>
                


                • 5. Re: SEAM configuration problem
                  Gavin King Master

                  I guess that is a better way to do it, actually. I should update the examples....

                  • 7. Re: SEAM configuration problem
                    j f Newbie

                    I created a mainfest.mf file for seamapp.war as the following

                    Manifest-Version: 1.0
                    Ant-Version: Apache Ant 1.6.5
                    Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)
                    Class-Path: /WEB-INF/lib/myfaces-api.jar /WEB-INF/lib/jboss-seam.jar /
                    WEB-INF/lib/ejb3-persistence.jar WEB-INF/lib/hibernate-annotations.ja
                    r WEB-INF/lib/jboss-annotations-ejb3.jar /WEB-INF/lib/jboss-ejb3x.jar


                    However, I still get the following error

                    17:44:20,557 INFO [FacesConfigurator] Reading config /WEB-INF/faces-config.xml
                    17:44:20,637 ERROR [StartupServletContextListener] Error initializing ServletContext java.lang.IllegalArgumentException: Class org.jboss.seam.jsf.SeamNavigationHandler is no javax.faces.application.NavigationHandler

                    Please advice.

                    Thx.


                    • 8. Re: SEAM configuration problem
                      Gavin King Master

                      You should follow the example applications, don't try to "innovate" your own ways of setting up classpaths ;-)

                      • 9. Re: SEAM configuration problem
                        j f Newbie

                        Originally, I generated the ear file using the Hibernate Tool's build.xml file and follow the readme.txt but it did not work.

                        I found a suggestion below to put the class-path in mainfest.mf but I got a complaint that the jar file cannot be found and the logical approach is to have the path. I also tried the better one, that is to put in the application.xml but still no luck.

                        Can u pls tell me the url for the example applications?

                        Thanks.

                        • 10. Re: SEAM configuration problem
                          j f Newbie

                          I found the examples on-line and deployed to JBOSS with ejb3 profile successfully. It seems that the seam ear file from Hibernate Tools has some problems.

                          • 11. Re: SEAM configuration problem
                            j f Newbie

                            I found the examples on-line and deployed to JBOSS with ejb3 profile successfully. It seems that the Hibernate Tools has problem on generating reliable seam framework.

                            • 12. Re: SEAM configuration problem
                              Vamsi Poondla Newbie

                              I took seam-todo example and customized. I am facing the same issue.

                              I am using JBoss 4.0.4 GA, SEAM 1.0.0 CR3, jbpm-starters-kit-3.1.1, JBoss Rules 3.0.1

                              But I am able to deploy all example apps successfully. What could be the issue?

                              21:47:54,421 INFO [FacesConfigurator] Reading config /WEB-INF/faces-config.xml
                              21:47:54,546 ERROR [StartupServletContextListener] Error initializing ServletContext
                              java.lang.IllegalArgumentException: Class org.jboss.seam.jsf.SeamNavigationHandler is no javax.faces.application.NavigationHandler
                              at org.apache.myfaces.config.FacesConfigurator.getApplicationObject(FacesConfigurator.java:511)
                              at org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:433)
                              at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:130)
                              at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:63)
                              at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:46)
                              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)


                              1) My application.xml is

                              <display-name>CableDailies</display-name>



                              <web-uri>CableDailies.war</web-uri>
                              <context-root>/CableDailies</context-root>




                              <web-uri>jbpm.war</web-uri>
                              <context-root>/jbpm</context-root>



                              CableDailies.jar


                              jboss-seam.jar





                              • 13. Re: SEAM configuration problem
                                Vamsi Poondla Newbie

                                Sorry..I did not tag my code well in earlier post.

                                <application>
                                 <display-name>CableDailies</display-name>
                                
                                 <module>
                                 <web>
                                 <web-uri>CableDailies.war</web-uri>
                                 <context-root>/CableDailies</context-root>
                                 </web>
                                 </module>
                                 <module>
                                 <web>
                                 <web-uri>jbpm.war</web-uri>
                                 <context-root>/jbpm</context-root>
                                 </web>
                                 </module>
                                 <module>
                                 <ejb>CableDailies.jar</ejb>
                                 </module>
                                 <module>
                                 <java>jboss-seam.jar</java>
                                 </module>
                                
                                </application>


                                • 14. Re: SEAM configuration problem
                                  Gavin King Master

                                  This is a classloading issue.

                                  1 2 Previous Next