首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用oscache配置grails1.2?

如何使用oscache配置grails1.2?
EN

Stack Overflow用户
提问于 2010-05-24 16:37:35
回答 1查看 422关注 0票数 0

我这样做:

代码语言:javascript
复制
DataSource.groovy:
hibernate {
    cache.use_second_level_cache=true
    cache.use_query_cache=true
    cache.provider_class='com.opensymphony.oscache.hibernate.OSCacheProvider'
}

和在

代码语言:javascript
复制
 BuildConfig.groovy:
 inherits( "global" ) {
        // uncomment to disable ehcache
        excludes 'ehcache'
    }

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

但我只得到了这个错误:

代码语言:javascript
复制
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"))

我该怎么做呢?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2010-05-24 17:34:57

根据您的日志,您拼写错误的提供商,您错过了最后的'r‘字母。

代码语言:javascript
复制
om.opensymphony.oscache.hibernate.OSCacheProvide[r]
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2895731

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档