Application Server 3  4  5 and 6
  1. Application Server 3 4 5 and 6
  2. JBAS-2868

Missing jar ehcache-1.1.jar for Hibernate support

    Details

    • Type: Bug Bug
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Duplicate Issue
    • Affects Version/s: JBossAS-4.0.3 SP1, JBossAS-4.0.4RC1
    • Fix Version/s: No Release
    • Component/s: Installer
    • Security Level: Public (Everyone can see)
    • Labels:
      None
    • Environment:
      SUSE Linux 10.0, JRE 11.5.0_06, Release ID: JBoss [Zion] 4.0.4RC1 (build: CVSTag=JBoss_4_0_4_RC1 date=200602071519)
    • Similar Issues:
      Show 10 results 

      Description

      I installed using hte Jar installer, and chose the default configuration which includes Hibernate support. I then deployed an application that uses Hibernate 3.1.2. I got a stack trace on server console during first use of Hibernate by the application:

      Caused by: java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
      at java.lang.Class.getDeclaredConstructors0(Native Method)
      at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
      at java.lang.Class.getConstructor0(Class.java:2640)
      at java.lang.Class.newInstance0(Class.java:321)
      at java.lang.Class.newInstance(Class.java:303)
      at org.hibernate.cfg.SettingsFactory.createCacheProvider(SettingsFactory.java:327)
      at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:219)
      at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1174)
      at com.novell.soa.persist.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:40)
      at com.novell.soa.af.impl.model.ModelFactory.loadProcessFlow(ModelFactory.java:173)
      at com.novell.soa.af.impl.core.ProvisioningRequestImpl.getProcessFlowModel(ProvisioningRequestImpl.java:80)
      at com.novell.soa.af.impl.core.ProvisioningRequestImpl.startRequest(ProvisioningRequestImpl.java:299)
      at com.novell.soa.af.impl.core.ProvisioningRequestImpl.start(ProvisioningRequestImpl.java:254)
      at com.novell.srvprv.apwa.actions.ProcessResourceRequest.processFormData(ProcessResourceRequest.java:548)
      at com.novell.srvprv.apwa.actions.ProcessResourceRequest.submitDetail(ProcessResourceRequest.java:183)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at com.novell.srvprv.apwa.actions.APWABaseDispatchAction.dispatchToMethod(APWABaseDispatchAction.java:159)
      ... 41 more

      I tracked down the missing class to the ehcache-1.1.jar file. I added that file to the server/default/lib directory, and the problem was resolved.

        Issue Links

          Activity

          Hide
          Don Smith
          added a comment -

          I was able to work around this issue by specifying TreeCache as my cache provider in my hibernate.cfg.xml file:

          <property name="cache.provider_class">org.hibernate.cache.TreeCacheProvider</property>
          <property name="cache.use_second_level_cache">false</property>

          I did not find any documentation indicating that TreeCache could be used as a level 1 cache provider for Hibernate, but it seems to work. I removed the ehcache-1.1.jar from my lib directory to ensure that HIbernate was not using ehcache.

          Show
          Don Smith
          added a comment - I was able to work around this issue by specifying TreeCache as my cache provider in my hibernate.cfg.xml file: <property name="cache.provider_class">org.hibernate.cache.TreeCacheProvider</property> <property name="cache.use_second_level_cache">false</property> I did not find any documentation indicating that TreeCache could be used as a level 1 cache provider for Hibernate, but it seems to work. I removed the ehcache-1.1.jar from my lib directory to ensure that HIbernate was not using ehcache.
          Hide
          Don Smith
          added a comment -

          Looks like it's just the <property name="cache.use_second_level_cache">false</property> that works around the issue.

          Show
          Don Smith
          added a comment - Looks like it's just the <property name="cache.use_second_level_cache">false</property> that works around the issue.
          Hide
          Dimitris Andreadis
          added a comment -

          I believe this duplicates JBAS-2835

          Show
          Dimitris Andreadis
          added a comment - I believe this duplicates JBAS-2835

            People

            • Assignee:
              Dimitris Andreadis
              Reporter:
              Don Smith
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: