Wednesday, November 08, 2006

spring webflow 1.0 build fails

Keywords:
spring webflow 1.0 build sample

Problem:
Downloaded the latest spring webflow distribution (1.0) and trying to build (just a sample app. in this case) causes NoClassDefFoundError errors ... but surely this is shipped with the right libraries?

ivy.configure:
[echo] reading ivy config
[ivy:configure] :: Ivy 1.4 - 20061009124215 :: http://ivy.jayasoft.org/ ::

BUILD FAILED
java.lang.NoClassDefFoundError: org/apache/commons/httpclient/UsernamePasswordCredentials


Solution:
It's not enough to make sure you have Java 1.5+ and Ant 1.6+ ... these must also not have different versions of the dependent libraries.

In my case, there was an different version of apache commons-httpclient in the ant/lib folder ... removing this from the /lib folder or pointing at a 'clean' version of Ant resolves the issue.

No comments: