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

SOLVED

Osgi Bundle is showing old version

chetan001
Level 2
Level 2

Hi Everyone.

 

I have installed osgi bundle with updated version. It is installed and in active state.

But in bundle location it is showing old version. How it can come with latest version ?

 

 

chetan001_0-1629196949604.png

 

1 Accepted Solution
Bimmi_Soi
Correct answer by
Community Advisor
Community Advisor

Hi @chetan001 ,

 

Cause
OSGi configurations were bound to the OSGi component with a matching PID. When you uninstall an older version of a custom bundle but not the associated OSGi configurations, then install a newer version of the bundle. The configurations stay bound to the no longer existing bundle.

 

Resolution :
To avoid this issue, do not uninstall the older version of the OSGi bundle before installing a newer version. Install the newer code package with higher version number over the old one.

Note for later AEM versions

Newer implementations of OSGi Declarative Services do not bind configurations anymore when delivering them to a component. This is to reduce resource consumption and avoid race conditions and is in guidance with the specification. In general, configuration binding is considered legacy from the OSGi specification point of view. In AEM 6.3 and later versions, if you want to know whether your component got a configuration, you can go to the components tab, look at a component and see whether it has a PID.

 

Hope this helps!!!
Thanks

 

View solution in original post

5 Replies
diksha_mishra
Community Advisor
Community Advisor

@chetan001 this usually happens when you uninstall an older version of a custom bundle but not the associated OSGi configurations, then install a newer version of the bundle. The configurations stay bound to the no longer existing bundle.

To avoid this issue, do not uninstall the older version of the OSGi bundle before installing a newer version.  Install the newer code package with higher version number over the old one.

if you want to know whether your component got a configuration, you can go to the components tab, look at a component and see whether it has a PID.

Bimmi_Soi
Correct answer by
Community Advisor
Community Advisor

Hi @chetan001 ,

 

Cause
OSGi configurations were bound to the OSGi component with a matching PID. When you uninstall an older version of a custom bundle but not the associated OSGi configurations, then install a newer version of the bundle. The configurations stay bound to the no longer existing bundle.

 

Resolution :
To avoid this issue, do not uninstall the older version of the OSGi bundle before installing a newer version. Install the newer code package with higher version number over the old one.

Note for later AEM versions

Newer implementations of OSGi Declarative Services do not bind configurations anymore when delivering them to a component. This is to reduce resource consumption and avoid race conditions and is in guidance with the specification. In general, configuration binding is considered legacy from the OSGi specification point of view. In AEM 6.3 and later versions, if you want to know whether your component got a configuration, you can go to the components tab, look at a component and see whether it has a PID.

 

Hope this helps!!!
Thanks

 

View solution in original post

Love_Sharma
Level 4
Level 4

Could be the possibility, many times your package manager show a message "Different version seems to be installed" as shown below. Uninstalling the package from CRX manager and redeploy your code fix this problem.

Screen Shot 2021-08-17 at 12.38.04 PM.png

Jörg_Hoh
Employee
Employee

The bundle location does not play any role. It''s left with the initial state when you do a "simple" update.

Important is only the explicit bundle version number.

Arun_Patidar
Community Advisor
Community Advisor

Hi,

Can you check if you have any nodes under /system/sling/installer/jcr/pauseInstallation if yes then delete it and restart the Apache Sling JCR Installer bundle

 

if there are no node at above location, just simple restart Apache Sling JCR Installer bundle