org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class
(I had to shorten the article title to fit!)
I’ve just had a problem when I’ve taken a web application from my local Tomcat 5.5 development server (where it worked fine) and uploaded it onto a public server (also using Tomcat 5.5).
I copied the whole application including all the jars in the WEB-INF/lib directory. The web application started up fine and showed up in the Manager as running properly, but when I went to the home page (index.jsp), I got an error saying that there were problems reading the TLD (I am using SiteMesh) in one of the jars, and in particular that it couldn’t instantiate or load the TagExtraInfo class.
Disabling SiteMesh didn’t help, though I discovered it only affected JSPs not HTML pages or Groovy Server Pages.
Comparing the list of Jars in WEB-INF/lib with another application that worked, I discovered that I had included jsp-api-2.0.jar. Removing this jar and restarting the application from the manager sorted the problem.
I’m not sure why I didn’t get the same error on the development server but presumably the problem arises from version incompatibilities.
If you get similar problems, try making sure that you haven’t got this extra Jar in your WEB-INF/lib directory.