EhCache拒绝访问 怎么解决

[ERROR]-[Thread: RMI TCP Connection(3)-127.0.0.1]-[com.jfinal.core.Config.startPlugins()]: Plugin start error: com.jfinal.plugin.ehcache.EhCachePlugin. 
java.io.IOException: 拒绝访问。
net.sf.ehcache.CacheException: java.io.IOException: 拒绝访问。
	at net.sf.ehcache.DiskStorePathManager$DiskStorePath.<init>(DiskStorePathManager.java:331)
	at net.sf.ehcache.DiskStorePathManager.resolveAndLockIfNeeded(DiskStorePathManager.java:145)
	at net.sf.ehcache.DiskStorePathManager.getFile(DiskStorePathManager.java:262)
	at net.sf.ehcache.DiskStorePathManager.getFile(DiskStorePathManager.java:251)
	at net.sf.ehcache.store.disk.DiskStorageFactory.<init>(DiskStorageFactory.java:125)
	at net.sf.ehcache.store.disk.DiskStore.create(DiskStore.java:134)
	at net.sf.ehcache.store.DiskBackedMemoryStore.createDiskStore(DiskBackedMemoryStore.java:61)
	at net.sf.ehcache.store.DiskBackedMemoryStore.create(DiskBackedMemoryStore.java:49)
	at net.sf.ehcache.Cache.initialise(Cache.java:1097)
	at net.sf.ehcache.CacheManager.initializeEhcache(CacheManager.java:1306)
	at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1337)
	at net.sf.ehcache.CacheManager.addConfiguredCaches(CacheManager.java:758)
	at net.sf.ehcache.CacheManager.doInit(CacheManager.java:459)
	at net.sf.ehcache.CacheManager.init(CacheManager.java:377)
	at net.sf.ehcache.CacheManager.<init>(CacheManager.java:259)
	at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1037)
	at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:818)
	at net.sf.ehcache.CacheManager.create(CacheManager.java:799)
	at com.jfinal.plugin.ehcache.EhCachePlugin.createCacheManager(EhCachePlugin.java:90)
	at com.jfinal.plugin.ehcache.EhCachePlugin.start(EhCachePlugin.java:61)
	at com.jfinal.core.Config.startPlugins(Config.java:107)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	at com.jfinal.core.JFinal.init(JFinal.java:63)
	at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4958)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5652)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
	at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1863)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618)
	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
	at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
	at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
	at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)
	at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:324)
	at sun.rmi.transport.Transport$1.run(Transport.java:200)
	at sun.rmi.transport.Transport$1.run(Transport.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)


评论区

JFinal

2017-02-22 10:45

是否是 linux 下没有权限访存放缓存的文件系统?

wendell620

2017-06-17 11:56

用的windows系统,但是tomcat里的temp里边没有修改的权限所以出错了

JFinal

2017-06-17 12:38

@wendell620 配置一下 ehcache.xml , 将 temp 目录指向别处试试

热门反馈

扫码入社