Announcement Announcement Module
Collapse
No announcement yet.
Tiles definitions factory not found: TilesConfigurer not defined? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tiles definitions factory not found: TilesConfigurer not defined?

    I'm trying to upgrade from webflow 1.0.5 to 2.0.2 and I'm having some difficulty getting the new TilesConfigurer setup properly. Below is my attempt on upgrading my app-servlet.xml

    Code:
    <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-2.5.xsd
               http://www.springframework.org/schema/webflow-config
               http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd">
               
    
    	<bean name="/bca.lsw" class="org.springframework.webflow.mvc.servlet.FlowController">
    	    <property name="flowExecutor" ref="flowExecutor"/>
    	    <property name="flowUrlHandler">
    	        <bean class="org.springframework.webflow.context.servlet.WebFlow1FlowUrlHandler"/>
    	    </property>
    	</bean> 
    
    	<webflow:flow-executor id="flowExecutor" />	
    	
    	<webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices">
    		<webflow:flow-location-pattern value="/WEB-INF/flows/*-flow.xml" />	    
    	</webflow:flow-registry>	         
    
    	<webflow:flow-builder-services id="flowBuilderServices" view-factory-creator="mvcViewFactoryCreator"/>
    	
    	<bean id="mvcViewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator">
    	    <property name="viewResolvers" ref="tilesViewResolver"/>
    	</bean>    
    	
    	<bean id="tilesViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
    	    <property name="viewClass" value="org.springframework.web.servlet.view.tiles.TilesJstlView"/>
    	</bean>
    	
    	<bean id="tilesConfigurer"  class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
    		<property name="definitions">
    			<list>
    				<value>/WEB-INF/tiles-defs.xml</value>
    			</list>
    		</property>
    	</bean>	   	
    </beans>
    The exception thrown caused by: Tiles definitions factory not found: TilesConfigurer not defined?

    Code:
    [DEBUG] low.definition.registry.FlowDefinitionRegistryImpl  :  58 : Getting FlowDefinition with id 'welcome-flow'
    [DEBUG] ingframework.webflow.engine.impl.FlowExecutionImpl  : 252 : Resuming execution in [email protected]a
    [DEBUG] ingframework.webflow.engine.impl.FlowExecutionImpl  : 577 : Attempting to handle [org.springframework.webflow.execution.FlowExecutionException: Exception thrown in state 'welcomePage' of flow 'welcome-flow'] with root cause [org.springframework.context.ApplicationContextException: Tiles definitions factory not found: TilesConfigurer not defined?]
    [DEBUG] ingframework.webflow.engine.impl.FlowExecutionImpl  : 594 : Rethrowing unhandled flow execution exception
    [DEBUG] onversation.impl.SessionBindingConversationManager  :  99 : Unlocking conversation 1
    [DEBUG] org.springframework.web.servlet.DispatcherServlet   : 540 : Could not complete request
    org.springframework.webflow.execution.FlowExecutionException: Exception thrown in state 'welcomePage' of flow 'welcome-flow'
    	at org.springframework.webflow.engine.impl.FlowExecutionImpl.wrap(FlowExecutionImpl.java:557)
    	at org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:265)
    	at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:153)
    	at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:173)
    	at org.springframework.webflow.mvc.servlet.FlowController.handleRequest(FlowController.java:172)
    	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
    	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
    	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:523)
    	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:453)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    Below is the view-state in the welcome-flow.xml

    Code:
    <view-state id="welcomePage" view="welcome"/>
    "welcome" is defined in the tiles-defs.xml

    Code:
    <definition name="welcome" extends="template_basic">
        <put-attribute name="content" value="/WEB-INF/jsp/welcome.jsp"/>
    </definition>
    Any help pointing out what I'm doing wrong would be greatly appreciated.

  • #2
    I updated the view class to "tiles2.TilesView" and got past the error

    <bean id="tilesViewResolver" class="org.springframework.web.servlet.view.UrlBas edViewResolver">
    <property name="viewClass" value="org.springframework.web.servlet.view.tiles2 .TilesView"/>
    </bean>

    Comment


    • #3
      thank you so much for posting the solution, i almost gave up on this and then saw your solution and it works nicely now. Great job.

      Comment

      Working...
      X