title: JBoss and different versions of Hibernate
body: <p>We are using JBoss 4.2.3 which in turn comes with version 3.2.1.ga of Hibernate. I would like to use Hibernate 3.5.1-FINAL which supports JPA 2.0. I've been trying to make this work by putting my own hibernate jars in my WEB-INF/lib folder and creating my own classloader for my WAR in jboss-web.xml</p>
  
  <pre><code>&lt;jboss-web&gt;
     &lt;loader-repository&gt; 
        com.moo.foo:archive=catalog-archive 
     &lt;/loader-repository&gt; 
  &lt;/jboss-web&gt; 
  </code></pre>
  
  <p>I've also tried:</p>
  
  <pre><code>&lt;jboss-web&gt;
   &lt;class-loading java2ClassLoadingCompliance="false"&gt;
    &lt;loader-repository&gt;
       com.moo.catalog:loader=catalogLoader
       &lt;loader-repository-config&gt;java2ParentDelegation=false&lt;/loader-repository-config&gt;
    &lt;/loader-repository&gt;
   &lt;/class-loading&gt;
  &lt;/jboss-web&gt;
  </code></pre>
  
  <p>But I get loads of various issues and this is the exception I'm currently stuck on:</p>
  
  <pre><code>Caused by: java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator.&lt;init&gt;(java.lang.Class, java.util.ResourceBundle, org.hibernate.validator.MessageInterpolator, java.util.Map, org.hibernate.annotations.common.reflection.ReflectionManager)
      at java.lang.Class.getConstructor0(Unknown Source)
      at java.lang.Class.getDeclaredConstructor(Unknown Source)
      at org.hibernate.cfg.AnnotationConfiguration.applyHibernateValidatorLegacyConstraintsOnDDL(AnnotationConfiguration.java:443)
  </code></pre>
  
  <p>Since the deadline is looming I thought I'd better ask if it is even possible? :)</p>