Announcement Announcement Module
Collapse
No announcement yet.
Need Help! spring-webflow-samples\swf-booking-richfaces Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need Help! spring-webflow-samples\swf-booking-richfaces

    Need some help! - new bee

    1) Downloaded: spring-webflow-2.0.0.RELEASE.zip
    2) executed ant from under build-spring-webflow directory.
    3) Was able to deploy "booking-faces" samples on Tomcat 6.x using eclispe 3.3.x
    4) Got the "swf-booking-richfaces.zip" from Jira
    5) Extracted under "spring-webflow-samples" directory.
    6) PS: Did not make any changes to the source code.
    7) ant successfull with few warning.
    8) Deployed on Tomcat. Getting this error message.

    What am I doing wrong? any help appreciated.

    --- ERROR BEGIN ---
    May 6, 2008 5:02:28 PM org.apache.catalina.core.StandardContext addApplicationListener
    INFO: The listener "org.springframework.web.context.ContextLoaderList ener" is already configured for this context. The duplicate definition has been ignored.
    May 6, 2008 5:02:28 PM org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListe ner
    java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListe ner
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1360)
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1206)
    at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:3786)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4350)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(Sta ndardService.java:516)
    at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalin a.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:413)
    May 6, 2008 5:02:28 PM org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Skipped installing application listeners due to previous error(s)
    May 6, 2008 5:02:28 PM org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    May 6, 2008 5:02:28 PM org.apache.catalina.core.StandardContext start
    SEVERE: Context [/swf-booking-faces] startup failed due to previous errors
    May 6, 2008 5:02:28 PM org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    May 6, 2008 5:02:28 PM org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    May 6, 2008 5:02:28 PM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/31 config=null
    May 6, 2008 5:02:28 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 617 ms

    --- ERROR END ---

  • #2
    Attachment of the Eclipse Env screen shot

    Attachment of the Eclipse Env screen shot

    Comment


    • #3
      Did you do an "ant jar" prior to bringing the project into Eclipse (see readme.txt)? Also, I'm using Q4E Maven plugin which resolved all the M2_REPO definitions in the build path to get things going.

      HTH,

      Comment


      • #4
        Yes: I did run ant and then ant jar

        Lou: thank you for replying.

        Yes I did run ant and then ant jar.

        One thing I am not able to understand is that in the log, it say listener is already configured for this context and then says same class not found.

        INFO: The listener "org.springframework.web.context.ContextLoaderList ener" is already configured for this context. The duplicate definition has been ignored.
        May 7, 2008 12:40:45 AM org.apache.catalina.core.StandardContext listenerStart
        SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListe ner
        java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListe ner
        at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1360)
        at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1206)



        Can any one tell me why is this happening?
        Am I missing any jars?

        Appreciate your response.

        Directory of C:\Test\spring-webflow-2.0.0.RELEASE\projects\spring-webflow-samples\swf-booking-richfaces\target\war-expanded\WEB-INF\lib

        05/07/2008 12:19 AM <DIR> .
        05/07/2008 12:19 AM <DIR> ..
        05/06/2008 02:19 PM 443,717 com.springsource.antlr-2.7.6.jar
        05/06/2008 02:18 PM 305,030 com.springsource.com.sun.facelets-1.1.14.jar
        05/06/2008 02:20 PM 799,317 com.springsource.com.sun.faces-1.2.0.08.jar
        05/06/2008 02:19 PM 193,019 com.springsource.edu.oswego.cs.dl.util.concurrent-1.3.4.jar
        05/06/2008 02:19 PM 464,134 com.springsource.javassist-3.3.0.ga.jar
        05/06/2008 02:19 PM 342,522 com.springsource.javax.faces-1.2.0.08.jar
        05/06/2008 02:18 PM 53,767 com.springsource.javax.persistence-1.0.0.jar
        05/06/2008 02:18 PM 21,247 com.springsource.javax.servlet.jsp.jstl-1.1.2.jar
        05/06/2008 02:18 PM 9,856 com.springsource.javax.transaction-1.1.0.jar
        05/06/2008 02:19 PM 328,786 com.springsource.net.sf.cglib-2.1.3.jar
        05/06/2008 02:19 PM 4,608 com.springsource.org.aopalliance-1.0.0.jar
        05/06/2008 02:19 PM 47,405 com.springsource.org.apache.commons.codec-1.3.0.jar
        05/06/2008 02:19 PM 578,877 com.springsource.org.apache.commons.collections-3.2.0.jar
        05/06/2008 02:19 PM 209,682 com.springsource.org.apache.commons.lang-2.1.0.jar
        05/06/2008 02:19 PM 61,465 com.springsource.org.apache.commons.logging-1.1.1.jar
        05/06/2008 02:18 PM 396,732 com.springsource.org.apache.log4j-1.2.15.jar
        05/06/2008 02:19 PM 398,361 com.springsource.org.apache.taglibs.standard-1.1.2.jar
        05/06/2008 02:19 PM 314,484 com.springsource.org.dom4j-1.6.1.jar
        05/06/2008 02:18 PM 2,299,256 com.springsource.org.hibernate-3.2.6.ga.jar
        05/06/2008 02:18 PM 267,841 com.springsource.org.hibernate.annotations-3.3.0.ga.jar
        05/06/2008 02:19 PM 67,589 com.springsource.org.hibernate.annotations.common-3.3.0.ga.jar
        05/06/2008 02:18 PM 118,390 com.springsource.org.hibernate.ejb-3.3.1.ga.jar
        05/06/2008 02:18 PM 705,823 com.springsource.org.hsqldb-1.8.0.9.jar
        05/06/2008 02:18 PM 135,864 com.springsource.org.jboss.el-2.0.0.GA.jar
        05/06/2008 02:19 PM 425,432 com.springsource.org.jboss.util-2.0.4.GA.jar
        05/06/2008 02:19 PM 26,710 com.springsource.org.objectweb.asm-1.5.3.jar
        05/06/2008 02:19 PM 17,181 com.springsource.org.objectweb.asm.attrs-1.5.3.jar
        05/06/2008 02:18 PM 325,444 org.springframework.aop-2.5.4.A.jar
        05/06/2008 02:18 PM 483,785 org.springframework.beans-2.5.4.A.jar
        05/06/2008 02:20 PM 118,814 org.springframework.binding-2.0.0.RELEASE.jar
        05/06/2008 02:18 PM 467,482 org.springframework.context-2.5.4.A.jar
        05/06/2008 02:18 PM 285,159 org.springframework.core-2.5.4.A.jar
        05/06/2008 02:19 PM 121,205 org.springframework.faces-2.0.0.RELEASE.jar
        05/06/2008 02:18 PM 316,292 org.springframework.jdbc-2.5.4.A.jar
        05/06/2008 02:19 PM 1,018,124 org.springframework.js-2.0.0.RELEASE.jar
        05/06/2008 02:19 PM 371,901 org.springframework.orm-2.5.4.A.jar
        05/06/2008 02:19 PM 717,688 org.springframework.security-2.0.0.A.jar
        05/06/2008 02:19 PM 226,890 org.springframework.transaction-2.5.4.A.jar
        05/06/2008 02:19 PM 187,132 org.springframework.web-2.5.4.A.jar
        05/06/2008 02:19 PM 400,959 org.springframework.web.servlet-2.5.4.A.jar
        05/06/2008 02:19 PM 486,167 org.springframework.webflow-2.0.0.RELEASE.jar
        04/15/2008 01:05 PM 153,587 richfaces-api-3.2.0.SR1.jar
        04/15/2008 01:46 PM 1,401,172 richfaces-impl-3.2.0.SR1.jar
        04/15/2008 01:48 PM 2,268,288 richfaces-ui-3.2.0.SR1.jar

        Comment


        • #5
          Originally posted by arun_prakash View Post

          One thing I am not able to understand is that in the log, it say listener is already configured for this context and then says same class not found.
          I have the same message. The message is caused (in my case) because of the below definitions in the XML File:

          Code:
          	<context-param>
          		<param-name>contextConfigLocation</param-name>
          		<param-value>
          			/WEB-INF/web-application-config.xml
          		</param-value>
          	</context-param>
          and the same in:

          Code:
          	<!-- The front controller of this Spring Web application, responsible for handling all application requests -->
          	<servlet>
          		<servlet-name>Spring Web MVC Dispatcher Servlet</servlet-name>
          		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
          		<init-param>
          			<param-name>contextConfigLocation</param-name>
          			<param-value>
          				/WEB-INF/web-application-config.xml
          			</param-value>
          		</init-param>
          		<load-on-startup>2</load-on-startup>
          	</servlet>
          I have tried to only have the definition once but Tomcat does not like to boot afterwards This issue was not worth to me spending much time because it is just a warning.

          In case somebody knows how to get rid of that warning I would be interested as well.

          - Peter

          Comment


          • #6
            Originally posted by arun_prakash View Post
            Can any one tell me why is this happening?
            Am I missing any jars?
            Yes, it looks like you're missing the Spring MVC jars. You'll need those for the classes it mentions.

            Also, I use the MyFaces 1.2.2 jars, but that's probably not your problem here.

            Comment


            • #7
              Got it working!

              (1) Needed to add 2 more Jars - commons-beanutils.jar, commons-digester.jar

              (2) Needed to make some changes to Web.xml
              - Get the correct Resource Servlet (org.springframework.js.resource.ResourceServlet)

              (2) Needed to update web-application-config.xml
              - Point to correct schema location i.e.
              http://www.springframework.org/schema/faces
              http://www.springframework.org/schem...-faces-2.0.xsd

              - Removed <constructor-org/> for flowExecutor
              <bean id="flowController" class="org.springframework.webflow.mvc.servlet.Flo wController">
              <property name="flowExecutor" ref="flowExecutor"/>
              <property name="ajaxHandler">
              <bean class="org.springframework.faces.richfaces.RichFac esAjaxHandler"/>
              </property>
              </bean>

              - Was getting ("the expression path did not resolve--is the base variable spelled correctly?"). Needed to update this section.
              <!-- Configures the Spring Web Flow JSF integration -->
              <faces:flow-builder-services id="facesFlowBuilderServices" enable-managed-beans="true" />

              (3) Needed to update /flow/booking.xml. Replace entityManager.persist by persistenceContext.persist
              <on-start>
              <evaluate expression="bookingService.findHotelById(id)" result="flowScope.hotel" />
              <evaluate expression="hotel.createBooking(bookingService.fin dUser(currentUser.name))" result="flowScope.booking" />
              <evaluate expression="persistenceContext.persist(booking)" /> </on-start>

              Now the samples is working, let me understand how all this work!

              Thank you Luo & Peter for responding.

              Comment


              • #8
                Error while deploying richfaces+spring webflow example in tomcat 6.0

                Spring Webflow + richfaces example

                Downloaded file: swf-booking-richfaces.zip (105 kB)


                While deploying in tomcat 6.0, it throws the following error:

                org.springframework.beans.factory.xml.XmlBeanDefin itionStoreException: Line 73 in XML document from ServletContext resource [/WEB-INF/web-application-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'faces:flow-builder-services'.


                The web-application-config.xml has the following lines:

                <!-- Configures the Spring Web Flow JSF integration -->
                <faces:flow-builder-services id="facesFlowBuilderServices" />


                where is the problem?

                Comment


                • #9
                  The same problem after I've upgraded from 2.0.4 to 2.0.6.
                  Any suggestions?

                  Comment


                  • #10
                    It looks like it happened because webflow module doesn't include faces module in 2.0.6. So one needs to add it manually in pom.

                    Comment

                    Working...
                    X