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

Upgrading a sling servlet from CQ 5.5 to AEM 6.2

Avatar

Avatar
Validate 1
Level 1
bhavanij4849392
Level 1

Likes

0 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
View profile

Avatar
Validate 1
Level 1
bhavanij4849392
Level 1

Likes

0 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
View profile
bhavanij4849392
Level 1

28-05-2018

Hi,

I have this old Pdf generation service which was written for cq 5.5. The service is based on a servlet written for 5.5. The issue is the servlet bundle seems to be active. on 6.2 But i am not able to invoke the servlet. i have no experience working on CQ 5.5.

I think the servlet needs to be rewritten completely. below is the servlet header.  In 5.5 the servlet path is actually under the /apps folder.

Also the source code is loaded in the apps folder and the transformation xsl is referenced from the /apps/src folder. The servlet is also bundled in a jar with the name - com.pdfservice.PDFService.

@SlingServlet(paths = { "/apps/csr/services/PdfBuilder.pdf" }, methods = { "GET" }, metatype = true)

@Properties( {

        @Property(name = "service.pid", value = "com.pdfservice.Service", propertyPrivate = false),

        @Property(name = "service.description", value = "A servlet used for generating PDFs from CQ5 templates.", propertyPrivate = false),

        @Property(name = "service.vendor", value = " Test Group- stp@testGroup.com", propertyPrivate = false) })

public class Service extends SlingAllMethodsServlet {

  private static final String XSL_PATH = "apps/csr/src/com.pdfservice.PDFService/src/issue-builder-transformation.xsl";

Can anyone please help on how to upgrade the servlet for compatibility with AEM 6.2.

Thanks,

Bhavani

Replies

Avatar

Avatar
Validate 1
Level 1
bhavanij4849392
Level 1

Likes

0 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
View profile

Avatar
Validate 1
Level 1
bhavanij4849392
Level 1

Likes

0 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
View profile
bhavanij4849392
Level 1

30-05-2018

The jar package is active in system/console/ and i can also see it system/console/components

Avatar

Avatar
Give Back 50
MVP
Vijayalakshmi_S
MVP

Likes

446 likes

Total Posts

585 posts

Correct Reply

195 solutions
Top badges earned
Give Back 50
Give Back 5
Ignite 10
Ignite 5
Ignite 3
View profile

Avatar
Give Back 50
MVP
Vijayalakshmi_S
MVP

Likes

446 likes

Total Posts

585 posts

Correct Reply

195 solutions
Top badges earned
Give Back 50
Give Back 5
Ignite 10
Ignite 5
Ignite 3
View profile
Vijayalakshmi_S
MVP

30-05-2018

HI,

We need to use OSGI DS annotations instead of Felix SCR annotation.

Official OSGi Declarative Services Annotations in AEM - Adobe Experience Manager | AEM/CQ | Apache S...

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

30-05-2018

The servlet should be rewritten using AEM 6.2 APIs - including using the AEM UBER 6.2 jar