05-21-2021 10:09 AM
Hi All,
I am getting metadata extraction error in for document created through Rest API with custom content model properties.
Error is as follows:-
2021-05-21 14:33:16,862 DEBUG [repo.audit.AuditComponentImpl] [http-nio-8080-exec-3] New audit entry: Application ID: 2 Entry ID: 67 Values: /alfresco-access/login=null /alfresco-access/loginUser=admin Audit Data: /alfresco-access/login/user=admin 2021-05-21 14:33:57,837 WARN [content.metadata.AbstractMappingMetadataExtracter] [http-nio-8080-exec-3] Metadata extraction failed (turn on DEBUG for full error): Extracter: org.alfresco.repo.content.metadata.PoiMetadataExtracter@60ed5434 Content: ContentAccessor[ contentUrl=store://2021/5/21/14/33/54231e86-cf7b-459a-899b-2b829f5e124e.bin, mimetype=application/vnd.openxmlformats-officedocument.wordprocessingml.document, size=24021, encoding=UTF-8, locale=en_GB] Failure: nullnull
i have added following audit filters in my alfresco-global.properties:-
audit.enabled= true audit.alfresco-access.enabled=true audit.alfresco-access.sub-actions.enabled=false audit.filter.alfresco-access.default.enabled=true audit.filter.alfresco-access.default.user=~System;~null;.* audit.filter.alfresco-access.default.path=/app:company_home/st:sites/.* audit.filter.alfresco-access.transaction.user=~System;~null;.* audit.filter.alfresco-access.transaction.path=/app:company_home/st:sites/.* audit.filter.alfresco-access.transaction.action=CREATE;
Also created audit extractor as afresco audit access.xml under tomcat\shared\classes\alfresco\extension\audit as follows:-
<?xml version='1.0' encoding='UTF-8'?> <Audit xmlns="http://www.alfresco.org/repo/audit/model/3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.alfresco.org/repo/audit/model/3.2 alfresco-audit-3.2.xsd" > <DataExtractors> <DataExtractor name="simpleValue" registeredName="auditModel.extractor.simpleValue"/> </DataExtractors> <PathMappings> <PathMap source="/alfresco-access" target="/alfresco-access"/> <PathMap source="/alfresco-access/transaction" target="/alfresco-access/transaction"/> </PathMappings> <Application name="alfresco-access" key="alfresco-access"> <AuditPath key="transaction"> <RecordValue key="action" dataExtractor="simpleValue" dataSource="/alfresco-access/transaction/action" dataTrigger="/alfresco-access/transaction/action" /> <RecordValue key="sub-actions" dataExtractor="simpleValue" dataSource="/alfresco-access/transaction/sub-actions" dataTrigger="/alfresco-access/transaction/sub-actions" /> <RecordValue key="path" dataExtractor="simpleValue" dataSource="/alfresco-access/transaction/path" dataTrigger="/alfresco-access/transaction/path" /> <RecordValue key="type" dataExtractor="simpleValue" dataSource="/alfresco-access/transaction/type" dataTrigger="/alfresco-access/transaction/type" /> </AuditPath> </Application> </Audit>
Still getting error. could someone please help me out by guiding what i am doing wrong.
Thanks,
Piyush Patel
05-21-2021 11:29 AM
The two are different components and work independent to each other, however I am not really sure if the failure is related to audit at all. But try adding below loggers and see what you get when failure happens. Also check what is the mimetype you see for the content uploaded via REST APIs
#Metadata extractor
log4j.logger.org.alfresco.repo.content.metadata.MetadataExtracterRegistry=DEBUG log4j.logger.org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter=DEBUG log4j.logger.org.alfresco.repo.content.metadata.TikaAutoMetadataExtracter=DEBUG
05-21-2021 11:59 AM
In fact, the poster is getting the error AFTER auditing (by about 40 seconds), so it is completely separate from it.
Explore our Alfresco products with the links below. Use labels to filter content by product module.