Custom metadata is throwing NPE | Community
Skip to main content
Kiran_Vedantam
Community Advisor
Community Advisor
May 15, 2021
Solved

Custom metadata is throwing NPE

  • May 15, 2021
  • 3 replies
  • 1838 views

I have created a custom metadata and once it is applied to a asset folder, it is throwing NPE. Strange thing is, it is happening only in our QA instance. It is working fine in classic UI.

 

I have installed the same code with same assets in dev and is working fine. I did check a similar post here, but the solution is of no use.

 

Can someone help here, please.

 

Exception:

15.05.2021 06:46:49.955 *ERROR* [35.182.69.133 [1621061209908] GET /mnt/overlay/dam/gui/content/assets/jcr:content/views/card.0.20.html/content/dam/XXX/XXX/XXX/images HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2199)
at com.google.common.cache.LocalCache.get(LocalCache.java:3932)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4721)
at com.day.cq.dam.commons.ui.editor.metadata.impl.MetadataEditorHelperImpl.traverseForm(MetadataEditorHelperImpl.java:221)
at com.day.cq.dam.commons.ui.editor.metadata.impl.MetadataEditorHelperImpl.traverseForm(MetadataEditorHelperImpl.java:214)
at com.day.cq.dam.commons.ui.editor.metadata.impl.MetadataEditorHelperImpl.traverseForm(MetadataEditorHelperImpl.java:214)
at com.day.cq.dam.commons.ui.editor.metadata.impl.MetadataEditorHelperImpl.getEmptyMandatoryMetadata(MetadataEditorHelperImpl.java:153)
at com.day.cq.dam.commons.ui.editor.metadata.impl.MetadataEditorHelperImpl.getInvalidFormItems(MetadataEditorHelperImpl.java:144)
at org.apache.jsp.libs.dam.gui.coral.components.admin.contentrenderer.card.common.card_002dbanner_jsp.hasValidMetadata(card_002dbanner_jsp.java:1499)
at org.apache.jsp.libs.dam.gui.coral.components.admin.contentrenderer.card.common.card_002dbanner_jsp._jspService(card_002dbanner_jsp.java:1924)
at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:502)
at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:449)
at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java:339)
at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.java:97)
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Kiran_Vedantam

We did restart the instance to solve the issue.

 

Thanks,

Kiran Vedantam.

3 replies

joerghoh
Adobe Employee
Adobe Employee
May 15, 2021

Can you please share the at least the first 20 lines of the stacktrace?

Kiran_Vedantam
Community Advisor
Community Advisor
May 18, 2021
Updated my question with the error log
diksha_mishra
Community Advisor
Community Advisor
May 18, 2021

Have you registered the custom metadata property as a namespace in your QA instance? More info here: https://techrevel.blog/2020/01/23/aem-custom-namespace/ (non-Adobe)

Kiran_Vedantam
Community Advisor
Kiran_VedantamCommunity AdvisorAuthorAccepted solution
Community Advisor
June 1, 2021

We did restart the instance to solve the issue.

 

Thanks,

Kiran Vedantam.