Tomcat 8抛出-org.apache.catalina.webresources.Cache.getResource无法添加资源 [英] Tomcat 8 throwing - org.apache.catalina.webresources.Cache.getResource Unable to add the resource
问题描述
我刚刚将Tomcat从7.0.52版本升级到8.0.14。
I have just upgraded Tomcat from version 7.0.52 to 8.0.14.
我为很多静态图像文件准备了这个东西:
I am getting this for lots of static image files:
org.apache.catalina.webresources.Cache.getResource 无法在[/ base / 1325 / WA6144-150x112.jpg]移至高速缓存,因为在收回过期的高速缓存
条目后,
的可用空间不足-请考虑增加高速缓存的最大大小
org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/base/1325/WA6144-150x112.jpg] to the cache because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache
我没有指定任何特定的资源设置,而且在7.0.52中没有得到。
I haven't specified any particular resource settings, and I didn't get this for 7.0.52.
我有发现了在启动时在错误报告中提到的这种情况,该错误报告应该已修复。对我来说,这不是在启动时发生的,而是在请求资源时不断发生的。
I have found mention of this happening at startup in a bug report that was supposedly fixed. For me this is happening not at startup but constantly when the resource is requested.
还有其他人遇到此问题吗?
Anybody else having this issue?
尝试至少仅禁用高速缓存,但是我找不到如何指定不使用高速缓存的示例。这些属性已从Tomcat 8版的上下文中删除。尝试添加资源但无法获得正确的配置。
Trying to at least just disable the cache, but I cannot find an example of how to specify not to use the cache. The attributes have gone from the context in Tomcat version 8. Have tried adding a resource but cannot get the config right.
<Resource name="file"
cachingAllowed="false"
className="org.apache.catalina.webresources.FileResourceSet"
/>
谢谢。
推荐答案
在您的 $ CATALINA_BASE / conf / context.xml
中,在< / Context>
<Resources cachingAllowed="true" cacheMaxSize="100000" />
有关更多信息: http://tomcat.apache.org/tomcat-8.0-doc/config/resources.html
这篇关于Tomcat 8抛出-org.apache.catalina.webresources.Cache.getResource无法添加资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!