首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >java.lang.NoClassDefFoundError:无法初始化类net.sf.ehcache.config.ConfigurationFactory

java.lang.NoClassDefFoundError:无法初始化类net.sf.ehcache.config.ConfigurationFactory
EN

Stack Overflow用户
提问于 2014-12-18 21:51:12
回答 1查看 2.4K关注 0票数 1

我做错什么了?谢谢!http://cs621531.vk.me/v621531427/4ebb/vU1vHpBjyhQ.jpg:对不起,它被打开了。Pom: http pastebin.com/7rSWG89Q全文堆栈:http://pastebin.com/uwQsnwGn

代码语言:javascript
复制
 @Cacheable(value = "servicesByCategoryId", key = "T(java.lang.String).valueOf(#id).concat('-').concat(" +
            "T(java.lang.String).valueOf(#page)).concat('-').concat(T(java.lang.String).valueOf(#perPage))" +
            ".concat('-').concat(#orderBy).concat('-').concat(#order)")
代码语言:javascript
复制
<beans xmlns:context="http://www.springframework.org/schema/context"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:cache="http://www.springframework.org/schema/cache"
       xmlns="http://www.springframework.org/schema/beans" xsi:schemaLocation=
               "http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-4.0.xsd
        http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd">
    <context:annotation-config/>
    <context:component-scan base-package="com.vse.uslugi"/>
    <cache:annotation-driven key-generator="enhancedDefaultKeyGenerator"/>
    <bean id="enhancedDefaultKeyGenerator" class="...utilities.generators.EnhancedDefaultKeyGenerator"/>

代码语言:javascript
复制
<dependency>
    <groupId>net.sf.ehcache</groupId>
    <artifactId>ehcache</artifactId>
    <version>2.9.0</version>
    <scope>provided</scope>
</dependency
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-12-18 22:27:09

这是一个依赖问题。试着不依赖ehcache,看看它是否有效。如果不是,请尝试ehcache的"2.8.3“版本,它应该是Spring 4所需要的版本。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27556334

复制
相关文章

相似问题

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