Pro Spring MVC: with Web Flow – Sample Application Fails To Start

Update (1-8-2012): Please download the most recent version of the sources from either the GitHub repository or from the Apress website. This version fixes the problem with the project dependencies.

You arrived at this page because of 2 reasons. First you bought Pro Spring MVC: with Web Flow for which I would like to thank you and I really hope it is a valuable addition to your book shelve. Secondly you are trying to run the sample application which ships with the book but the application fails to start/deploy (and sometimes also has some compilation errors), for this we are really sorry and we apologize for the inconvenience that has given you. We also read books and we know that there is nothing so frustrating as a book with source code and the sources don’t compile or the sample doesn’t work.

STS Startup Error

The Problem

For some reason the Gradle tooling we choose sometimes fails to correctly resolve and reference projects in the same workspace, this is either due to some error in our build file (despite all the testing we did) or it is an error/undocumented feature of the Gradle Tooling. However as a reader it doesn’t really help you. (See GRADLE-2409).

When one now deploys the application you get a nice stack trace as shown on the left (click for larger image). This is, believe us, not the experience we wanted you to have. Following are a couple of workarounds which can help you get it to work, meanwhile we will also try to fix the build script so that the tooling resolves correctly. You can always get the most recent sources from our GitHub repository this you can always fork or download as a ZIP file.

Continue reading “Pro Spring MVC: with Web Flow – Sample Application Fails To Start”

Advertisements