Issue
- I get an error like this in the logs when uploading a file:
Caused by: java.lang.ClassCastException: class com.liferay.portal.repository.liferayrepository.model.LiferayFileEntry cannot be cast to class com.liferay.portal.kernel.model.BaseModel (com.liferay.portal.repository.liferayrepository.model.LiferayFileEntry and com.liferay.portal.kernel.model.BaseModel are in unnamed module of loader com.liferay.shielded.container.internal.ShieldedContainerClassLoader @337fb1a5)
at com.liferay.portal.search.internal.indexer.DefaultIndexer.reindex(DefaultIndexer.java:45) ~[?:?]
Environment
- 2023.q4.3 (others possibly as well)
Resolution
-
Please have a look at https://liferay.atlassian.net/browse/LPS-142523 which seems to feature a very similar error. It seems it isrelated to indexing, to an indexing setting:
Disable System Settings > Search > System Scope > Index Registry > Buffered
https://learn.liferay.com/web/guest/w/dxp/using-search/search-configuration-reference
(see Indexer Registry section) - therefore, please try to enable this setting and see if it solves the issue