Jboss 7 migration - ValidationException: Unable to find provider: HibernateValidator

丶灬走出姿态 提交于 2019-12-25 03:28:39

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!