title: Hibernate Second Level Cache EhCache library mismatch?
body: <p>I'm using Hibernate 3.5.0, JBoss AS 6 and Liquibase 1.9.5.</p>
  
  <p>I wanted to activate <strong>EhCache</strong> <em>Hibernate second-level caching</em> as follows:</p>
  
  <p>The first thing I do, is adding a new dependency to the <strong>pom.xml</strong>: </p>
  
  <pre><code> &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-ehcache&lt;/artifactId&gt;
              &lt;version&gt;3.5.0-Final&lt;/version&gt;
   &lt;/dependency&gt;
  </code></pre>
  
  <p>Now, when I redeploy my app, following Exception is thrown:</p>
  
  <pre><code>Caused by: java.lang.VerifyError: (class: liquibase/database/HibernateDatabase, method: &lt;init&gt; signature: (Ljava/lang/String;)V) Bad type in putfield/putstatic
          at java.lang.Class.getDeclaredMethods0(Native Method) [:1.6.0_18]
          at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) [:1.6.0_18]
          at java.lang.Class.getDeclaredMethods(Class.java:1791) [:1.6.0_18]
          at org.jboss.deployment.AnnotatedClassFilter.hasAnnotations(AnnotatedClassFilter.java:186) [:6.0.0.20100429-M3]
          at org.jboss.deployment.AnnotatedClassFilter.accepts(AnnotatedClassFilter.java:114) [:6.0.0.20100429-M3]
          at org.jboss.deployment.AnnotatedClassFilter.visit(AnnotatedClassFilter.java:99) [:6.0.0.20100429-M3]
          at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:407) [jboss-vfs.jar:3.0.0.CR5]
          at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:409) [jboss-vfs.jar:3.0.0.CR5]
          ...
  </code></pre>
  
  <p>Note that I didn't activate the caching in <strong>persistence.xml</strong> yet (!)</p>
  
  <p>Does this ring a bell to somebody?  Any clues are more than welcome.</p>
  
  <p>Thank you!</p>