Announcement Announcement Module
Collapse
No announcement yet.
Getting a 404 in a flow but no errors in logs Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting a 404 in a flow but no errors in logs

    I'm trying to serve Webflows out of a JAR as per this post http://www.redcode.nl/blog/2009/12/s...ets-into-jars/

    I've got everything configured up, and type in the URL to hit the flow:

    localhost:9080/InsureFacesConfigurationConsole/spring/main-flow

    In the logs I get no errors (see below), but my browser juss gives me a 404, not on a facelet, but on the flow url itself:

    Error 404: /InsureFacesConfigurationConsole/spring/main-flow?execution=e2s1

    Any ideas ?

    Code:
    [26/04/10 12:35:11:640 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,640 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <DispatcherServlet with name 'productbuilder' determining Last-Modified value for [/InsureFacesConfigurationConsole/spring/main-flow]>
    [26/04/10 12:35:11:640 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,640 DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - <Mapping [/spring/main-flow] to handler 'org.springframework.webflow.mvc.servlet.FlowController@5a8c5a8c'>
    [26/04/10 12:35:11:640 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,640 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Last-Modified value for [/InsureFacesConfigurationConsole/spring/main-flow] is: -1>
    [26/04/10 12:35:11:640 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,640 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <DispatcherServlet with name 'productbuilder' processing request for [/InsureFacesConfigurationConsole/spring/main-flow]>
    [26/04/10 12:35:11:640 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,640 DEBUG [org.springframework.webflow.executor.FlowExecutorImpl] - <Launching new execution of flow 'main-flow' with input null>
    [26/04/10 12:35:11:640 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,640 DEBUG [org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl] - <Getting FlowDefinition with id 'main-flow'>
    [26/04/10 12:35:11:640 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,640 DEBUG [org.springframework.webflow.engine.impl.FlowExecutionImplFactory] - <Creating new execution of 'main-flow'>
    [26/04/10 12:35:11:640 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,640 DEBUG [org.springframework.webflow.engine.impl.FlowExecutionImpl] - <Starting in [email protected]6 with input null>
    [26/04/10 12:35:11:640 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,640 DEBUG [org.springframework.webflow.engine.ViewState] - <Entering state 'mainMenu' of flow 'main-flow'>
    [26/04/10 12:35:11:640 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,640 DEBUG [org.springframework.webflow.conversation.impl.SessionBindingConversationManager] - <Putting conversation attribute 'name' with value main-flow>
    [26/04/10 12:35:11:640 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,640 DEBUG [org.springframework.webflow.conversation.impl.SessionBindingConversationManager] - <Putting conversation attribute 'caption' with value null>
    [26/04/10 12:35:11:640 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,640 DEBUG [org.springframework.webflow.conversation.impl.SessionBindingConversationManager] - <Putting conversation attribute 'description' with value null>
    [26/04/10 12:35:11:640 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,640 DEBUG [org.springframework.webflow.conversation.impl.SessionBindingConversationManager] - <Putting conversation attribute 'flowExecutionSnapshotGroup' with value org.springframework.webflow.execution.repository.impl.SimpleFlowExecutionSnapshotGroup@26642664>
    [26/04/10 12:35:11:640 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,640 DEBUG [org.springframework.webflow.engine.impl.FlowExecutionImpl] - <Assigned key e2s1>
    [26/04/10 12:35:11:640 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,640 DEBUG [org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository] - <Putting flow execution '[FlowExecutionImpl@12a812a8 flow = 'main-flow', flowSessions = list[[FlowSessionImpl@188e188e flow = 'main-flow', state = 'mainMenu', scope = map['viewScope' -> map[[empty]]]]]]' into repository>
    [26/04/10 12:35:11:640 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,640 DEBUG [org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository] - <Adding snapshot to group with id 1>
    [26/04/10 12:35:11:656 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,640 DEBUG [org.springframework.webflow.conversation.impl.SessionBindingConversationManager] - <Putting conversation attribute 'scope' with value map['flashScope' -> map['messagesMemento' -> map[[null] -> list[[empty]]]]]>
    [26/04/10 12:35:11:656 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.webflow.mvc.servlet.FlowHandlerAdapter] - <Sending flow execution redirect to '/InsureFacesConfigurationConsole/spring/main-flow?execution=e2s1'>
    [26/04/10 12:35:11:656 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Null ModelAndView returned to DispatcherServlet with name 'productbuilder': assuming HandlerAdapter completed request handling>
    [26/04/10 12:35:11:656 BST] 0000002f SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Successfully completed request>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <DispatcherServlet with name 'productbuilder' determining Last-Modified value for [/InsureFacesConfigurationConsole/spring/main-flow]>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - <Mapping [/spring/main-flow] to handler 'org.springframework.webflow.mvc.servlet.FlowController@5a8c5a8c'>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Last-Modified value for [/InsureFacesConfigurationConsole/spring/main-flow] is: -1>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <DispatcherServlet with name 'productbuilder' processing request for [/InsureFacesConfigurationConsole/spring/main-flow]>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.webflow.executor.FlowExecutorImpl] - <Resuming flow execution with key 'e2s1>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.webflow.conversation.impl.SessionBindingConversationManager] - <Locking conversation 2>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository] - <Getting flow execution with key 'e2s1'>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl] - <Getting FlowDefinition with id 'main-flow'>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.webflow.engine.impl.FlowExecutionImpl] - <Resuming in [email protected]fa>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [net.targetgroup.web.CustomClassPathContextResource] - <in getPathWithContext. Path is flows/security/main/mainMenu>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [net.targetgroup.web.CustomClassPathContextResource] - <in getPathWithContext. Path is flows/security/main/mainMenu>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.webflow.engine.ViewState] - <Rendering + [JSFView = '/flows/security/main/mainMenu']>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.webflow.engine.ViewState] - <  Flash scope = map[[empty]]>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.webflow.engine.ViewState] - <  Messages = [DefaultMessageContext@d480d48 sourceMessages = map[[null] -> list[[empty]]]]>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository] - <Putting flow execution '[FlowExecutionImpl@12a812a8 flow = 'main-flow', flowSessions = list[[FlowSessionImpl@188e188e flow = 'main-flow', state = 'mainMenu', scope = map['viewScope' -> map[[empty]]]]]]' into repository>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository] - <Adding snapshot to group with id 1>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.webflow.conversation.impl.SessionBindingConversationManager] - <Putting conversation attribute 'scope' with value map['flashScope' -> map['messagesMemento' -> map[[empty]]]]>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.webflow.conversation.impl.SessionBindingConversationManager] - <Unlocking conversation 2>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Null ModelAndView returned to DispatcherServlet with name 'productbuilder': assuming HandlerAdapter completed request handling>
    [26/04/10 12:35:11:656 BST] 0000002e SystemOut     O 2010-04-26 12:35:11,656 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Successfully completed request>

  • #2
    I suggest checking again, it doesn't give you an error on the url (check the logs it says that it maps and executes a flow). So the logic conclusion is that it simply doesn't find/locate the view specified in the view state of your flow.

    Comment


    • #3
      Originally posted by Marten Deinum View Post
      I suggest checking again, it doesn't give you an error on the url (check the logs it says that it maps and executes a flow). So the logic conclusion is that it simply doesn't find/locate the view specified in the view state of your flow.
      Thanks. I've checked again and it simply doesn't hit the view resolver I have set up in the a chain of view resolvers. My chain is this:
      Code:
      <bean id="faceletsViewResolver" class="net.targetgroup.web.FaceletsViewResolver">
      		<property name="requestContextAttribute" value="requestContext" />
      		<property name="viewClass" value="org.springframework.faces.mvc.JsfView" />
      		<property name="order" value="0" />
      	</bean>
      	
      	<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
              <property name="viewClass"><value>org.springframework.web.servlet.view.JstlView</value></property>
              <property name="prefix"><value>/WEB-INF/jsp/</value></property>
              <property name="suffix"><value>.jsp</value></property>
              <property name="order"><value>1</value></property>
          </bean>
      The source code for my Facelet's view resolver is below (but somewhat academic, as the resolver never gets hit):
      Code:
      public class FaceletsViewResolver extends UrlBasedViewResolver implements
      		Ordered {
      	/**
      	 * Overrides loadView in UrlBasedViewResolver to be able to make a
      	 * difference when letting the other views in the chain take control of the
      	 * request
      	 * 
      	 * @see org.springframework.web.servlet.view.UrlBasedViewResolver#loadView(String,java.util.Locale)
      	 */
      	protected View loadView(String viewName, Locale locale) throws Exception {
      		AbstractUrlBasedView view = buildView(viewName);
      		View viewObj = (View) getApplicationContext()
      				.getAutowireCapableBeanFactory().initializeBean(view, viewName);
      		if (viewObj instanceof JsfView) {
      			JsfView jv = (JsfView) viewObj;
      			if (jv.getBeanName().indexOf("optionsb") == -1) {
      				return null;
      			}
      		}
      
      		return viewObj;
      	}
      }

      Comment


      • #4
        And have you also registered those with Webflow? If you don't those will not be used.

        Comment

        Working...
        X