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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

NPE thrown when accessing a folder in TouchUI Assets (DAM)

squid267
Level 4
Level 4

I can't figure why this Null Pointer Exception is getting thrown when a user try to access a folder in the dam. I am logged in as admin and this folder was working yesterday. This is only occuring on our QA server. The dev server has the exact same code package and the folders work. QA is open to regular content authors, so I'm wondering if a user screwed something up.

 

GET /mnt/overlay/dam/gui/content/assets/jcr:content/views/card.0.20.html/content/dam/pdfs HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException java.lang.NullPointerException: null at com.day.cq.search.impl.builder.QueryBuilderImpl.createResourceResolver(QueryBuilderImpl.java:194) at com.day.cq.search.impl.builder.QueryImpl.getResourceResolver(QueryImpl.java:231) at com.day.cq.search.impl.result.HitImpl.getResource(HitImpl.java:108) at com.day.cq.search.impl.result.SearchResultImpl$HitBasedResourceIterator.next(SearchResultImpl.java:398) at com.day.cq.search.impl.result.SearchResultImpl$HitBasedResourceIterator.next(SearchResultImpl.java:384) at org.apache.jsp.libs.dam.gui.coral.components.commons.ui.shell.datasources.assetsdatasource.assetsdatasource_jsp._jspService(assetsdatasource_jsp.java:319) 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:284) at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.java:102) at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngineFactory.java:536) at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:388) at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:184) at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:491) at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:546) at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)

I had to truncate error log, but I think this should be enough.

1 Accepted Solution
squid267
Correct answer by
Level 4
Level 4

I was able to solve with help from Rackspace CAS. Apparently the jcr:primarytype of the folder needs to be sling:OrderedFolder and not sling:Folder

View solution in original post

4 Replies
smacdonald2008
Level 10
Level 10

Can you access the folder in Classic DAM View? 

squid267
Level 4
Level 4

Yes i can access it in classic ui. Very odd.

squid267
Correct answer by
Level 4
Level 4

I was able to solve with help from Rackspace CAS. Apparently the jcr:primarytype of the folder needs to be sling:OrderedFolder and not sling:Folder

View solution in original post

Dibakar
Level 1
Level 1

squid267​ - Could you please help me with the steps.

Even though I see the similar NPE, but jcr:primarytype of my asset folder is sling:OrderedFolder.

The error:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<html>

    <head><title>500 Internal Server Error</title></head>

    <body>

        <h1>Internal Server Error</h1>

        <p>Cannot serve request to /mnt/overlay/dam/gui/content/assets/jcr:content/views/card.0.20.html/content/dam/consumer-direct/random-images in /libs/dam/gui/coral/components/admin/contentrenderer/card/asset/asset.jsp</p>

       

        <h3>Exception:</h3>

<pre>

java.lang.NullPointerException

at com.day.cq.dam.commons.util.SchemaFormHelper.getMasterForms(SchemaFormHelper.java:157)

at com.day.cq.dam.commons.ui.editor.metadata.MetadataEditorHelperImpl.mergeResources(MetadataEditorHelperImpl.java:266)

at com.day.cq.dam.commons.ui.editor.metadata.MetadataEditorHelperImpl.getFormResource(MetadataEditorHelperImpl.java:315)