Publishing assets stuck on status “Later”
The asset was successfully published after changing the cq:tags
property type to String Array.
Description description
Environment
Adobe Experience Manager (AEM)
Issue
Continuous failure occurs while publishing multiple assets in AEM, especially images. Often their images got stuck on a never-ending status “Later” while at other times, they were stuck on the state “Pending”, failing into “Not Published”.
When trying to “Quick Publish” an asset, the error.log
displays the following:
error.log
:
*IP 8675309009900 POST /libs/xxx/core/content/reference.json HTTP/1.1 org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught Throwable
javax.servlet.ServletException: java.lang.RuntimeException: error while getting tags for '/content/dam/path-to-asset/jcr:content/metadata' at
com.xxx.xx.xxx.core.impl.reference.ActivationReferenceSearchServlet.doGet(ActivationReferenceSearchServlet.java:140) com.xxx.xx.xxx.xx-xxx-core:5.14.28 at
com.xxx.xx.xxx.core.impl.reference.ActivationReferenceSearchServlet.doPost(ActivationReferenceSearchServlet.java:100) com.xxx.xx.xxx.xx-xxx-core:5.14.28 at
org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:146) org.apache.sling.api:2.25.0 at
org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) org.apache.sling.api:2.25.0 at
org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) org.apache.sling.api:2.25.0 at
org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:583) org.apache.sling.engine:2.9.0 at
org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45) org.apache.sling.engine:2.9.0
…
Caused by: javax.jcr.ValueFormatException: cq:tags = <value> is single-valued. at
org.apache.jackrabbit.oak.jcr.delegate.PropertyDelegate.getMultiState(PropertyDelegate.java:137) org.apache.jackrabbit.oak-jcr:1.42.0.T10140008675309-b8e0cd6 at
org.apache.jackrabbit.oak.jcr.session.PropertyImpl$6.perform(PropertyImpl.java:266) org.apache.jackrabbit.oak-jcr:1.42.0.T10140008675309-b8e0cd6 at
org.apache.jackrabbit.oak.jcr.session.PropertyImpl$6.perform(PropertyImpl.java:261) org.apache.jackrabbit.oak-jcr:1.42.0.T10140008675309-b8e0cd6 at
org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:210) org.apache.jackrabbit.oak-jcr:1.42.0.T10140008675309-b8e0cd6 at
org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:112) org.apache.jackrabbit.oak-jcr:1.42.0.T10140008675309-b8e0cd6 at
org.apache.jackrabbit.oak.jcr.session.PropertyImpl.getValues(PropertyImpl.java:261) org.apache.jackrabbit.oak-jcr:1.42.0.T10140008675309-b8e0cd6 at
com.xxx.xx.tagging.impl.JcrTagManagerImpl.getTags(JcrTagManagerImpl.java:797) com.xxx.xx.xx-tagging:5.13.12*
Resolution resolution
As can be seen in the error.log
, the issue is caused by "javax.jcr.ValueFormatException: cq:tags = <value> is single-valued"
The cq:tags
property is actually a String Array
, which is a multi-valued property. However, in this case, it was of type String
which led to the error.
Upon changing the cq:tags
property type to String Array
, the asset was successfully published.
Documentation Link
More help on the cq:tags
property can be found in the following documentation link in the AEM User Guide:
AEM Tagging Framework