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

MohitKumarK
MohitKumarK
Online

Badges

Badges
17

Accepted Solutions

Accepted Solutions
7

Likes

Likes
28

Posts

Posts
27

Discussions

Discussions
0

Questions

Questions
27

Ideas

Ideas
0

Blog Posts

Blog Posts
0
Top badges earned by MohitKumarK
Customize the badges you want to showcase on your profile
Including external js into clientlibrary
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi, For us there is a 3rd party js needed to work on our site. Is there any option to include 3rd party js in our clientlibrary.

Views

72

Likes

0

Replies

2
Re: Null Pointer Exception in Servlet Testing which having OSGi configurations
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi @siva_k222 ,Instead of having when for config.apiUrl have when then for ratesIntegrationServiceImpl.getApiUrl and similarly for other variables.Thanks!

Views

68

Like

1

Replies

1
Re: I want to dynamically add dropdown to the dialog using servlet without ACS common
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi @Ronnie09 ,I can see you are having /apps as your servlet path probably that might be the issue. Please try with /bin or path which is allowed in your instance for your project.Thanks!

Views

54

Like

1

Replies

0
Re: Delegation Pattern for Sling Models returns null object
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
@Tarun202 ,Resource resource = req.getResourceResolver().getResource("/content/hq/en/testpage");in this line what ever the path you are giving, that resource should be of type myproject/components/content/navigation.

Views

86

Like

1

Replies

0
Re: Customized Rendition Servlet
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi @kevingtan , You can try with giving service.ranking:Integer= in component annotation. The higher the number the earlier in the filter chain. You can provide extension, selector as an array. Please refer this document on how to use attributes in component annotation.http://www.sgaemsolutions.com/2017/07/migration-of-scr-annotations-to-osgi-r6.html Thanks!

Views

89

Like

1

Replies

1
Re: Delegation Pattern for Sling Models returns null object
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi @Tarun202 ,As per your sling model, you are extending for navigation component. But you are trying to adapt a page as your navigation model. May be thats the reason you are getting null. Try to adapt a resource which is of type (myproject/components/content/navigation).Remember this navigation component should extend (sling:resourceSuperType) as core navigation component.Thanks!

Views

93

Like

1

Replies

2
Re: Delegation Pattern for Sling Models returns null object
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi @Tarun202 , In order to use sling delegation, you have to have adaptable of your sling model as SlingHttpServletRequest and resourceType property in model annotation. your component should have property slingResourceSuperType pointed to right component. https://aemexplained.wordpress.com/aem-guide/extending-component-using-sling-delegation/ In your case whatever the resource you are trying to adapt. It should point to a component which has this slingResourceSuperType in it. if you can share s...

Views

129

Like

1

Replies

4
Re: Recommended way Sling Servlet Post method to send json raw data
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
When doing a ajax call use something like below var square = {};square.length = 10;square.width = 10;$.ajax(url: url,data: JSON.stringify(square),dataType: “json”contentType: “application/json”,Type: “POST”); while reading in servlet you can use like below: String requestBody = request.getReader().lines().collect(Collectirs.joining());you can use any Utils class to convert from string to json or java bean. Thanks!

Views

106

Like

1

Replies

0
Re: AEM 6.5 - References in service class are null when extended
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi @Raghul87 ,I feel you need to inject BaseClass in your ExtendedClass. Inheritance might not work in services I guess.Thanks!

Views

105

Like

1

Replies

0
Re: junit5 and Mockito tests not injecting the ResourceResolverFactory
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi @RobertHarper , If you can send me sample test class how you are trying to do will help.

Views

347

Like

1

Replies

0
Re: Json object giving null value after sending json array to the sling Servlet
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi @bangar50 , When doing a ajax call use something like below var square = {};square.length = 10;square.width = 10;$.ajax(url: url,data: JSON.stringify(square),dataType: “json”contentType: “application/json”, ); while reading in servlet you can use like below: String requestBody = request.getReader().lines().collect(Collectirs.joining());you can use any Utils class to convert from string to json or java bean. Thanks!

Views

66

Like

1

Replies

