Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

ACS commons: Cannot retrieve Marketo cloud config when viewing --published-- pages

Avatar

Level 9

situation:

  1. author has no problem reading the Marketo config. I can see the Marketo form list and I can see the Marketo form.
  2. In the publisher, it's the reverse. I get an exception (message as seen in the error.log below). The error thrown is in one of the lines in the Marketo code that's part of ACS commons.
  3. In addition to no.2 because the publisher cannot retrieve the config, the Marketo form is not getting rendered on the page.
  4. In both author and publisher, the Marketo config has been saved in this path: /conf/myapp/settings/cloudconfigs/Marketo.
  5. in both author+publisher, the page property cq:conf has been set to "/conf/myapp"
  6. I am using ACS commons 4.8.6

Any ideas on how to fix/workaround? Maybe I forgot to configure something in the publisher?

-----------

ACS commons/Marketo HTL code

 

<sly data-sly-use.configMgr="com.adobe.acs.commons.marketo.MarketoClientConfigurationManager" data-sly-use.marketoForm="com.adobe.acs.commons.marketo.MarketoForm">

 

-----------

Line 56 of the com.adobe.acs.commons.marketo.MarketoClientConfigurationManagerImpl Java code as mentioned in the error below (line 56 starts at the "return configRsrcRslvr")

 

    return configRsrcRslvr.getResourceCollection(resource, "settings", "cloudconfigs").stream().filter(c -> {
      boolean matches = "/apps/acs-commons/templates/utilities/marketocloudconfig"
          .equals(c.getValueMap().get("jcr:content/cq:template", ""));
      log.debug("Resource: {} matches: {}", c, matches);
      return matches;
    }).findFirst().map(c -> c.getChild(JcrConstants.JCR_CONTENT)).map(c -> c.adaptTo(MarketoClientConfiguration.class))
        .orElse(null);

 

-----------

error.log

 

pastebin link to the full error message (too long to post here): https://pastebin.com/jXcZ39PR

 

snippet of the error.log (I guess the important bits are included)

 

18.05.2021 02:40:38.757 *ERROR* [10.44.0.24 [1621305635657] GET /content/myapp/wtcp365/jlprojects/jltest4.html HTTP/1.1] org.apache.sling.scripting.sightly.render.ObjectModel Cannot access method configuration on object com.adobe.acs.commons.marketo.impl.MarketoClientConfigurationManagerImpl@5775d311
java.lang.reflect.InvocationTargetException: null
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.apache.sling.scripting.sightly.render.ObjectModel.invokeBeanMethod(ObjectModel.java:418) [org.apache.sling.scripting.sightly.runtime:1.1.0.1_4_0]
    at org.apache.sling.scripting.sightly.render.ObjectModel.resolveProperty(ObjectModel.java:128) [org.apache.sling.scripting.sightly.runtime:1.1.0.1_4_0]
    at org.apache.sling.scripting.sightly.render.AbstractRuntimeObjectModel.getProperty(AbstractRuntimeObjectModel.java:138) [org.apache.sling.scripting.sightly.runtime:1.1.0.1_4_0]
    at org.apache.sling.scripting.sightly.impl.engine.runtime.SlingRuntimeObjectModel.getProperty(SlingRuntimeObjectModel.java:32) [org.apache.sling.scripting.sightly:1.1.2.1_4_0]
    at org.apache.sling.scripting.sightly.render.AbstractRuntimeObjectModel.resolveProperty(AbstractRuntimeObjectModel.java:74) [org.apache.sling.scripting.sightly.runtime:1.1.0.1_4_0]
    at org.apache.sling.scripting.sightly.apps.acs__002d__commons.components.content.embeddable.marketo.marketo_html.render(marketo_html.java:88)
    at org.apache.sling.scripting.sightly.render.RenderUnit.render(RenderUnit.java:50) [org.apache.sling.scripting.sightly.runtime:1.1.0.1_4_0]

---SNIP---

    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [org.apache.felix.http.jetty:4.0.16]
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [org.apache.felix.http.jetty:4.0.16]
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [org.apache.felix.http.jetty:4.0.16]
    at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388) [org.apache.felix.http.jetty:4.0.16]
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) [org.apache.felix.http.jetty:4.0.16]
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) [org.apache.felix.http.jetty:4.0.16]
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NullPointerException: null
    at com.adobe.acs.commons.marketo.impl.MarketoClientConfigurationManagerImpl.getConfiguration(MarketoClientConfigurationManagerImpl.java:56) [com.adobe.acs.acs-aem-commons-bundle:4.8.6]
    ... 378 common frames omitted

 

 

 

 

 

 

1 Reply

Avatar

Employee

this issue still there. Has anyone fixed this or any fix available from acs commons side ?

Error log till date:

Caused by: java.lang.NullPointerException: null

at com.adobe.acs.commons.marketo.impl.MarketoClientConfigurationManagerImpl.getConfiguration(MarketoClientConfigurationManagerImpl.java:56) [com.adobe.acs.acs-aem-commons-bundle:4.7.0]

... 294 common frames omitted

01.07.2022 14:32:22.397 *ERROR* [0:0:0:0:0:0:0:1 [1656666142022] GET /content/we-retail/us/en.html HTTP/1.1] org.apache.sling.scripting.sightly.compiler.util.ObjectModel Cannot access method configuration on object com.adobe.acs.commons.marketo.impl.MarketoClientConfigurationManagerImpl@49e36769

java.lang.reflect.InvocationTargetException: null

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

 

Clearly, it seems that for the anonymous user i.e. for non-logged-in user the code is failing to read the marketo

configurations.

Anyone aware of any fix given for this until now ?