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

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

jayv25585659
Level 6
Level 6

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

 

 

 

 

 

 

0 Replies