Jitendra S.Tomar wrote... I think I understand it. it seems
CommerceService object does not get created for every resource. In
generally, CommerceService object gets initialized on the page who has
product references. Try to adapto Node and print Node path. Adapted Node
object isn't null then need to understand how commerceService object is
initiated. Resource resource = context.create().resource("/etc/.....");
Node tempNode = resource.adapTo(Node.class); print tempNode.getPath();
By using AEM mocks, we get the AEM context and through that context we
get resource.It is explained in below
link:-http://wcm.io/testing/aem-mock/usage.htmlI tried to use Sling
mocks also but it was not working.
kautuksahni wrote... Can you please share with us complete error
message/log? ~kautuk I have used below code:Case 1:-Resource resource =
commerceService = resource.adaptTo(CommerceService.class);In this case
we are getting commerceService as null.Case 2:-public final AemContext
context = new AemContext();CommerceService mockCommerce =
When I am using AEM Mocks for writing Junits, I am not able to perform
adaptTo functionality on the resource generated from AEM context.Its
giving Invocation Target Exception.My AEM version is 6.0 and aem mock
version is 1.2.4.The things which I have tried is from the below
I have added a recommendation in mbox to display it on the site but its
not showing as no of clicks and visitors in that recommendation is
0.Previously click and visits were getting captured through analytics in
recommendation and it was displaying on page but somehow its not working
now.I think there is some prob in integration of analytics with
recommendation. I have referred this
but I am not able to find out the so...
Hi,I have tried using on/off property as well. But due to some reason on
property deactivates already activated page till the specified on time.
Scenario: I have one abc.html which is already activated, i have
modified this page and then specified on time for 10mins later. After
activating this page; in between those 10mins, page remains deactivated
and then again activates back after specified on time.Please help
In addition to above workflow, i have also tried using basic workflow ie
just by addition of activate page component (please refer image below);
but due to some reason this workflow also doesn't seem to work.
Thanks, that seems to be working for me.However that has fixed my out of
the box activate later issue. I still need help for custom workflow
which makes use of Activate Page/Asset component. (Process:
com.day.cq.wcm.workflow.process.ActivatePageProcess) I can still observe
same error in my stack trace.