0 Replies Latest reply on May 22, 2015 10:43 PM by firepod

    How to use an Upgraded Version of the Hibernate Validator Jar in Wildfly 8.2?

    firepod Newbie

      Can anyone provide assistance on how to solve this problem on StackOverflow?

       

      What I've been able to piece together, it sounds like this should work:

       

      {ear-root}/META-INF/jboss-deployment-structure.xml

       

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">

        <deployment>

          <dependencies/>

          <exclusions>

            <module name="org.hibernate.validator" slot="main"/>

          </exclusions>

        </deployment>

        <sub-deployment name="myWar1.war">

          <dependencies/>

          <exclusions>

            <module name="org.hibernate.validator" slot="main"/>

          </exclusions>

        </sub-deployment>

        <sub-deployment name="myWar2.war">

          <dependencies/>

          <exclusions>

            <module name="org.hibernate.validator" slot="main"/>

          </exclusions>

        </sub-deployment>

      </jboss-deployment-structure>

       

      But it causes my deployment to fail with this exception:

       

      2015-05-23 02:39:08,013 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."myEar.ear".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."myEar.ear".WeldStartService: Failed to start service

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_25]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_25]

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_25]

      Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type Validator with qualifiers @Default

        at injection point [UnbackedAnnotatedField] @Inject private org.hibernate.validator.internal.cdi.interceptor.ValidationInterceptor.validator

        at org.hibernate.validator.internal.cdi.interceptor.ValidationInterceptor.validator(ValidationInterceptor.java:0)

      WELD-001475: The following beans match by type, but none have matching qualifiers:

        - ValidatorBean [id=org.hibernate.validator.internal.cdi.ValidatorBean_hv]

       

        at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:372)

        at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:293)

        at org.jboss.weld.bootstrap.Validator.validateInterceptor(Validator.java:569)

        at org.jboss.weld.bootstrap.ConcurrentValidator$2.doWork(ConcurrentValidator.java:85)

        at org.jboss.weld.bootstrap.ConcurrentValidator$2.doWork(ConcurrentValidator.java:83)

        at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)

        at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)

        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_25]

        ... 3 more