NullPointerException on assetRendererFactory after Upgrade
written-by
Daniel Mijarra
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
legacy-article
learn-legacy-article-disclaimer-text
Issue
- After upgrading to Liferay DXP 2025.q1, the upgrade process completes successfully. However, upon restarting the server, the following error is shown in the log:
ERROR [render_portlet_jsp:122] Cannot invoke "com.liferay.asset.kernel.model.AssetRendererFactory.getAssetRenderer(Object, int)" because "assetRendererFactory" is null
java.lang.NullPointerException:
Cannot invoke "com.liferay.asset.kernel.model.AssetRendererFactory.getAssetRenderer(Object, int)" because "assetRendererFactory" is null
at com.liferay.journal.content.web.internal.display.context.JournalContentDisplayContext._getAssetEntry(JournalContentDisplayContext.java:1103) ~[?:?]
at com.liferay.journal.content.web.internal.display.context.JournalContentDisplayContext.<init>(JournalContentDisplayContext.java:1034) ~[?:?]
at com.liferay.journal.content.web.internal.display.context.JournalContentDisplayContext.create(JournalContentDisplayContext.java:119) ~[?:?]
...
Resolution
- If the error is displayed at the end of server startup and is not displayed again afterwards, one cause may be that the start page is being automatically launched before all services are available.
- To check if this is the issue, the following property can be added to the
portal-ext.properties file with a value of blank, so the default page is not automatically launched to the browser:
browser.launcher.url=
- This property is intended for non-production environments and is used to launch a specific URL (by default
http://localhost:8080) after server startup.
did-this-article-resolve-your-issue