Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Custom metadata is throwing NPE

Avatar

Community Advisor

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)
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

We did restart the instance to solve the issue.

 

Thanks,

Kiran Vedantam.

View solution in original post

5 Replies

Avatar

Employee Advisor

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

Avatar

Community Advisor
Updated my question with the error log

Avatar

Employee Advisor
The best to my knowledge: It's a content error, potentially a problem with a non-existing (or empty) property name, but it's hard to say which. What AEM bundle version of "com.day.cq.dam.cq-dam-commons" are you using?

Avatar

Community Advisor

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)

Avatar

Correct answer by
Community Advisor

We did restart the instance to solve the issue.

 

Thanks,

Kiran Vedantam.