title: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError after adding Hibernate envers
body: <p>I'm trying to add hibernate-envers to one of our Spring MVC project. My entity classes are in separate maven module and I'm using envers there and then install this as local maven repo and use in my actual Spring project as dependency. Everything works okay without envers. 
  My dependency tree in Spring project for hibernate is:</p>
  
  <pre><code>[INFO] +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
  [INFO] +- org.hibernate:hibernate-core:jar:5.3.9.Final:compile
  [INFO] |  \- org.hibernate.common:hibernate-commons-annotations:jar:5.0.4.Final:compile
  [INFO] +- org.hibernate:hibernate-ehcache:jar:5.3.9.Final:compile
  [INFO] |  \- (org.hibernate:hibernate-core:jar:5.3.9.Final:compile - omitted for duplicate)
  [INFO] +- org.hibernate:hibernate-spatial:jar:5.3.9.Final:compile
  [INFO] |  \- (org.hibernate:hibernate-core:jar:5.3.9.Final:compile - omitted for duplicate)
  [INFO] +- az.asdf.dcs:az.asdf.dcs.core:jar:1.1:compile
  [INFO] |  +- (org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile - omitted for duplicate)
  [INFO] |  +- (org.hibernate:hibernate-core:jar:4.3.6.Final:compile - omitted for conflict with 5.3.9.Final)
  [INFO] |  +- (org.hibernate:hibernate-spatial:jar:4.3-SNAPSHOT:compile - omitted for conflict with 5.3.9.Final)
  [INFO] |  \- (org.hibernate:hibernate-envers:jar:5.3.9.Final:compile - omitted for duplicate)
  [INFO] \- org.hibernate:hibernate-envers:jar:5.3.9.Final:compile
  [INFO]    \- (org.hibernate:hibernate-core:jar:5.3.9.Final:compile - omitted for duplicate)
  </code></pre>
  
  <p>and for Spring dependencies:</p>
  
  <pre><code>[INFO] +- org.springframework:spring-core:jar:4.3.3.RELEASE:compile
  [INFO] +- org.springframework:spring-webmvc:jar:4.3.3.RELEASE:compile
  [INFO] |  +- org.springframework:spring-aop:jar:4.3.3.RELEASE:compile
  [INFO] |  |  +- (org.springframework:spring-beans:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] |  |  \- (org.springframework:spring-core:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] |  +- org.springframework:spring-beans:jar:4.3.3.RELEASE:compile
  [INFO] |  |  \- (org.springframework:spring-core:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] |  +- org.springframework:spring-context:jar:4.3.3.RELEASE:compile
  [INFO] |  |  +- (org.springframework:spring-aop:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] |  |  +- (org.springframework:spring-beans:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] |  |  +- (org.springframework:spring-core:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] |  |  \- (org.springframework:spring-expression:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] |  +- (org.springframework:spring-core:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] |  +- org.springframework:spring-expression:jar:4.3.3.RELEASE:compile
  [INFO] |  |  \- (org.springframework:spring-core:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] |  \- org.springframework:spring-web:jar:4.3.3.RELEASE:compile
  [INFO] |     +- (org.springframework:spring-aop:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] |     +- (org.springframework:spring-beans:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] |     +- (org.springframework:spring-context:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] |     \- (org.springframework:spring-core:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] +- org.springframework:spring-tx:jar:4.3.3.RELEASE:compile
  [INFO] |  +- (org.springframework:spring-beans:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] |  \- (org.springframework:spring-core:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] +- org.springframework:spring-orm:jar:4.3.3.RELEASE:compile
  [INFO] |  +- (org.springframework:spring-beans:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] |  +- (org.springframework:spring-core:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] |  +- org.springframework:spring-jdbc:jar:4.3.3.RELEASE:compile
  [INFO] |  |  +- (org.springframework:spring-beans:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] |  |  +- (org.springframework:spring-core:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] |  |  \- (org.springframework:spring-tx:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] |  \- (org.springframework:spring-tx:jar:4.3.3.RELEASE:compile - omitted for duplicate)
  [INFO] +- org.springframework:spring-aspects:jar:4.3.3.RELEASE:compile
  [INFO] +- org.springframework.security:spring-security-core:jar:4.2.4.RELEASE:compile
  [INFO] |  +- (org.springframework:spring-aop:jar:4.3.12.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO] |  +- (org.springframework:spring-beans:jar:4.3.12.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO] |  +- (org.springframework:spring-context:jar:4.3.12.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO] |  +- (org.springframework:spring-core:jar:4.3.12.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO] |  \- (org.springframework:spring-expression:jar:4.3.12.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO] +- org.springframework.security:spring-security-web:jar:4.2.4.RELEASE:compile
  [INFO] |  +- (org.springframework.security:spring-security-core:jar:4.2.4.RELEASE:compile - omitted for duplicate)
  [INFO] |  +- (org.springframework:spring-beans:jar:4.3.12.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO] |  +- (org.springframework:spring-context:jar:4.3.12.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO] |  +- (org.springframework:spring-core:jar:4.3.12.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO] |  +- (org.springframework:spring-expression:jar:4.3.12.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO] |  \- (org.springframework:spring-web:jar:4.3.12.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO] +- org.springframework.security:spring-security-config:jar:4.2.4.RELEASE:compile
  [INFO] |  +- (org.springframework.security:spring-security-core:jar:4.2.4.RELEASE:compile - omitted for duplicate)
  [INFO] |  +- (org.springframework:spring-aop:jar:4.3.12.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO] |  +- (org.springframework:spring-beans:jar:4.3.12.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO] |  +- (org.springframework:spring-context:jar:4.3.12.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO] |  \- (org.springframework:spring-core:jar:4.3.12.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO] \- az.asdf.dcs:az.asdf.dcs.core:jar:1.1:compile
  [INFO]    \- org.springframework.data:spring-data-cassandra:jar:2.0.2.RELEASE:compile
  [INFO]       +- (org.springframework:spring-context:jar:5.0.2.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO]       +- (org.springframework:spring-beans:jar:5.0.2.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO]       +- (org.springframework:spring-core:jar:5.0.2.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO]       +- (org.springframework:spring-tx:jar:5.0.2.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO]       +- (org.springframework:spring-expression:jar:5.0.2.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO]       \- org.springframework.data:spring-data-commons:jar:2.0.2.RELEASE:compile
  [INFO]          +- (org.springframework:spring-core:jar:5.0.2.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  [INFO]          \- (org.springframework:spring-beans:jar:5.0.2.RELEASE:compile - omitted for conflict with 4.3.3.RELEASE)
  </code></pre>
  
  <p>I don't see any version conflicts here. But when I try to run I get this exception:</p>
  
  <pre><code>Unsatisfied dependency expressed through field 'sessionFactory'; 
  nested exception is org.springframework.beans.factory.BeanCreationException:
  Error creating bean with name 'sessionFactory' defined in class path resource [Spring-Hibernate.xml]:
  Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.hibernate.envers.configuration.internal.GlobalConfiguration.&lt;init&gt;(Lorg/hibernate/envers/boot/internal/EnversService;Ljava/util/Map;)V]]
  </code></pre>
  
  <p>Any suggestions are welcome.</p>
  
  <p>UPDATE: Here are my pom.xml's in both core and Spring projects:</p>
  
  <p>Core module:</p>
  
  <pre><code>&lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-jpa-2.1-api&lt;/artifactId&gt;
          &lt;version&gt;1.0.0.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
          &lt;version&gt;4.3.6.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-spatial&lt;/artifactId&gt;
          &lt;version&gt;4.3-SNAPSHOT&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
                  &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-envers --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-envers&lt;/artifactId&gt;
          &lt;version&gt;5.3.9.Final&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
          &lt;artifactId&gt;spring-data-cassandra&lt;/artifactId&gt;
          &lt;version&gt;2.0.2.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
  
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>Spring project:</p>
  
  <pre><code>&lt;properties&gt;
      &lt;endorsed.dir&gt;${project.build.directory}/endorsed&lt;/endorsed.dir&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;springframework.version&gt;4.3.3.RELEASE&lt;/springframework.version&gt;
      &lt;spring.security.version&gt;4.2.4.RELEASE&lt;/spring.security.version&gt;
      &lt;hibernate.version&gt;5.3.9.Final&lt;/hibernate.version&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;!--Spring resources--&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
          &lt;version&gt;${springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
          &lt;version&gt;${springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-tx&lt;/artifactId&gt;
          &lt;version&gt;${springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
          &lt;version&gt;${springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- Spring + aspects --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-aspects&lt;/artifactId&gt;
          &lt;version&gt;${springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Spring Security --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
          &lt;artifactId&gt;spring-security-core&lt;/artifactId&gt;
          &lt;version&gt;${spring.security.version}&lt;/version&gt;
      &lt;/dependency&gt; 
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
          &lt;artifactId&gt;spring-security-web&lt;/artifactId&gt;
          &lt;version&gt;${spring.security.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
          &lt;artifactId&gt;spring-security-config&lt;/artifactId&gt;
          &lt;version&gt;${spring.security.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!--Spring resources--&gt;
      &lt;!--Hybernate resources--&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-jpa-2.1-api&lt;/artifactId&gt;
          &lt;version&gt;1.0.0.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
          &lt;version&gt;${hibernate.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-ehcache&lt;/artifactId&gt;
          &lt;version&gt;${hibernate.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;net.sf.ehcache&lt;/groupId&gt;
          &lt;artifactId&gt;ehcache-core&lt;/artifactId&gt;
          &lt;version&gt;2.6.11&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-spatial&lt;/artifactId&gt;
          &lt;version&gt;${hibernate.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!--Hybernate resources--&gt;
      &lt;!-- Apache Commons Upload --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-fileupload&lt;/groupId&gt;
          &lt;artifactId&gt;commons-fileupload&lt;/artifactId&gt;
          &lt;version&gt;1.2.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-io&lt;/groupId&gt;
          &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
          &lt;version&gt;1.3.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- Apache Commons Upload --&gt;
      &lt;!--for Log--&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j&lt;/artifactId&gt;
          &lt;version&gt;1.2.17&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!--for Log--&gt;
      &lt;!----&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.postgresql&lt;/groupId&gt;
          &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
          &lt;version&gt;9.4.1211.jre7&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!--Jackson JSON Parser--&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
          &lt;version&gt;1.9.13&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
          &lt;version&gt;2.7.5&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-core-asl&lt;/artifactId&gt;
          &lt;version&gt;1.6.3&lt;/version&gt;
          &lt;type&gt;jar&lt;/type&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.googlecode.json-simple&lt;/groupId&gt;
          &lt;artifactId&gt;json-simple&lt;/artifactId&gt;
          &lt;version&gt;1.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.12&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
          &lt;version&gt;3.1.0&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.eclipse.paho&lt;/groupId&gt;
          &lt;artifactId&gt;org.eclipse.paho.client.mqttv3&lt;/artifactId&gt;
          &lt;version&gt;1.1.0&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/commons-codec/commons-codec --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-codec&lt;/groupId&gt;
          &lt;artifactId&gt;commons-codec&lt;/artifactId&gt;
          &lt;version&gt;1.11&lt;/version&gt;
      &lt;/dependency&gt;
  
  
      &lt;dependency&gt;
          &lt;groupId&gt;javax&lt;/groupId&gt;
          &lt;artifactId&gt;javaee-web-api&lt;/artifactId&gt;
          &lt;version&gt;7.0&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;az.asdf.dcs&lt;/groupId&gt;
          &lt;artifactId&gt;az.asdf.dcs.core&lt;/artifactId&gt;
          &lt;version&gt;1.1&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-envers&lt;/artifactId&gt;
          &lt;version&gt;${hibernate.version}&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/org.asteriskjava/asterisk-java --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.asteriskjava&lt;/groupId&gt;
          &lt;artifactId&gt;asterisk-java&lt;/artifactId&gt;
          &lt;version&gt;2.0.2&lt;/version&gt;
      &lt;/dependency&gt;
  
  &lt;/dependencies&gt;
  </code></pre>