This week we set up a developoment environment on a new PC for a JavaEE project using Tomcat 8.5 (we downloaded the recently released version 8.5.49 to be specific).
We started up the IDE, deployed the WAR on a Tomcat server and ran into the following error:
javax.faces.view.facelets.TagAttributeException: [...] Could not Resolve Variable [Overflow]: ...
After some research using our favorite search engine we came across:
So… sounds like there is a recursive file include?
Strangely some weeks ago the project ran on our old developoment environment that had a Tomcat 8.5.14…
Also these posts were relatively old… Well, we started to try to resolve the error.
As a test we removed the includes and the error disappeared. When we added one of the includes it showed up again.
Next I changed the relative paths like (
<ui:include src="../test.xhtml" />) to absolute paths like (
<ui:include src="/app/testfolder/test.xhtml" />) and the error disappeared again.
Weird… so relative paths don’t work in the latest Tomcat version? Such a major change in a minor version update?
We searched for patch notes but could not find any that were related to our problem.
In a small test project I set up I could reproduce the error, so it was not related to a configuration.
As a next step I tried to start the testproject in an older Tomcat version (8.5.47) and could not reproduce the stackoverflow.
I also tried it with the latest Tomcat release (9.0.29) which resulted in the same error and the previous version (9.0.27) which also turned out to be fine.
Is this a Bug and not a feature? Searching the Tomcat Bugzilla resulted in https://bz.apache.org/bugzilla/show_bug.cgi?id=63969
A bug in the Tomcat versions 8.5.49 and 9.0.29.
So if you come across a Stackoverflow in VariableMapperWrapper like
javax.el.ELException: Could not Resolve Variable [Overflow]:
And you are using Tomcat 8.5.49 or 9.0.29 You have the following options:
- Change all relative include paths to absolute paths starting with
- Switch to an older / newer Tomcat version (The bug is already resolved in 8.5.50-dev and 9.0.30-dev, I don’t think they will wait very long with the release of these two)
I Hope this helped you not waste as much time on this problem as me…
Thank you for reading!