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

ravi_joshi
ravi_joshi
Online

Badges

Badges
14

Accepted Solutions

Accepted Solutions
1

Likes

Likes
23

Posts

Posts
29

Discussions

Discussions
7

Questions

Questions
22

Ideas

Ideas
0

Blog Posts

Blog Posts
0
Top badges earned by ravi_joshi
Customize the badges you want to showcase on your profile
Re: Override com.day.cq.rewriter.linkchecker.impl.LinkCheckerTransformerFactory
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
As per I understood I think we have two approaches for this requirement. One by using dispatcher re-write rules with etc mapping and another one with the "Day CQ Link Checker Transformer". And default link transformer configuration rules applies to all the pages. But there is a work around, we can add pages to the "blacklisted paths" attribute in the configuration which you want with html extension. This attribute will block the extension stripping rule for these pages and sub pages. Example : I...

Views

54

Likes

2

Replies

0
Re: Override com.day.cq.rewriter.linkchecker.impl.LinkCheckerTransformerFactory
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Hi @savi50 , I think we can achieve this scenario by using dispatcher re-write rules and etc mapping. please check this Article it might help. Thanks,Ravi

Views

65

Like

1

Replies

2
Re: is it possible to query AEM page/assets content using GraphQL ?
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Hi Kishore, That is correct. But I was thinking about an custom implementation to expose AEM page content over graphQL. Any thoughts on that ? ThanksRavi Joshi

Views

65

Like

1

Replies

0
Re: Need to return JsonObject from a getter in sling model exporter
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Thanks @Vijayalakshmi_S . It is working solution for the problem. And It was a great learning about "JsonRawValue" annotation.

Views

141

Like

1

Replies

0
Re: Need to return JsonObject from a getter in sling model exporter
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Thanks Santosh for sharing this article. It was a good learning in it and was very helpful.

Views

142

Like

1

Replies

0
Re: Need to return JsonObject from a getter in sling model exporter
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Thanks Kishore. It worked and was a good learning about object node.

Views

144

Like

1

Replies

0
Re: Need to return JsonObject from a getter in sling model exporter
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
I would like to add more points on my requirenment.Like we have an exporter and that exporter has a method say "public JSONobject getJson()" and it is returning a json object. And when I call exporter it will give me the json returned from the "getJson" as "'json':'{{JSON string from the getJson method}}'". Now I was thinking if we can replace the string as json object only like " 'json':{{JSON string from the getJson method}} " this.Please let me know if you have any thoughts on the same.

Views

177

Like

1

Replies

0
Re: Need to return JsonObject from a getter in sling model exporter
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Hi Shiva, This article is really helpful. But I would like to add more points on my requirenment.Like we have an exporter and that exporter has a method say "public JSONobject getJson()" and it is returning a json object. And when I call exporter it will give me the json returned from the "getJson" as "'json':'{{JSON string from the getJson method}}'". Now I was thinking if we can replace the string as json object only like " 'json':{{JSON string from the getJson method}} " this.Please let me kn...

Views

177

Like

1

Replies

0
Need to return JsonObject from a getter in sling model exporter
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Hi, I have a requienment where I need to return json object from one getter method of sling model exporter. please suggest your thoughts. Thanks,Ravi Joshi

Views

196

Likes

0

Replies

9
Graphiql editor error on aem 6.5.10
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager Headless
Hi Team, I am facing an error while opening graphiql editor on aem 6.5.10. And my AEM instance is running on 4502 port.Could you please suggest any thoughts on the same ? Error :{"message": "Failed to execute 'text' on 'Response': body stream already read","stack": "TypeError: Failed to execute 'text' on 'Response': body stream already read\n at http://localhost:4502/content/graphiql.html:81:33"} Thanks,Ravi Joshi

Views

198

Likes

0

Replies

1
is it possible to query AEM page/assets content using GraphQL ?
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager

Views

134

Likes

0

Replies

3
Re: "java.lang.AbstractMethodError" while accessing content element of Content fragment
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
@Vijayalakshmi_S Thank you. It was really helpful. Now we will try to change the logic accordingly.

Views

110

Like

1

Replies

0
Re: resource resolver mock in test not able to adapt query builder
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
@bangar50 Adding resource resolved the null pointer exception for the query builder adaption but now jcr session throwing null pointer for the below code snippet./*Working now*/QueryBuilder queryBuilder = resourceResolver.adaptTo(QueryBuilder.class);/*Throwing nullpointer error after adapting session*/Query query = queryBuilder.createQuery(PredicateGroup.create(map),resourceResolver.adaptTo(Session.class));

Views

295

Like

1

Replies

0
Re: resource resolver mock in test not able to adapt query builder
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Hi @Dinu_Arya , I have tested with both the Injections but still the same. Giving null for querybuilder when using @SlingObject or @OsgiService. Thanks,Ravi Joshi

Views

296

Like

1

Replies

1
Re: Not able to drag & drop the custom workflow step
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
@aemninja Okay. I have tested the same in my local aem 6.5 it is loading fine. Can you check whether the below java file throwing any error or not. "com.test.aem.core.workflows.CustomWorkflowStep". Check error.log after drag and drop of the component.

Views

275

Like

1

Replies

0
Re: resource resolver mock in test not able to adapt query builder
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
@bangar50 Currently it is using slinghttpservlet only. I will check with both and update on the same.

Views

298

Like

1

Replies

