Announcement Announcement Module
Collapse
No announcement yet.
Going nuts on a simple flow: "The requested resource() is not available" Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Going nuts on a simple flow: "The requested resource() is not available"

    Something, obviously, is terribly wrong in my setup because I'm getting the error message:

    HTTP Status 404
    The requested resource () is not available

    On a simple invocation of my flow.

    Here's what my webflow config looks like:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:webflow="http://www.springframework.org/schema/webflow-config"
           xsi:schemaLocation="http://www.springframework.org/schema/beans
                               http://www.springframework.org/schema/beans/spring-beans.xsd
                               http://www.springframework.org/schema/webflow-config
                               http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd">
    
    <!-- WEBFLOW -->
    
        <bean id="incidentFlowHandler" class="org.springframework.webflow.mvc.servlet.FlowController">
            <property name="flowExecutor" ref="flowExecutor" />
            <property name="redirectHttp10Compatible" value="true" />
        </bean>
    
        <webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices">
            <webflow:flow-location path="/WEB-INF/flows/incident-flow.xml" id="incident" />
             <!--<webflow:flow-location-pattern value="/**/*-flow.xml" />-->
        </webflow:flow-registry>
    
        <!-- Plugs in a custom creator for Web Flow views -->
        <!--view-factory-creator="mvcViewFactoryCreator"-->
        <webflow:flow-builder-services id="flowBuilderServices" view-factory-creator="mvcViewFactoryCreator" development="true"/>
    
        <bean id="mvcViewFactoryCreator"
              class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator">
             <!--this is required for voiceXML usesage - since the default is _eventID and the underscore-->
                 <!--is not allowed in VoiceXML parameter names -->
            <property name="eventIdParameterName" value="eventID" />
            <property name="viewResolvers">
                <list>
                    <ref bean="vxmlViewResolver" />
                </list>
            </property>
        </bean>
    
        <webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry">
            <!-- webflow has some great features to help handle returning to previous states when
                 the user hits the back button... etc. but VoiceXML doesn't ever use the "back button"
                 so we disbale the execution snapshots and save the resources -->
            <!-- If snapshots are enabled, the entire object graph that makes up the model for the 
                flow must also be serializable - which currently is not the case for some of our objects -->
            <webflow:flow-execution-repository max-executions="5" max-execution-snapshots="0" />
        </webflow:flow-executor>
    </beans>
    Here's my dispatcher-servlet config:
    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:webflow="http://www.springframework.org/schema/webflow-config"
           xmlns:context="http://www.springframework.org/schema/context"
           xsi:schemaLocation="http://www.springframework.org/schema/beans
                               http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                               http://www.springframework.org/schema/webflow-config
                               http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd
                               http://www.springframework.org/schema/context
                               http://www.springframework.org/schema/context/spring-context-2.5.xsd
                               ">
    
        <bean id="handlerMapping"
            class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
            <property name="mappings">
                <props>
                    <!-- although they are mapped here, flows are defined in the webflow-config.xml file -->
                    <prop key="/incident.vxml">incidentFlowHandler</prop>
                </props>
            </property>        
       </bean>
    
    
       <!-- Enables convention-based request URL mapping to @Controllers (ex: /person/* maps to PersonController) -->
        <bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping">
            <property name="order" value="1"/>
        </bean>
    
        <bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter" />
        <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>
        <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>
    
        <bean id="vxmlViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
            <property name="requestContextAttribute" value="requestContext"/>
            <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
            <property name="prefix" value="/WEB-INF/views/ivr/" />
            <property name="suffix" value=".jsp" />
            <property name="order" value="1" />
        </bean>
    
    </beans>
    Here's the flow definition for the flow that is called:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <flow xmlns="http://www.springframework.org/schema/webflow"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://www.springframework.org/schema/webflow
                              http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
    
        <input name="incidentUID" required="true" />
    
        <on-start>
            <evaluate expression="incidentService.findByIncidentUID(incidentUID)"
                      result="flowScope.incident"
                      result-type="com.foo.notificationSystem.domain.Incident" />
        </on-start>
    
        <view-state id="incidentOutbound" view="incidentOutbound" >
            <transition on="submit" to="incidentComplete"/>
        </view-state>
    
        <end-state id="incidentComplete" view="incidentOutbound" />
        
    </flow>
    And finally, here's a snippet of the debug log when it is rendering the view:
    http://pastebin.com/f3c9a5e45


    The view is in the right spot, and gets resolved - if I move or delete the incdentOutbound.jsp I get a different error - so something funky seems to be going on when Tomcat goes to grab the view and render it...

    But the error is "The requested resource () is not available." which makes me wonder why it is not even requesting a resource - normally that error has the name of the resource being requested...

    Anyone have any ideas on how I can fix this?

  • #2
    There was a simple solution

    I had my the path *.jsp being mapped to my dispatcher servlet - which then caused requests to /WEB-INF/ jsp pages to be send to the dispatcher servlet - which didn't have any idea what to do with the jsp urls.

    changing that fixed this first error. (I'm still fighting a few other things to get it all running properly)

    Comment

    Working...
    X