title: Weblogic 12 hibernate validation exception
body: <p>I'm getting this exception after switching from Weblogic 11c to Weblogic 12c:</p>
  
  <pre><code>javax.persistence.PersistenceException: [PersistenceUnit: JpaPersistenceUnit] Unable to build EntityManagerFactory
  ...
  Caused By: java.lang.NoSuchMethodError: javax.validation.spi.ConfigurationState.getParameterNameProvider()Ljavax/validation/ParameterNameProvider;
  at org.hibernate.validator.internal.engine.ValidatorFactoryImpl.&lt;init&gt;(ValidatorFactoryImpl.java:113)
  at org.hibernate.validator.HibernateValidator.buildValidatorFactory(HibernateValidator.java:45)
  </code></pre>
  
  <p>I've found other questions about the topics, but all solutions were about the wrong libraries(<a href="https://stackoverflow.com/questions/16163162/vaadin-7-bean-validation">Vaadin 7 - Bean Validation</a>). I think my hibernate-validator matches the bean validator library. This is what I have in WEB-INF/lib:</p>
  
  <pre><code>hibernate-c3p0-4.2.4.Final.jar
  hibernate-commons-annotations-4.0.2.Final.jar
  hibernate-core-4.2.4.Final.jar
  hibernate-entitymanager-4.2.4.Final.jar
  hibernate-jpa-2.0-api-1.0.1.Final.jar
  hibernate-validator-5.0.1.Final.jar
  validation-api-1.1.0.Final.jar
  </code></pre>
  
  <p>Can it be caused by some other dependency?</p>
  
  <p><strong>EDIT</strong>
  I currently have this in my weblogic-application.xml and everything is working:</p>
  
  <pre><code>&lt;weblogic-application&gt;
  
      &lt;prefer-application-packages&gt;
        &lt;package-name&gt;javax.wsdl.*&lt;/package-name&gt;
        &lt;package-name&gt;javax.faces.*&lt;/package-name&gt;
        &lt;package-name&gt;org.apache.taglibs.*&lt;/package-name&gt;
        &lt;package-name&gt;org.springframework.*&lt;/package-name&gt;
        &lt;package-name&gt;javax.persistence.*&lt;/package-name&gt;
        &lt;package-name&gt;org.hibernate.*&lt;/package-name&gt;
        &lt;package-name&gt;javax.validation.*&lt;/package-name&gt;
        &lt;package-name&gt;javax.validation.bootstrap.*&lt;/package-name&gt;
        &lt;package-name&gt;javax.validation.constraints.*&lt;/package-name&gt;
        &lt;package-name&gt;javax.validation.groups.*&lt;/package-name&gt;
        &lt;package-name&gt;javax.validation.metadata.*&lt;/package-name&gt;
        &lt;package-name&gt;javax.validation.spi.*&lt;/package-name&gt;
        &lt;package-name&gt;org.slf4j.*&lt;/package-name&gt;
      &lt;/prefer-application-packages&gt;
  
      &lt;prefer-application-resources&gt;
        &lt;resource-name&gt;javax.faces.*&lt;/resource-name&gt;
        &lt;resource-name&gt;org.apache.taglibs.*&lt;/resource-name&gt;
        &lt;resource-name&gt;org.springframework.*&lt;/resource-name&gt;
        &lt;resource-name&gt;javax.persistence.*&lt;/resource-name&gt;
        &lt;resource-name&gt;javax.validation.*&lt;/resource-name&gt;
        &lt;resource-name&gt;org.hibernate.*&lt;/resource-name&gt;
      &lt;/prefer-application-resources&gt;
  
  &lt;/weblogic-application&gt;
  </code></pre>