【问题标题】:how to config grails1.2 with oscache?如何用 oscache 配置 grails1.2?
【发布时间】:2010-05-24 08:37:34
【问题描述】:

我这样做:

DataSource.groovy:
hibernate {
    cache.use_second_level_cache=true
    cache.use_query_cache=true
    cache.provider_class='com.opensymphony.oscache.hibernate.OSCacheProvider'
}

 BuildConfig.groovy:
 inherits( "global" ) {
        // uncomment to disable ehcache
        excludes 'ehcache'
    }

runtime ("opensymphony:oscache:2.4.1") { 
 excludes 'jms', 'commons-logging', 'servlet-api' 
   } 

但我只收到此错误:

commons.DefaultGrailsApplication The class [com.ai.scenter.service.reschange.ResourceChangeAdapter] was not found when attempting to load Grails application. Skipping.
commons.DefaultGrailsApplication The class [com.ai.scenter.service.reschange.ResourceChangeService] was not found when attempting to load Grails application. Skipping.
hibernate.ConfigurableLocalSessionFactoryBean There was an error configuring the Hibernate second level cache: could not instantiate CacheProvider [com.opensymphony.oscache.hibernate.OSCacheProvide]
hibernate.ConfigurableLocalSessionFactoryBean This is normally due to one of two reasons. Either you have incorrectly specified the cache provider class name in [DataSource.groovy] or you do not have the cache provider on your classpath (eg. runtime ("net.sf.ehcache:ehcache:1.6.1"))

我该怎么做?

【问题讨论】:

    标签: grails oscache


    【解决方案1】:

    根据您的日志,您拼错了提供者,您缺少最后一个“r”字母。

    om.opensymphony.oscache.hibernate.OSCacheProvide[r]
    

    【讨论】:

      猜你喜欢
      • 2010-09-10
      • 2010-10-05
      • 2023-03-20
      • 1970-01-01
      • 1970-01-01
      • 2017-03-10
      • 1970-01-01
      • 2018-03-04
      • 2017-06-02
      相关资源
      最近更新 更多