Change By: Hardy Ferentschik (06/Jun/13 11:47 AM)
Comment: I'm running into this issue as well (exactly as described above), though with Tomcat 7. I've done some investigation and I think I can shed some light on what is happening.

First, I see that there is a follow-up issue to fail fast on initialization if the required dependencies aren't available. While that's probably a good thing to do, it doesn't help with the reported issue. Note the second part of the report, where he (and I as well) includes the dependencies explicitly. This results in a LinkageError.

Here's what is happening:

1) Tomcat has jsp-api-2.1.jar, which has its own copy of javax.el.ExpressionFactory. This is an older version of that class--one that doesn't include the newInstance() method.

2) Hibernate Validator 5.0.1 on the other hand depends upon EL API 2.2, whose ExpressionFactory class *does* include newInstance(), which HV calls.

If we leave the dependency off (i.e. treat it as a provided dependency in the Maven or Gradle sense), then the version is too old for what HV expects. But if we add the dependency, then we get the LinkageError, since two different classloaders are trying to load the same class. (In this case they happen to be different versions of the class, but the same problem would arise if the versions were the same.)

I think this issue should be reopened.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira