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

ShagunMalik
Community profile ShagunMalik Level 3
Project Engineer
Hyderabad
11 BADGES
Level 3

Level 3

Learn more
Joined the community 11-11-2020 4:55:50 AM
Offline
Top badges earned by ShagunMalik
Customize the badges you want to showcase on your profile
Re: Getting error log "AEM failed to activate Use class"
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
Thank you everyone.@GnanendraPonnala @Bimmi_Soi @Ritesh_Mittal @Dipti_Chauhan

Views

233

Likes

0

Replies

0
Re: Getting error log "AEM failed to activate Use class"
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
Thank you @Dipti_Chauhan it is working fine now.

Views

229

Likes

0

Replies

0
Re: Getting error log "AEM failed to activate Use class"
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
Hey, @GnanendraPonnala I get your point but Even if I'm trying to access any other property of page which is of type String such as cq:template then still it is not working.

Views

233

Likes

0

Replies

0
Re: Getting error log "AEM failed to activate Use class"
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
One more doubt @Dipti_Chauhan, cq:tags is of type String[] in page property so that can be the issue as I'm storing it in String and not String[]?

Views

248

Likes

0

Replies

0
Re: Getting error log "AEM failed to activate Use class"
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
@Dipti_Chauhan, Here is my complete java code: Public class CategoryUse extends WCMUsePojo{private static final Logger logger =LoggerFactory.getlogger(CategoryUse.class)private String tag;private Page rootpage;ValueMap pageProperties; public String getTag{return tag;} public void activate() throws exception{rootpage=getCurrentPage;Resource res = getResourceResolver.getResource(rootpage.getPath()+"/jcr:content"); ValueMap pageProperties = res .getValueMap(); tag= (String) pageProperties.get("cq:t...

Views

269

Likes

0

Replies

0
Re: Getting error log "AEM failed to activate Use class"
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
@Dipti_Chauhan can you tell me how to convert rootpage,res and pageProperties to string so I can use Logger.info() command to see which object is null?

Views

295

Likes

0

Replies

0
Re: Getting error log "AEM failed to activate Use class"
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
@Dipti_Chauhan, thank you for that but the issue is still the same. I'm getting error as above and it is throwing NullPoineterException: null.

Views

312

Likes

0

Replies

0
Re: Getting error log "AEM failed to activate Use class"
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
Yes @Ritesh_Mittal, I'm getting NullPoineterException: null

Views

252

Likes

0

Replies

0
Getting error log "AEM failed to activate Use class"
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
Hey CommunityI have wriiten this basic code to get cq:tags property of current pagepublic Void activate throws exception{rootpage=getCurrentPage;Resource res = getResourceResolver.getResource(rootpage.getPath()+"/jcr:content/"); ValueMap pageProperties = res .getValueMap(); tag= (String) pageProperties.get("cq:tags", "Default value");logger.info(tag);} When I'm using creating object using HTL statement in HTMl file it is not displaying anything on page and error log says "AEM failed to activate ...

Views

393

Likes

0

Replies

18
Re: Not able to access jcr:content properties of currentP...
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
Ok @Ritesh_Mittal I will create a new thread for error logs and Thank you for resolving issue of getting page properties.

Views

153

Likes

0

Replies

0
Re: Not able to access jcr:content properties of currentP...
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
Hey @Ritesh_Mittal I'm getting logger to debug and when I see Error logs I found error "AEM failed to activate Use class". How to resolve it?I have made the changes that you suggested.

Views

181

Likes

0

Replies

0
Not able to access jcr:content properties of currentPage.
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
Hi Community,I have written this basic code to access jcr:content properties of my current page specifically cq:tags property but it is not working. public Void activate throws exception{rootpage=getCurrentPage;Resource res = getResourceResolver.getResource(rootpage.getPath); ValueMap pageProperties = res .getValueMap(); tag= (String) properties.get("cq:tags", "Default value");} When I'm using getter method to access the cq:tags property it is showing only Default Value and not the real value of...

Views

225

Likes

0

Replies

6
Re: Get current page property using POJO Class.
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
@Ritesh_Mittal, project policies. Cannot go in depth of it due to confidentiality. Can we achieve the same task using Nodes and Node Iterator?

Views

235

Likes

0

Replies

0
Re: Get current page property using POJO Class.
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
Hey @Ritesh_Mittal, can we achieve same task using Node iterator? If yes then please help how.

Views

256

Likes

0

Replies

0
Re: Get current page property using POJO Class.
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
Hey @Ritesh_Mittal , I just checked my Eclipse is using version as 1.7 and I cannot change it due to policies. can you tell me how do the same task using Node iterator?

Views

291

Likes

0

Replies

0
Re: Get current page property using POJO Class.
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
Hey @Ritesh_Mittal , getting error "Map cannot be resolved to a type","HashMap cannot be resolved to a type","'<>' operator is not allowed for source level below 1.7" and "Resource Specification not allowed for source level below 1.7" and "resourceResolverFactory acnnot be resolved."

Views

275

Likes

0

Replies

0
Re: Get current page property using POJO Class.
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
And I watched the video link you provided for Subservice but I'm not clear about what is SubService and why is it used. Can you please explain if possible?

Views

293

Likes

0

Replies

0
Re: Get current page property using POJO Class.
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
Hey @Ritesh_Mittal , earlier I was providing specific path but now I wish to access jcr:content properties of each current page. Please explain how to do that.

Views

304

Likes

0

Replies

0
Get current page property using POJO Class.
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
I wish to access the current page jcr:content property using POJO class and read properties of current page specifically cq:tags and display that in my html page.Please help me with the creating POJO class code for it and then accessing it in HTML.

Views

393

Likes

0

Replies

10
Re: Want to use Tags to create meta data
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
Hey @vmadala ,Still getting error "PostConstruct cannot be resolved to a type"

Views

297

Likes

0

Replies

0
Re: Want to use Tags to create meta data
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
Hey @vmadala , I'm getting multiple errors. List is :"defaultInjectionStrategy cannot be resolved to a variable" ,"Model cannot be resolved to a type","SlingObject cannot be resolved to a type","Tag cannot be resolved to a type","PostConstruct cannot be resolved to a type","TagManager cannot be resolved to a type","Iterator cannot be resolved to a type" Please help.

Views

321

Likes

0

Replies

0
Re: Want to use Tags to create meta data
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
@Bimmi_Soi 

Views

281

Likes

0

Replies

0
Re: Want to use Tags to create meta data
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
Hey, need a clarification, What do you mean by "yourservice". I want to get tags attached to the page.

Views

288

Likes

0

Replies

0
Re: Want to use Tags to create meta data
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
Hey @Ritesh_Mittal , thank you for it but still there are some errors. When I'm using line "resolver = resolverFactory.getServiceResourceResolver(param);" it is showing error: "param cannot be resolved to a variable","resolver cannot be resolved to a variable" and "resolverFactory cannot be resolved". Please help.

Views

318

Likes

0

Replies

0
Re: Want to use Tags to create meta data
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
and when I'm declaring resolver it is showing error that "resolver cannot be resolved to a variable"

Views

345

Likes

0

Replies

0
Re: Want to use Tags to create meta data
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
Hey @Ritesh_Mittal , when I'm using your steps it is showing that ValueMap cannot be resolved to a type. What should I do?

Views

353

Likes

0

Replies

0
Want to use Tags to create meta data
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
I need to write a Pojo class to get the value of cq:tags and then create meta data to get displayed as :meta Name='tag_name' content='xyz'

Views

522

Likes

0

Replies

16
How to how to get the page of child pages in aem java using servlet and base path
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
I want to create a servlet which will be using a base path for example : /content/abc/xyz/qweI need to access specific child properties of the given base path and convert it into JSON format using java servlet.Please help me with the process and explaining the steps involved like how will my java servlet get data from /content/abc/xyz/qwe i.e what will be code to use this path and how to access specific properties and converting into JSON.

Views

790

Likes

0

Replies

2
Re: Not able to use Math.ceil in Javascript
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
Thank you

Views

200

Likes

0

Replies

0
Re: Not able to use Math.ceil in Javascript
Avatar
Ignite 10
Level 3
ShagunMalik
Level 3

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Ignite 10
Give Back 25
Ignite 5
Give Back 10
Ignite 3
View profile
ShagunMalik
- Adobe Experience Manager
Thank you.

Views

199

Likes

0

Replies

0
Likes from