1
Re: Not able to drag & drop the custom workflow step
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Hi @aemninja , If you are not able to locate your component in model parsys. Most probably that is because your model is using default design from libs where your component group is not allowed. To allow your component group I will will suggest to follow below steps : 1. Copy the node (Overlay) from "/libs/settings/wcm/designs/default" to "/apps/settings/wcm/designs/default". You can change name "default" to anything as per need. 2. Go to "/apps/settings/wcm/designs/default/jcr:content/model/flo...

Views

285

Like

1

Replies

2
"java.lang.AbstractMethodError" while accessing content element of Content fragment
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Hi There, I am getting the below error while mocking content fragment in mockito. Error :java.lang.AbstractMethodError: io.wcm.testing.mock.aem.MockContentFragment_ContentElement_Structured.getValue()Lcom/adobe/cq/dam/cfm/FragmentData; Code Snippet : ContentElement content = contentFragment.get().getElement("somefragment");FragmentData data = content.getValue();List someFragmentList = Arrays.asList((String[]) data.getValue()); I can see that contentFragment is not null. And content is also not n...

Views

145

Likes

0

Replies

2
Re: resource resolver mock in test not able to adapt query builder
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Hi @bangar50 , Thanks for replying. We are using @Inject annotation for resource resolver injection. I tried using Via annotation as well but no luck. Let me know if you have any other thought on the same. Thanks,Ravi Joshi

Views

315

Like

1

Replies

3
resource resolver mock in test not able to adapt query builder
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Hi , I am facing one issue with sling model junit mock. I have created an resource resolver mock in the test file and in the model we are adapting resource resolver to query builder. while accessing through test case it is returning null value. Model code snippet :resourceResolver.adaptTo(QueryBuilder.class) Resource resolver mock is created through AEM context object only. Let me know your thoughts on the same. Thanks,Ravi Joshi

Views

331

Likes

0

Replies

10
Re: Content fragment mock giving "java.lang.UnsupportedOperationException"
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Hi @Vijayalakshmi_S , Thank you. That was a very helpful explanation. But could you suggest how we can mock "getTemplate()" in the same reference. Or there are any other way to get template or content fragment model title to replace this method invocation. Thanks,Ravi Joshi

Views

138

Like

1

Replies

1
Content fragment mock giving "java.lang.UnsupportedOperationException"
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Hi, Facing one issue while calling "getTemplate" method of content fragment mock. Please let me know your thoughts on the same. issue details:java.lang.UnsupportedOperationExceptionat io.wcm.testing.mock.aem.MockContentFragment.getTemplate(MockContentFragment.java:232) Junit code snippet:contentFragment = contentFragmentResource.adaptTo(ContentFragment.class);lenient().when(contentFragment.getTemplate().getTitle()).thenReturn("testing");Thanks,Ravi Joshi

Views

164

Likes

0

Replies

3
Re: How to access sling request object in OSGI Service
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Hi @ibishika , Amazing. Thank you. I think overloading will be useful in this scenerio. Thank you,Ravi Joshi

Views

257

Like

1

Replies

0
Re: How to access sling request object in OSGI Service
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Hi @ibishika 1. No, we are Injecting the service in model using @OSGIService and then we calling a method of that service in model itself. The reason we are not changing signature is that the perticular service has a lot of references in the code. So we are tring to avoid that much change impact. 2. No, component can be used multiple times on the page. Thanks,Ravi Joshi

Views

274

Like

1

Replies

2
Re: How to access sling request object in OSGI Service
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Hi @Cherry_Baddam , The above answer was very insightful. And sorry I forgot to mention that we cannot change method signature. Situation is, that I have a sling model with a dialog field injected to it and I want to use that field value in an OSGi service method when that method is is getting called in the service. But as I said I cannot change method signature. So I thought of using that field as an request attribute by setting it in the request object inside the model and use it in the servic...

Views

289

Like

1

Replies

0
Re: How to access sling request object in OSGI Service
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Hi @ibishika , Thank you for such a quick response. As I mentioned in the above reply changing method signature is out of scope. Could you please provide your suggestions on the same approach ? Like how I can transfer a value from model to OSGI service without changing method signature. We have only resource resolver available and we cannot change method signature. Thanks,Ravi Joshi

Views

291

Like

1

Replies

0
Re: How to access sling request object in OSGI Service
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Hi @lukaszm , Thank you for such a quick response . And The answer was very insightful. And my apologies that I forgot to mention that we cannot change method signature to pass request parameter. Situation is, that I have sling model with a dialog field injected to it and I want to use that field value in a OSGi service method when it is getting called. But as I said I cannot change method signature that is out of scope.So I thought of using that field as an request attribute by setting it in mo...

Views

293

Like

1

Replies

1
How to access sling request object in OSGI Service
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
Hello, Could you please suggest how I can access request object in an OSGI Service ? I tried @reference SlingHttpServletRequest request but it is giving null. Thanks,Ravi Joshi

Views

320

Likes

0

Replies

11
Re: Adobe 6.5 cloud: "package file parameter missing" during package upload
Avatar
Affirm 1
Level 3
ravi_joshi
Level 3

Likes

23 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Ignite 5
Boost 10
Give Back 10
Ignite 3
View profile
ravi_joshi
- Adobe Experience Manager
@Stochino I am also having the same problem. In my case the package size was small so I used "crx-quickstart/install" folder to load the package on server startup . But I think that would not be a proper solution to the problem.As per my analysis I have also tried all the suggested methods but nothing worked. Please do let me know if you have any progress on the solution or the root cause for the same.

Views

152

Like

1

Replies

1