If you’re developing a new Servlet project and you’re using say Spring Web Flow with oh say, jboss-el (which I recommend), and you build using Maven2, watch out for the fact that the jboss-el pom definition pulls in the el-api jar. You’ll want to exclude that:
<dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-el</artifactId>
<version>2.0.0.GA</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
</exclusion>
</exclusions>
</dependency>
If you don’t exclude it, when you deploy to the container (i.e. Tomcat 6), you’ll see a fun message like this when you load up your JSP page:
java.lang.LinkageError: loader constraints violated when linking javax/el/ExpressionFactory class
It would have been nice if the jar file was ignored like the servlet-api is ignored if its pulled into the WAR file deployment.
el-api.jar Fun!
December 8th, 2008 | Java
0 comments ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment