Code not reflecting after build, duplicate instances of components is getting created. | Community
Skip to main content
Manu_Mathew_
New Participant
Jun 9, 2023 11:34 AM UTC
Solved

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

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.
Manu_Mathew_
Manu_Mathew_Accepted solution
New Participant
Jun 12, 2023 4:20 AM UTC

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.

8 replies

Manu_Mathew_
Manu_Mathew_AuthorAccepted solution
New Participant
Jun 12, 2023 4:20 AM UTC

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.

Translate
DPrakashRaj
New Participant
Jun 9, 2023 4:36 PM UTC

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

Translate
Manu_Mathew_
New Participant
Jun 9, 2023 4:58 PM UTC

@dprakashraj Only one bundle instance 

Translate
EstebanBustamante
New Participant
Jun 9, 2023 1:47 PM UTC

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

Translate
Esteban Bustamante
Manu_Mathew_
New Participant
Jun 9, 2023 2:12 PM UTC

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

 

Translate
EstebanBustamante
New Participant
Jun 9, 2023 4:47 PM UTC

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.

Translate
Esteban Bustamante
aanchal-sikka
New Participant
Jun 9, 2023 12:58 PM UTC

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

 

Translate
Aanchal Sikka
Manu_Mathew_
New Participant
Jun 9, 2023 1:20 PM UTC

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

 

 

Translate