Search code examples
javaalfresco

Error on AuditModule during Alfresco startup


I'm upgrading an Alfresco CE 5.x to 7.4.2. It has the AuditModule enabled in the properties but now, after the upgrade, I receive this error when Alfresco boots up:

2024-11-14T17:52:57,305 [] ERROR [audit.model.AuditModelRegistryImpl] [main] Failed to load audit model: jar:file:/opt/alfresco-cdr/tomcat/webapps/alfresco/WEB-INF/lib/alfresco-repository-21.14.jar!/alfresco/audit/alfresco-audit-access.xml
org.alfresco.repo.audit.model.AuditModelException: 10140000 Audit application key 'alfresco-access' is used by: AuditApplication[ name=alfresco-access, id=2, disabledPathsId=3094]
        at org.alfresco.repo.audit.model.AuditModelRegistryImpl$AuditModelRegistryState.cacheAuditElements(AuditModelRegistryImpl.java:646) ~[alfresco-repository-20.164.jar:20.164]
.....
2024-11-14T17:52:57,314 [] ERROR [audit.model.AuditModelRegistryImpl] [main] Failed to load audit model: jar:file:/opt/alfresco-cdr/tomcat/webapps/alfresco/WEB-INF/lib/alfresco-repository-21.14.jar!/alfresco/audit/alfresco-audit-tagging.xml
org.alfresco.repo.audit.model.AuditModelException: 10140001 Audit application key 'tagging' is used by: AuditApplication[ name=Alfresco Tagging Service, id=1, disabledPathsId=2]
        at org.alfresco.repo.audit.model.AuditModelRegistryImpl$AuditModelRegistryState.cacheAuditElements(AuditModelRegistryImpl.java:646) ~[alfresco-repository-20.164.jar:20.164]
.....

this are the properties on alfresco-global.properties

# Enable the alfresco-access audit application

audit.alfresco-access.enabled=true
audit.cdr-audit.enabled=true
audit.cdr-audit.sub-actions.enabled=true
audit.cdr-audit.sub-events.enabled=true
audit.filter.cdr-audit.transaction.type=cm:content;st:site;cm:folder;cm:person;

# Audit map filter for AccessAuditor - restricts recorded events to user driven events
audit.filter.alfresco-access.default.enabled=false
audit.filter.alfresco-access.transaction.user=.*
audit.filter.alfresco-access.transaction.path=~/sys:archivedItem;~/ver:;/app:company_home/st:sites/.*
audit.filter.alfresco-access.transaction.type=cm:content;cm:folder;st:site;cm:person

Can anyone help me finding out what is the problem? I'm thinking about there is something wrong in my DB


Solution

  • Found it! The problem is both 'alfresco-access' and 'tagging' keys are being duplicated and you cannot such situation. Both files are core ones, inside alfresco standard libs.

    So I found It had a duplicated library, alfresco-repository-20.X and alfresco-repository-21.Y added with amps and customization to the Alfresco Installation.

    I removed the oldest one and the error disappeared