org.springframework.beans.MethodInvocationException: Property 'cacheManager' threw exception; neste

来源:互联网 发布:编程一小时网站 编辑:程序博客网 时间:2024/06/05 11:37

Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'cacheManager' threw exception; nested exception is org.apache.shiro.cache.CacheException: net.sf.ehcache.CacheException: Caches cannot be added by name when default cache config is not specified in the config. Please add a default cache config in the configuration.at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:108)at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:62)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1489)... 33 more七月 04, 2016 4:06:11 下午 org.apache.catalina.core.StandardContext startInternalSEVERE: Error listenerStart七月 04, 2016 4:06:11 下午 org.apache.catalina.core.StandardContext startInternalSEVERE: Context [/shiroWeb] startup failed due to previous errors七月 04, 2016 4:06:11 下午 org.apache.catalina.core.ApplicationContext logINFO: Closing Spring root WebApplicationContext七月 04, 2016 4:06:11 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreadsSEVERE: The web application [/shiroWeb] appears to have started a thread named [net.sf.ehcache.CacheManager@48050] but has failed to stop it. This is very likely to create a memory leak.七月 04, 2016 4:06:11 下午 org.apache.catalina.startup.HostConfig deployWARINFO: Deploying web application archive D:\apache\tomcat\7\x32\apache-tomcat-7.0.39\webapps\TestEEProject.war七月 04, 2016 4:06:11 下午 org.apache.catalina.loader.WebappClassLoader validateJarFileINFO: validateJarFile(D:\apache\tomcat\7\x32\apache-tomcat-7.0.39\webapps\TestEEProject\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class七月 04, 2016 4:06:11 下午 org.apache.catalina.startup.HostConfig deployDirectoryINFO: Deploying web application directory D:\apache\tomcat\7\x32\apache-tomcat-7.0.39\webapps\docs七月 04, 2016 4:06:11 下午 org.apache.catalina.startup.HostConfig deployDirectoryINFO: Deploying web application directory D:\apache\tomcat\7\x32\apache-tomcat-7.0.39\webapps\examples七月 04, 2016 4:06:11 下午 org.apache.catalina.core.ApplicationContext logINFO: ContextListener: contextInitialized()七月 04, 2016 4:06:11 下午 org.apache.catalina.core.ApplicationContext logINFO: SessionListener: contextInitialized()七月 04, 2016 4:06:11 下午 org.apache.catalina.core.ApplicationContext logINFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@5e9a70')七月 04, 2016 4:06:11 下午 org.apache.catalina.startup.HostConfig deployDirectoryINFO: Deploying web application directory D:\apache\tomcat\7\x32\apache-tomcat-7.0.39\webapps\host-manager七月 04, 2016 4:06:11 下午 org.apache.catalina.startup.HostConfig deployDirectoryINFO: Deploying web application directory D:\apache\tomcat\7\x32\apache-tomcat-7.0.39\webapps\manager七月 04, 2016 4:06:11 下午 org.apache.catalina.startup.HostConfig deployDirectoryINFO: Deploying web application directory D:\apache\tomcat\7\x32\apache-tomcat-7.0.39\webapps\ROOT七月 04, 2016 4:06:11 下午 org.apache.coyote.AbstractProtocol startINFO: Starting ProtocolHandler ["http-bio-8080"]七月 04, 2016 4:06:11 下午 org.apache.coyote.AbstractProtocol startINFO: Starting ProtocolHandler ["ajp-bio-8009"]七月 04, 2016 4:06:11 下午 org.apache.catalina.startup.Catalina startINFO: Server startup in 1935 ms七月 04, 2016 4:06:12 下午 org.apache.catalina.loader.WebappClassLoader loadClassINFO: Illegal access: this web application instance has been stopped already.  Could not load net.sf.ehcache.util.ProductInfo.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.java.lang.IllegalStateExceptionat org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1599)at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)at net.sf.ehcache.util.UpdateChecker.buildParamsString(UpdateChecker.java:125)at net.sf.ehcache.util.UpdateChecker.buildUpdateCheckUrl(UpdateChecker.java:121)at net.sf.ehcache.util.UpdateChecker.doCheck(UpdateChecker.java:69)at net.sf.ehcache.util.UpdateChecker.checkForUpdate(UpdateChecker.java:60)at net.sf.ehcache.util.UpdateChecker.run(UpdateChecker.java:51)at java.util.TimerThread.mainLoop(Unknown Source)at java.util.TimerThread.run(Unknown Source)


环境:spring3 + springMvc + shiro + ehcache

ehcache.xml错误的配置

<?xml version="1.0" encoding="UTF-8"?><ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xsi:noNamespaceSchemaLocation="ehcache.xsd">    <diskStore path="java.io.tmpdir"/>          <!-- 登录记录缓存 锁定10分钟 -->    <cache name="passwordRetryCache"           maxEntriesLocalHeap="2000"           eternal="false"           timeToIdleSeconds="3600"           timeToLiveSeconds="0"           overflowToDisk="false"           statistics="true">    </cache></ehcache>


应该增加默认的ehcache

<?xml version="1.0" encoding="UTF-8"?><ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xsi:noNamespaceSchemaLocation="ehcache.xsd">    <diskStore path="java.io.tmpdir"/>    <defaultCache      maxElementsInMemory="10000"      maxElementsOnDisk="0"      eternal="true"      overflowToDisk="true"      diskPersistent="false"      timeToIdleSeconds="0"      timeToLiveSeconds="0"      diskSpoolBufferSizeMB="50"      diskExpiryThreadIntervalSeconds="120"      memoryStoreEvictionPolicy="LFU"      />        <!-- 登录记录缓存 锁定10分钟 -->    <cache name="passwordRetryCache"           maxEntriesLocalHeap="2000"           eternal="false"           timeToIdleSeconds="3600"           timeToLiveSeconds="0"           overflowToDisk="false"           statistics="true">    </cache></ehcache>






0 0