0
Re: junit5 and Mockito tests not injecting the ResourceResolverFactory
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi @RobertHarper ,while including references as mock objects you need to use injectMocks for your actual servlet class. Take an example myServlet is using ResourceResolverFactory your code would look like below. @MockResourceResolver resolver; @MockResourceResolverFactory factory; @InjectMocksMyServlet myServlet = new MyServlet (); and you can use lenient when method to simulate mock on factory to give resource resolver lenient().when(factor.getServiceResourceResolver(anyMap())).thenReturn(resol...

Views

379

Like

1

Replies

2
Re: AEM 6.5 & Sightly Condition with in list
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi @SonuR1 , use condition like this${page.title}<\a>in css you can add styles to active class. Thanks!

Views

77

Likes

2

Replies

0
Re: ACS Versioned clientlibs not working in AEM 6.5
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi @RamTejaReddy ,We also experienced same problem when we upgraded our AEM version. Please check what is your current version of AEM and ACS commons version you are using.6.5.7 version of aem and above has to use ACS 4.11.2 version or above. Also please check if you have Osgi configuration correct and in right node structure such that it is loading in your instance. Thankyou.

Views

191

Likes

3

Replies

1
Re: Unit Test for a service using JobManger api
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi @Dody ,You still need to do assertions based on your class that you intended to test. That is the main purpose of writing a test case. In your case you are writing a junit class for a service so you can assert outcome of methods inside it. Please mark correct answer such that wider people can refer this question.Thanks!

Views

89

Like

1

Replies

1
Re: Unit Test for a service using JobManger api
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi @Dody ,Since you are mocking JobManager and not actually initializing it, you will not get actual working on the service and hence every operation that you do with JobManager has to be handled by you in test class accordingly. Refer this example:@Mockprivate ResourceResolver resolver; @Mockprivate ResourceResolverFactory factory; @InjectMocksprivate MyService myService; now if someMethod() in myService is calling factory.getServiceResourceResolver() method you have to tell your test method wa...

Views

112

Likes

2

Replies

3
Re: Mocking JobManager in junit unit TEst
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi @Dody ,You have to use @Mock for JobManager and after this line @InjectMocks for private MyCustomService myCustomService = new MyCustomService () which inject all your mocks to your service mock. @Mockprivate JobManager jobManager; @InjectMocksprivate MyCustomService myCustomService = new MyCustomService (); Just curious, you said you are myCustomService, by the name it implies you are testing a service (which could be a interface). Does this line is valid private MyCustomService myCustomServ...

Views

128

Like

1

Replies

1
Re: Unable to edit the custom dependent editable input field for RTE.
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi @swathialeti , You can create a cq:dialog on what field you required to be shown in RTE plugin and then a js has to be written to handle showing of dialog in plugin, reading presaved values and saving values. This js has to be added to "cq.authoring.dialog.all" for it to load in RTE. Refer to http://experience-aem.blogspot.com/2019/04/aem-65-touch-ui-rte-rich-text-editor-structured-content-plugin-creating-tooltips.html on steps to create a custom RTE plugin. Thanks!

Views

94

Like

1

Replies

0
Re: Selectbox with dynamic datasource in multifield
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi @Reini- ,Can you share how the values are saved in component node (crx/de).Thanks!

Views

90

Like

1

Replies

1
Re: com.adobe.granite.workflow.WorkflowException: Document is in a disposed state!
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi @SebasRios34 ,Can you please provide saveDocumentToFilesystem this file or else what is the line at 81, just to see what can be the issue.Thanks!

Views

64

Like

1

Replies

0
Re: Reference new properties in HTML file
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi @odabio ,I can see you have created a new sling model for ImageView, but in the HTL you are using "com.adobe.cq.wcm.core.components.models.form.Options" which may not have your new members. What you can do is extend Options model with your sling model and then add you new members and then you can refer sling model which you have created. Refer this article https://github.com/adobe/aem-core-wcm-components/wiki/Delegation-Pattern-for-Sling-Models on extending a core component. Thanks!

Views

121

Like

1

Replies

0
Re: Versioned clientlibs not working for js
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Got the fix. was using older version of acs commons which is not compatible with 6.5.7 version of aem and hence the issue. It will be resolved in ACS 4.11.2 version

Views

825

Likes

2

Replies

2
Re: Versioned clientlibs not working for js
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
yes. its working for css only for js i have issue.

Views

859

Likes

0

Replies

0
Re: Versioned clientlibs not working for js
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
@BrianKasingli , we have rewriter under config folder only.

Views

872

Like

1

Replies

3
Versioned clientlibs not working for js
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
ACS Commons Versioned clientlibs is not applying for all the js files on the page. It is working in higher environments and not in local. Any idea why this is happening?

Views

943

Likes

0

Replies

8
Re: Filter issue in higher environments
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
Hi @Sanket_Kumbharkhane ,There is an existing lucene index which the query is resolving to. but there are more number of nodes/pages to search.

Views

313

Like

1

Replies

0
Filter issue in higher environments
Avatar
Ignite 3
Level 4
MohitKumarK
Level 4

Likes

28 likes

Total Posts

27 posts

Correct reply

7 solutions
Top badges earned
Ignite 3
Boost 25
Affirm 5
Springboard
Establish
View profile
MohitKumarK
- Adobe Experience Manager
In higher environments (stage, prod) filter option is not working in sites.html.Below error is observed in logs.ET /mnt/overlay/granite/ui/content/shell/omnisearch/searchresults.html HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException org.apache.jackrabbit.oak.query.RuntimeNodeTraversalException: The query read or traversed more than 100000 nodes. To avoid affecting other tasks, processing was stopped. at org.apache.jackrabbit.oak.query.FilterIterato...

Views

355

Likes

0

Replies

3