Code not reflecting after build, duplicate instances of components is getting created. | Community
Skip to main content
Manu_Mathew_
Community Advisor
Community Advisor
June 9, 2023
Solved

Code not reflecting after build, duplicate instances of components is getting created.

  • June 9, 2023
  • 4 replies
  • 1677 views

Hi Guys,

 

The code deployed is not getting reflected in our instances lately, not sure what is causing the issue all of a sudden. 

We have observed there are duplicate component instances of the same implementation were getting created under -- .../system/console/components window.

 

As a workaround, deactivating the old duplicate one sometimes solves the issue w.r.t to servlets, but it seems to be affecting the configuration as well and deactivating is having no effect; It would reappear when the instance restarts.

 

How can we delete these duplicates and prevent the same from happening?

 

Have any of you faced a similar issue?

 

we have already tried these- http://www.aemcq5tutorials.com/tutorials/duplicated-osgi-configurations-upgrade/

 

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 Manu_Mathew_

Thanks for the replies,

we have figured out the issue-

it was due to the scope defined in the maven dependency, we had to change from compile to provided in the pom file.

4 replies

aanchal-sikka
Community Advisor
Community Advisor
June 9, 2023

@manu_mathew_ Has there been any change in the component ID for these components? Or any change in the symbolic name of the bundles?

 

Aanchal Sikka
Manu_Mathew_
Community Advisor
Community Advisor
June 9, 2023

@aanchal-sikka it's with the same name, with different component ids-

 

 

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 9, 2023

The duplications are only in your custom OSGI components? Did you upgrade anything lately? Are you able to reproduce this constantly locally? I think would be valuable to understand if this is related to your code or to the AEM instance

Esteban Bustamante
Manu_Mathew_
Community Advisor
Community Advisor
June 9, 2023

@estebanbustamante Yes mainly noticed for custom OSGI components, and yes it is reproducing locally as well.

 

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 9, 2023

I think once it happened to me, but I don't really remember how I solved it. Can you try to delete every reference from your project and then install an old version(release) of your code? Locally of course. If that works, just try to install the latest from your code, that can give you an idea if there is something in your code that recently introduced such odd behavior.

Esteban Bustamante
DPrakashRaj
Community Advisor
Community Advisor
June 9, 2023

Do you see more than one bundle of your project as well installed on your aem instance?

Manu_Mathew_
Community Advisor
Community Advisor
June 9, 2023

@dprakashraj Only one bundle instance 

Manu_Mathew_
Community Advisor
Manu_Mathew_Community AdvisorAuthorAccepted solution
Community Advisor
June 12, 2023

Thanks for the replies,

we have figured out the issue-

it was due to the scope defined in the maven dependency, we had to change from compile to provided in the pom file.