问题
my work place is migrating from Jboss 6 to Jboss 7.
We use v 5.1.3 Hibernate Validator, and when we tried to deploy our web application in the Jboss 7 server, and it threw an exception.
09:23:56,031 ERROR [org.jboss.as.controller.management-operation] (External Management Request Threads -- 4) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
("deployment" => "ROOT.war"),
("subsystem" => "jaxrs"),
("rest-resource" => "org.apache.cxf.rs.security.oauth.services.RequestTokenService")
]): javax.validation.ValidationException: RESTEASY008520: Unable to load Validation support
Caused by: javax.validation.ValidationException: Unable to find providerclass org.hibernate.validator.HibernateValidator
I am not overly familiar with ether Jboss and Hibernate Validator, and tried googling the issue with little success.
回答1:
Look here https://coredump.su/questions/35063076/how-can-i-disable-javaxvalidationapi-in-jboss-64. Try add this to your jboss-deployment-structure.xml:
<exclude-subsystems>
<subsystem name="jaxrs"/>
</exclude-subsystems>
<exclusions>
<module name="javaee.api"/>
<module name="javax.validation.api"/>
<module name="javax.faces.api"/>
<module name="org.hibernate.validator"/>
</exclusions>
Maybe you have conflict with jboss modules.
来源:https://stackoverflow.com/questions/54695336/jboss-7-migration-validationexception-unable-to-find-provider-hibernatevalid