Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-18299

ClassNotFoundException for SingletonEhCacheRegionFactory

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • 4.3.0.CR1
    • 4.2.0.CR1
    • hibernate
    • None
    • Hide

      Create a Dynamic Web Project with a single entity class (here called test.Pet).
      Copy the jars from the required and optional/ehcache directories of the Hibernate 4.1.12 distribution into the WEB-INF/lib directory of the project. Add the following hibernate.cfg.xml:

      <hibernate-configuration>
          <session-factory>
              <property name="hibernate.connection.driver_class">org.h2.Driver</property>
              <property name="hibernate.connection.url">jdbc:h2:test</property>
              <property name="hibernate.dialect">org.hibernate.dialect.H2Dialect</property>
              
              <property name="hibernate.cache.use_second_level_cache">true</property>
              <property name="hibernate.cache.use_query_cache">true</property>
              <property name="hibernate.cache.region.factory_class">
                  org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory
              </property>
              
              <mapping class="test.Pet"/>
          </session-factory>
      </hibernate-configuration>
      

      Use the config XML in a new Hibernate configuration (I selected Annotations and Hibernate 4.0), then expand the configfuration's Session Factory subtree.

      Show
      Create a Dynamic Web Project with a single entity class (here called test.Pet ). Copy the jars from the required and optional/ehcache directories of the Hibernate 4.1.12 distribution into the WEB-INF/lib directory of the project. Add the following hibernate.cfg.xml : <hibernate-configuration> <session-factory> <property name= "hibernate.connection.driver_class" >org.h2.Driver</property> <property name= "hibernate.connection.url" >jdbc:h2:test</property> <property name= "hibernate.dialect" >org.hibernate.dialect.H2Dialect</property> <property name= "hibernate.cache.use_second_level_cache" > true </property> <property name= "hibernate.cache.use_query_cache" > true </property> <property name= "hibernate.cache.region.factory_class" > org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory </property> <mapping class= "test.Pet" /> </session-factory> </hibernate-configuration> Use the config XML in a new Hibernate configuration (I selected Annotations and Hibernate 4.0), then expand the configfuration's Session Factory subtree.

    Description

      Opening the Session Factory subtree in the Hibernate Configurations tab fails with a logged ClassNotFoundException for org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory.

      Attachments

        Activity

          People

            kaers@redhat.com Koen Aers
            luke.maurer Luke Maurer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: