Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Custom metadata is throwing NPE

KiranVedantam1992
Community Advisor
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
KiranVedantam1992
Correct answer by
Community Advisor
Community Advisor

We did restart the instance to solve the issue.

 

Thanks,

Kiran Vedantam.

View solution in original post

5 Replies
Jörg_Hoh
Employee
Employee

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

Jörg_Hoh
Employee
Employee
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?
diksha_mishra
Community Advisor
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)

KiranVedantam1992
Correct answer by
Community Advisor
Community Advisor

We did restart the instance to solve the issue.

 

Thanks,

Kiran Vedantam.

View solution in original post