First problem: The unit test failed.
Second problem: The main screen doe not work. See picture attached.
spring faces.jpg
Running org.springframework.webflow.samples.booking.MainFl owExecutionTests
DEBUG: org.springframework.webflow.engine.impl.FlowExecut ionImplFactory - Creating new execution of 'main-flow'
DEBUG: org.springframework.webflow.engine.impl.FlowExecut ionImpl - Starting in org.springframework.webflow.test.MockExternalConte xt@419d05 with input null
DEBUG: org.springframework.webflow.engine.Flow - Creating [FlowVariable@1abcc03 name = 'searchCriteria', valueFactory = [BeanFactoryVariableValueFactory@1deeb40 type = SearchCriteria]]
DEBUG: org.springframework.webflow.engine.ViewState - Entering state 'enterSearchCriteria' of flow 'main-flow'
DEBUG: org.springframework.webflow.engine.impl.FlowExecut ionImpl - Assigned key 1
DEBUG: org.springframework.webflow.engine.ViewState - Rendering + [MockViewFactoryCreator.MockView@3ae941 viewId = 'enterSearchCriteria']
DEBUG: org.springframework.webflow.engine.ViewState - Flash scope = map[[empty]]
DEBUG: org.springframework.webflow.engine.ViewState - Messages = [DefaultMessageContext@1a7ddcf sourceMessages = map[[null] -> list[[empty]]]]
DEBUG: org.springframework.webflow.execution.ActionExecut or - Executing [EvaluateAction@1d36dfe expression = bookingService.findBookings(currentUser?.name), resultExpression = viewScope.bookings]
DEBUG: org.springframework.webflow.execution.AnnotatedAct ion - Putting action execution attributes map[[empty]]
DEBUG: org.springframework.webflow.execution.AnnotatedAct ion - Clearing action execution attributes map[[empty]]
DEBUG: org.springframework.webflow.execution.ActionExecut or - Finished executing [EvaluateAction@1d36dfe expression = bookingService.findBookings(currentUser?.name), resultExpression = viewScope.bookings]; result = success
DEBUG: org.springframework.webflow.engine.impl.FlowExecut ionImplFactory - Creating new execution of 'main-flow'
DEBUG: org.springframework.webflow.engine.impl.FlowExecut ionImpl - Resuming in org.springframework.webflow.test.MockExternalConte xt@992bae
DEBUG: org.springframework.webflow.engine.Flow - Restoring [FlowVariable@2bd3a name = 'searchCriteria', valueFactory = [BeanFactoryVariableValueFactory@1d53f5b type = SearchCriteria]]
DEBUG: org.springframework.webflow.engine.ViewState - Event 'search' returned from view [MockViewFactoryCreator.MockView@1329642 viewId = 'enterSearchCriteria']
DEBUG: org.springframework.webflow.engine.Transition - Executing [Transition@26d607 on = search, to = reviewHotels]
DEBUG: org.springframework.webflow.engine.Transition - Exiting state 'enterSearchCriteria'
DEBUG: org.springframework.webflow.engine.ViewState - Entering state 'reviewHotels' of flow 'main-flow'
DEBUG: org.springframework.webflow.execution.ActionExecut or - Executing [SetAction@1ad98ef name = viewScope.hotels, value = searchCriteria.getDataModel(bookingService)]
DEBUG: org.springframework.webflow.execution.AnnotatedAct ion - Putting action execution attributes map[[empty]]
DEBUG: org.springframework.webflow.execution.AnnotatedAct ion - Clearing action execution attributes map[[empty]]
DEBUG: org.springframework.webflow.engine.impl.FlowExecut ionImpl - Attempting to handle [org.springframework.webflow.execution.ActionExecut ionException: Exception thrown executing [AnnotatedAction@138c63 targetAction = [SetAction@1ad98ef name = viewScope.hotels, value = searchCriteria.getDataModel(bookingService)], attributes = map[[empty]]] in state 'reviewHotels' of flow 'main-flow' -- action execution attributes were 'map[[empty]]'] with root cause [java.lang.Error: Unresolved compilation problem:
Type mismatch: cannot convert from HotelLazyDataModel to DataModel<Hotel>
]
DEBUG: org.springframework.webflow.engine.impl.FlowExecut ionImpl - Rethrowing unhandled flow execution exception
DEBUG: org.springframework.webflow.engine.impl.FlowExecut ionImplFactory - Creating new execution of 'main-flow'
DEBUG: org.springframework.webflow.engine.impl.FlowExecut ionImplFactory - Creating new execution of 'main-flow'
DEBUG: org.springframework.webflow.definition.registry.Fl owDefinitionRegistryImpl - Registering flow definition 'org.springframework.webflow.engine.Flow' under id 'booking'
DEBUG: org.springframework.webflow.engine.impl.FlowExecut ionImpl - Resuming in org.springframework.webflow.test.MockExternalConte xt@1cffeb4
DEBUG: org.springframework.webflow.engine.Flow - Restoring [FlowVariable@5b0668 name = 'searchCriteria', valueFactory = [BeanFactoryVariableValueFactory@1d5a0 type = SearchCriteria]]
DEBUG: org.springframework.webflow.engine.ViewState - Event 'book' returned from view [MockViewFactoryCreator.MockView@701a27 viewId = 'reviewHotel']
DEBUG: org.springframework.webflow.engine.Transition - Executing [Transition@1c50507 on = book, to = bookHotel]
DEBUG: org.springframework.webflow.engine.Transition - Exiting state 'reviewHotel'
DEBUG: org.springframework.webflow.engine.SubflowState - Entering state 'bookHotel' of flow 'main-flow'
DEBUG: org.springframework.binding.mapping.impl.DefaultMa pper - Beginning mapping between source [org.springframework.webflow.engine.impl.RequestCon trolContextImpl] and target [org.springframework.webflow.core.collection.LocalA ttributeMap]
DEBUG: org.springframework.binding.mapping.impl.DefaultMa pping - Adding mapping result [Success@1f64158 mapping = hotel.id -> hotelId, code = 'success', error = false, originalValue = 1, mappedValue = 1]
DEBUG: org.springframework.binding.mapping.impl.DefaultMa pper - Completing mapping between source [org.springframework.webflow.engine.impl.RequestCon trolContextImpl] and target [org.springframework.webflow.core.collection.LocalA ttributeMap]; total mappings = 1; total errors = 0
DEBUG: org.springframework.webflow.definition.registry.Fl owDefinitionRegistryImpl - Getting FlowDefinition with id 'booking'
DEBUG: org.springframework.webflow.engine.SubflowState - Calling subflow 'booking' with input map['hotelId' -> 1]
DEBUG: org.springframework.webflow.engine.EndState - Entering state 'bookingConfirmed' of flow 'booking'
DEBUG: org.springframework.webflow.engine.Flow - Restoring [FlowVariable@5b0668 name = 'searchCriteria', valueFactory = [BeanFactoryVariableValueFactory@1d5a0 type = SearchCriteria]]
DEBUG: org.springframework.webflow.engine.SubflowState - Mapping subflow output map[[empty]]
DEBUG: org.springframework.webflow.engine.Transition - Executing [Transition@3c2378 on = bookingConfirmed, to = finish]
DEBUG: org.springframework.webflow.engine.Transition - Exiting state 'bookHotel'
DEBUG: org.springframework.webflow.engine.EndState - Entering state 'finish' of flow 'main-flow'
DEBUG: org.springframework.webflow.engine.Transition - Completed transition execution. As a result, the flow execution has ended
DEBUG: org.springframework.webflow.engine.Transition - Completed transition execution. As a result, the flow execution has ended
Tests run: 4, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.265 sec <<< FAILURE!
Results :
Tests in error:
testSearchHotels(org.springframework.webflow.sampl es.booking.MainFlowExecutionTests)
testSelectHotel(org.springframework.webflow.sample s.booking.MainFlowExecutionTests)
Tests run: 7, Failures: 0, Errors: 2, Skipped: 0


Reply With Quote