1

As per the migration guide, Spring 4.0 requires Hibernate Validator in version 4.3 or later and Tomcat in version 6.0.33 or later.

Hibernate Validator 4.3 depends upon EL 2.2 won't work with Tomcat 6.0.33 comes with EL 2.1. It will give below error:

NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory)

My app is deployed in Tomcat 6 and I do not have the rights to update the EL libs.

In this scenario, how to migrate to Spring 4.0 with Tomcat 6?

Vikas Sharma
  • 1,235
  • 2
  • 27
  • 53

2 Answers2

0

Hibernate Validator 4.3 depends upon EL 2.2 won't work with Tomcat 6.0.33 comes with EL 2.1

That's not correct. Hibernate Validator 5.x depends on EL. You can find more information on how to get Validator 5 working on Tomcat here - http://hibernate.org/validator/faq/#does-hibernate-validator-5-x-work-with-tomcat-6. However, it will require that you update the libraries.

In the case of Hibernate Validator 4.3, no EL libraries are needed.

Hardy
  • 18,659
  • 3
  • 49
  • 65
  • My mistake. The error is due to Spring 4 migration not Hibernate Validator upgrade to 4.3. spring-beans and spring-webmvc of Spring 4 depends on EL 2.2.4 version. So, now my question is how to deploy Spring 4 app on Tomcat 6 as it comes with EL 2.1 ? – Vikas Sharma Feb 20 '14 at 06:11
  • I have created new Question instead of modifying existing Question for the above problem. Please check [here](http://stackoverflow.com/questions/21950607/abstractmethoderror-on-deploying-spring-4-0-in-tomcat-6) – Vikas Sharma Feb 22 '14 at 06:25
0

You may use Tomcat 6 with Hibernate Validator 5.x by forking Hibernate Validator and EL 2.2. See more info on http://javaetmoi.com/2015/10/hibernate-validator-5-sur-conteneur-servlet-2-5/

Antoine
  • 196
  • 1
  • 5