Steps to reproduce
Add an empty resource to the resource explorer.
You get an error in logs:
Catégorie : org.ametys.cms.content.indexing.solr.SolrIndexer
URI de la requête : /odf/plugins/core-ui/servercomm/messages.xml
Message : Unable to index resource at /ametys-internal:sites/www/ametys-internal:resources/mcc-2013-2017-fr-but-1-chimie-k42w91qi-2024-10-07.xls
Emplacement : org.ametys.cms.content.indexing.solr.SolrResourceIndexer.indexResourceContent(SolrResourceIndexer.java:310)
Pile d'appels :
org.apache.tika.exception.ZeroByteFileException: InputStream must have > 0 bytes
at org.apache.tika.parser.AutoDetectParser#parse:153
at org.apache.tika.Tika#parseToString:525
at org.apache.tika.Tika#parseToString:495
at org.apache.tika.Tika#parseToString:557
at org.ametys.cms.content.indexing.solr.SolrResourceIndexer#indexResourceContent:281
at org.ametys.cms.content.indexing.solr.SolrResourceIndexer#indexResource:188
at org.ametys.cms.content.indexing.solr.SolrResourceIndexer#indexResource:120
at org.ametys.cms.content.indexing.solr.SolrIndexer#doIndexResource:2061
at org.ametys.cms.content.indexing.solr.SolrIndexer#indexResource:1888
at org.ametys.cms.indexing.explorer.SolrIndexResourceObserver#onResourceCreated:44
at org.ametys.cms.indexing.explorer.AbstractSolrIndexResourceObserver#_index:142
at org.ametys.cms.indexing.explorer.AbstractSolrIndexResourceObserver#observe:103
at org.ametys.core.observation.ObservationManager$ParallelAsyncObserve#_observe:510
at org.ametys.core.observation.ObservationManager$AbstractAsyncObserve#call:447
at java.base/java.util.concurrent.FutureTask#run:264
at java.base/java.util.concurrent.ThreadPoolExecutor#runWorker:1136
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker#run:635
at java.base/java.lang.Thread#run:840
We should be able to index the resource even if it is empty.