Gwt2.4+Hibernate3.6.7+Spring3.0.6整合

当GWT2.4与Hibernate整合时会出现


Caused by: org.hibernate.HibernateException: Unable to build the default ValidatorFactory

    at org.hibernate.cfg.beanvalidation.TypeSafeActivator.getValidatorFactory(TypeSafeActivator.java:383) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]

    at org.hibernate.cfg.beanvalidation.TypeSafeActivator.applyDDL(TypeSafeActivator.java:109) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]

    ... 91 more

Caused by: javax.validation.ValidationException: Unable to find a default provider

    at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:264) [validation-api-1.0.0.GA.jar:]

    at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:111) [validation-api-1.0.0.GA.jar:]

    at org.hibernate.cfg.beanvalidation.TypeSafeActivator.getValidatorFactory(TypeSafeActivator.java:380) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]

    ... 92 more

 

这是因为Gwt2.4中带有validation-api-1.0.0.GA.jar

取消validation-api-1.0.0.GA.jar这个即可

 

你可能感兴趣的:(spring,gwt,Hiberante)