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

Custom metadata is throwing NPE

Avatar

Avatar
Springboard
Level 7
KiranVedantam1992
Level 7

Likes

174 likes

Total Posts

183 posts

Correct Reply

55 solutions
Top badges earned
Springboard
Give Back 5
Ignite 1
Affirm 50
Validate 1
View profile

Avatar
Springboard
Level 7
KiranVedantam1992
Level 7

Likes

174 likes

Total Posts

183 posts

Correct Reply

55 solutions
Top badges earned
Springboard
Give Back 5
Ignite 1
Affirm 50
Validate 1
View profile
KiranVedantam1992
Level 7

15-05-2021

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)

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Springboard
Level 7
KiranVedantam1992
Level 7

Likes

174 likes

Total Posts

183 posts

Correct Reply

55 solutions
Top badges earned
Springboard
Give Back 5
Ignite 1
Affirm 50
Validate 1
View profile

Avatar
Springboard
Level 7
KiranVedantam1992
Level 7

Likes

174 likes

Total Posts

183 posts

Correct Reply

55 solutions
Top badges earned
Springboard
Give Back 5
Ignite 1
Affirm 50
Validate 1
View profile
KiranVedantam1992
Level 7

01-06-2021

We did restart the instance to solve the issue.

 

Thanks,

Kiran Vedantam.

Answers (2)

Answers (2)

Avatar

Avatar
Applaud 25
Level 4
diksha_mishra
Level 4

Likes

58 likes

Total Posts

70 posts

Correct Reply

29 solutions
Top badges earned
Applaud 25
Give Back 5
Boost 50
Affirm 25
Give Back 3
View profile

Avatar
Applaud 25
Level 4
diksha_mishra
Level 4

Likes

58 likes

Total Posts

70 posts

Correct Reply

29 solutions
Top badges earned
Applaud 25
Give Back 5
Boost 50
Affirm 25
Give Back 3
View profile
diksha_mishra
Level 4

18-05-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)

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,115 likes

Total Posts

3,149 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,115 likes

Total Posts

3,149 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

15-05-2021

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