Domanda

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?

È stato utile?

Soluzione

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.

Altri suggerimenti

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/

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top