EhCache拒绝访问 怎么解决

  1. [ERROR]-[Thread: RMI TCP Connection(3)-127.0.0.1]-[com.jfinal.core.Config.startPlugins()]: Plugin start error: com.jfinal.plugin.ehcache.EhCachePlugin. 
  2. java.io.IOException: 拒绝访问。
  3. net.sf.ehcache.CacheException: java.io.IOException: 拒绝访问。
  4. at net.sf.ehcache.DiskStorePathManager$DiskStorePath.<init>(DiskStorePathManager.java:331)
  5. at net.sf.ehcache.DiskStorePathManager.resolveAndLockIfNeeded(DiskStorePathManager.java:145)
  6. at net.sf.ehcache.DiskStorePathManager.getFile(DiskStorePathManager.java:262)
  7. at net.sf.ehcache.DiskStorePathManager.getFile(DiskStorePathManager.java:251)
  8. at net.sf.ehcache.store.disk.DiskStorageFactory.<init>(DiskStorageFactory.java:125)
  9. at net.sf.ehcache.store.disk.DiskStore.create(DiskStore.java:134)
  10. at net.sf.ehcache.store.DiskBackedMemoryStore.createDiskStore(DiskBackedMemoryStore.java:61)
  11. at net.sf.ehcache.store.DiskBackedMemoryStore.create(DiskBackedMemoryStore.java:49)
  12. at net.sf.ehcache.Cache.initialise(Cache.java:1097)
  13. at net.sf.ehcache.CacheManager.initializeEhcache(CacheManager.java:1306)
  14. at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1337)
  15. at net.sf.ehcache.CacheManager.addConfiguredCaches(CacheManager.java:758)
  16. at net.sf.ehcache.CacheManager.doInit(CacheManager.java:459)
  17. at net.sf.ehcache.CacheManager.init(CacheManager.java:377)
  18. at net.sf.ehcache.CacheManager.<init>(CacheManager.java:259)
  19. at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1037)
  20. at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:818)
  21. at net.sf.ehcache.CacheManager.create(CacheManager.java:799)
  22. at com.jfinal.plugin.ehcache.EhCachePlugin.createCacheManager(EhCachePlugin.java:90)
  23. at com.jfinal.plugin.ehcache.EhCachePlugin.start(EhCachePlugin.java:61)
  24. at com.jfinal.core.Config.startPlugins(Config.java:107)
  25. at com.jfinal.core.Config.configJFinal(Config.java:53)
  26. at com.jfinal.core.JFinal.init(JFinal.java:63)
  27. at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)
  28. at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
  29. at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
  30. at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
  31. at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4958)
  32. at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5652)
  33. at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
  34. at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
  35. at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
  36. at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
  37. at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1863)
  38. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  39. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  40. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  41. at java.lang.reflect.Method.invoke(Method.java:498)
  42. at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
  43. at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
  44. at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
  45. at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618)
  46. at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565)
  47. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  48. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  49. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  50. at java.lang.reflect.Method.invoke(Method.java:498)
  51. at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
  52. at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
  53. at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
  54. at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
  55. at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
  56. at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
  57. at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)
  58. at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
  59. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  60. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  61. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  62. at java.lang.reflect.Method.invoke(Method.java:498)
  63. at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:324)
  64. at sun.rmi.transport.Transport$1.run(Transport.java:200)
  65. at sun.rmi.transport.Transport$1.run(Transport.java:197)
  66. at java.security.AccessController.doPrivileged(Native Method)
  67. at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
  68. at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
  69. at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
  70. at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
  71. at java.security.AccessController.doPrivileged(Native Method)
  72. at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
  73. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  74. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  75. 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 目录指向别处试试

热门反馈

扫码入社