AEM 6.3 Scr annotation issue while upgrade | Community
Skip to main content
gokulkrish
Level 2
November 30, 2017
Solved

AEM 6.3 Scr annotation issue while upgrade

  • November 30, 2017
  • 9 replies
  • 3762 views

HI All,

      As you all know SCR annotations are deprecated in 6.3 and we are moving towards OSGI R6 annotations, there was no workaround in 6.3 to overcome the issues with existing code written using SCR annotations in lower version AEM. Configuration binding is not updating jar associated with it.

I found blogs related to the difference of the two and the implementation of OSGI R6, but couldn't find a solution for the later issue. Can anyone help in resolving this issue, as changing the annotations in existing code involves more manual effort and it would be better if there is a hot fix or some workaround for it .

Thanks,

Gokul

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

SRC annotation still work in AEM 6.3 - you can still build a project with Maven Archetype 10 and use for example @SlingServlet - which would not be available in DS annotations - ie - Maven Archetype 11.

But you are correct - if you have SRC annotations in a project and you want to use DS - you have to manually rebuild the code.

9 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
November 30, 2017

SRC annotation still work in AEM 6.3 - you can still build a project with Maven Archetype 10 and use for example @SlingServlet - which would not be available in DS annotations - ie - Maven Archetype 11.

But you are correct - if you have SRC annotations in a project and you want to use DS - you have to manually rebuild the code.

gokulkrish
Level 2
December 6, 2017

Thanks for the reply. we are facing another issue which is configuration binding . It is not automatically happening when we deploy the code in aem 6.3. Can you please provide your insights on that ?

Level 2
March 25, 2018

Hi gokulkrish/smacdonald2008,

I am facing the same issue. We are using multimodule-content-package-archetype and upgrading from AEM 6.1 to 6.3.

Problem we are facing is that, the components (Replication listeners) are not working correctly. When we check config manager we find that Listener is bound to launchpad:resources/install/0/org.apache.sling.scripting.core-2.0.44.jar rather than our application bundle.

This causes as issue when during the component activation as the OSGI configuration doesn't load.

Can you please reply if you have found a fix for your problem?

Thanks and Regards,

Deepak

Level 2
March 25, 2018

just to give some more information on the issue.

1. We first un-installed the package that we had.

2. Deployed the package again.

3. At this point, in the configuration manager tab, bundle column shows blank and in component tab we can see the OSGI properties in the component

4. When we trigger the functionality which invokes the replication listener and the component works fine

5. Next invocation on same listener doesn't work properly and component looses, OSGI property. On Configuration manager tab, bundle column has launchpad:resources/install/0/org.apache.sling.scripting.core-2.0.44.jar.

After this all further invocation fails as the OSGI configuration is bound to wrong bundle. Please advise what may be causing this issue.

Same code works fine in AEM 6.3

Level 2
June 1, 2018

is this issue resolved? I am also facing same issue.

smacdonald2008
Level 10
June 1, 2018

Did you rebuild your code with latest dependencies?

Level 2
June 1, 2018

Yes, i did and still getting the same issue.

Level 2
June 4, 2018

Worked fine for me. Thanks a lot.