title: java.lang.ClassNotFoundException: org.hibernate.envers.event.AuditEventListener
body: <p>I was using spring 3.0.5 and hibernate 3.6.35 for my application and now I have migrated to spring 4.3.2 version with hibernate 5.2.1.</p>
  
  <p>Here is the hibernate.xml</p>
  
  <pre><code>  &lt;bean id="sessionFactory"
            parent="annotatedClassList"
            class="org.springframework.orm.hibernate5.LocalSessionFactoryBean"&gt;
          &lt;property name="eventListeners"&gt;
              &lt;map&gt;
                  &lt;entry key="post-insert" value-ref="auditEventListener"/&gt;
                  &lt;entry key="post-update" value-ref="auditEventListener"/&gt;
                  &lt;entry key="post-delete" value-ref="auditEventListener"/&gt;
                  &lt;entry key="pre-collection-update" value-ref="auditEventListener"/&gt;
                  &lt;entry key="pre-collection-remove" value-ref="auditEventListener"/&gt;
                  &lt;entry key="post-collection-recreate" value-ref="auditEventListener"/&gt;
              &lt;/map&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
  &lt;bean id="auditEventListener" class="org.hibernate.envers.event.AuditEventListener" /&gt;
  </code></pre>
  
  <p>I am getting the following error:-</p>
  
  <pre><code>    SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
  org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.hibernate.envers.event.AuditEventListener] for bean with name 'auditEventListener' defined in ServletContext resource [/WEB-INF/classes/hibernate-context.xml]; nested exception is java.lang.ClassNotFoundException: org.hibernate.envers.event.AuditEventListener
      at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1357)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:628)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:597)
      at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1450)
      at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:980)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:756)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4716)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5178)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
      at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:952)
      at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1823)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: java.lang.ClassNotFoundException: org.hibernate.envers.event.AuditEventListener
      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1284)
      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1118)
      at org.springframework.util.ClassUtils.forName(ClassUtils.java:250)
      at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:394)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1402)
      at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1349)
      ... 23 more
  </code></pre>
  
  <p>How to solve this issue ?</p>