Running Roo Applications in Tomcat 5.5
I used Spring Roo for a small, public web application recently, and all went well until I attempted to deploy it on a hosted VPS. The application didn’t deploy, and I got the dreaded error message:
java.lang.NoClassDefFoundError: javax/el/ValueExpression
A little poking around led me to this Roo bug report that details the problem. Roo generates a dependency in your pom.xml that isn’t supported by Tomcat 5.5
I was developing and testing the application on Tomcat 6, and failed to check what version of Tomcat was available for deployment.
The fix for this issue is to swap out the version of the jstl library in your pom.xml
Replace
<dependency> <groupId>javax.servlet</groupId> <artifactId>com.springsource.javax.servlet.jsp.jstl</artifactId> <version>1.2.0</version> </dependency>
with
<dependency> <groupId>javax.servlet</groupId> <artifactId>com.springsource.javax.servlet.jsp.jstl</artifactId> <version>1.1.2</version> </dependency>
and your Roo application should work fine in both Tomcat 5.5 and Tomcat 6