AEM 6.3 Scr annotation issue while upgrade | Community
Skip to main content
gokulkrish
Level 2
Nov 30, 2017 3:03 PM UTC
Solved

AEM 6.3 Scr annotation issue while upgrade

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.
smacdonald2008
smacdonald2008Accepted solution
Level 10
Nov 30, 2017 3:06 PM UTC

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

Level 2
Jun 4, 2018 5:21 PM UTC

Worked fine for me. Thanks a lot.

Translate
Level 2
Jun 2, 2018 11:39 PM UTC
Level 2
Jun 1, 2018 10:03 PM UTC

Yes, i did and still getting the same issue.

Translate
smacdonald2008
Level 10
Jun 1, 2018 8:47 PM UTC

Did you rebuild your code with latest dependencies?

Translate
Level 2
Jun 1, 2018 8:44 PM UTC

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

Translate
Level 2
Mar 25, 2018 9:36 AM UTC

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

Translate
Level 2
Mar 25, 2018 8:50 AM UTC

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

Translate
gokulkrish
Level 2
Dec 6, 2017 6:24 AM UTC

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 ?

Translate
smacdonald2008
smacdonald2008Accepted solution
Level 10
Nov 30, 2017 3:06 PM UTC

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.

Translate