开发者

how to config grails1.2 with oscache?

I do this :

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

and in

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

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

but i only get this error :

commons.DefaultGrailsApplication The class [com.ai.scenter.service.reschange.ResourceChangeAd开发者_开发百科apter] 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"))

how can i do it?


According to your logs, you misspelled the provider, you're missing the final 'r' letter.

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