Java Tomcat

javax.el.ELException: Function ‘:empty’ not found

After installing Continuum 1.1 and Archiva 1.1.1 a number of web pages failed to load throwing exceptions such as javax.el.ELException: Function ‘:empty’ not found. As it turns out, this has to do with Tomcat version 6.0.18 and the EL library that it comes with.

As always, when on Linux, a script can fix things and save a lot of time. So here is my attempt at “fixing” java webapps (such as Continuum and Archiva) which encounter this error.

# This script modifies EL expressions to run on Tomcat 6.0.18

find $1 -name *.jsp -print | xargs sed -i -e "s/empty(/empty (/g"
find $1 -name *.jspf -print | xargs sed -i -e "s/empty(/empty (/g"
find $1 -name *.tag -print | xargs sudo sed -i -e "s/empty(/empty (/g"

find $1 -name *.jsp -print | xargs sed -i -e "s/not(/not (/g"
find $1 -name *.jspf -print | xargs sed -i -e "s/not(/not (/g"
find $1 -name *.tag -print | xargs sudo sed -i -e "s/not(/not (/g"

All you need to do is create a script file with this contents then run the script file with the root directory of the java web application. For example, try the following:

 (copy and paste the script contents)
chmod +x
./ /var/www/vhosts/


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.