05-01-2021 11:43 AM
When starting uo the AIO for SDK4.2 I am getting my logs filled with statements like these:
alfresco-share_1 | 01-May-2021 15:30:42.908 WARNING [main] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/WEB-INF/classes/org/springframework/beans/factory/xml/spring-beans.xsd] to the cache for web application [/share] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache
It looks like it's a setting for Tomcat, but as a Docker AIO user, How do I fix this? I don't want to ignore it.
05-07-2021 11:41 PM
So building on previous reply, to fix:
1. in your AIO share-docker/src/main/docker add this file context.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- The contents of this file will be loaded for each web application --> <Context> <Resources cacheMaxSize="51200" cachingAllowed="true"/> <!-- Default set of monitored resources. If one of these changes, the --> <!-- web application will be reloaded. --> <WatchedResource>WEB-INF/web.xml</WatchedResource> <WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource> <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource> <!-- Uncomment this to disable session persistence across Tomcat restarts --> <!-- <Manager pathname="" /> --> </Context>
2. add this line to your Dockerfile: (at the end is fine)
COPY context.xml $TOMCAT_DIR/conf
run a build_start and those warnings go away.
05-02-2021 12:29 AM
Yes it will be fixed from tomcat level maybe
default value for resource caching is 10240 kbytes, even when not added to tomcat\conf\context.xml
You can try updating the cache settings or disable it. May be it will fix
<Resources cacheMaxSize="51200" cachingAllowed="true"/> Or disable it: <Resources cachingAllowed="false" />
05-07-2021 11:41 PM
So building on previous reply, to fix:
1. in your AIO share-docker/src/main/docker add this file context.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- The contents of this file will be loaded for each web application --> <Context> <Resources cacheMaxSize="51200" cachingAllowed="true"/> <!-- Default set of monitored resources. If one of these changes, the --> <!-- web application will be reloaded. --> <WatchedResource>WEB-INF/web.xml</WatchedResource> <WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource> <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource> <!-- Uncomment this to disable session persistence across Tomcat restarts --> <!-- <Manager pathname="" /> --> </Context>
2. add this line to your Dockerfile: (at the end is fine)
COPY context.xml $TOMCAT_DIR/conf
run a build_start and those warnings go away.
Explore our Alfresco products with the links below. Use labels to filter content by product module.