Maintenance is coming...
Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
NullPointerException on getBaseModelDocument in liferay 7. 4 ga10 ce
Actually I am doing indexing with embedded elasticsearch but when my indexer class calls doGetDocument method and it invokes the getBaseModelDocument it is returning null with these logs
java.lang.NullPointerException: null
at
com.liferay.portal.search.internal.spi.model.index.contributor.StagingDocumentContributor.contribute(StagingDocumentContributor.java:52)
~[?:?]
at
com.liferay.portal.kernel.search.BaseIndexer.getBaseModelDocument(BaseIndexer.java:1257)
~[portal-kernel.jar:?]
at com.liferay.portal.kernel.search.BaseIndexer.getBaseModelDocument(BaseIndexer.java:1196)
protected Document doGetDocument(EntityName object) throws Exception {
Document document = null;
try {
document = getBaseModelDocument(getPortletId(),object);
}catch (Exception e)
{
logger.error(e);
}
return document;
}
Copyright © 2026 Liferay, Inc
• Privacy Policy
Powered by Liferay™
Node: liferay-5d8787c668-gp5gj:8080: