Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/321.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
java.lang.NoClassDefFoundError:无法初始化类net.sf.ehcache.config.ConfigurationFactory_Java - Fatal编程技术网

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

java.lang.NoClassDefFoundError:无法初始化类net.sf.ehcache.config.ConfigurationFactory,java,Java,我做错了什么?非常感谢。 Libs:对不起,这是未删节的。 Pom:http://pastebin.com/7rSWG89Q 完全堆叠: net.sf.ehcache ehcache 2.9.0 假如 这是一个依赖性问题。 尝试不使用ehcache Dependence,看看它是否有效。如果没有,请尝试ehcache的版本“2.8.3”,这应该是Spring 4想要的版本。2.8.3-结果相同:-(你能分享你的pom吗?你能试试2.6.5吗?2.6.5-结果也一样。:-(你能移除ehca

我做错了什么?非常感谢。 Libs:对不起,这是未删节的。 Pom:http://pastebin.com/7rSWG89Q 完全堆叠:




net.sf.ehcache
ehcache
2.9.0
假如

这是一个依赖性问题。
尝试不使用ehcache Dependence,看看它是否有效。如果没有,请尝试ehcache的版本“2.8.3”,这应该是Spring 4想要的版本。

2.8.3-结果相同:-(你能分享你的pom吗?你能试试2.6.5吗?2.6.5-结果也一样。:-(你能移除ehcache依赖项并移除提供的部分吗?spring和ehcache或hibernate和ehcache之间存在依赖冲突谢谢!很有帮助。slf4j被遗漏了。)。
 @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)")
<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"/>
<dependency>
    <groupId>net.sf.ehcache</groupId>
    <artifactId>ehcache</artifactId>
    <version>2.9.0</version>
    <scope>provided</scope>
</dependency