Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Can't see changes when reinstalling same snapshot bundle

Avatar

Level 2

Hello,

I am trying to install a bundle through the usual mvn clean install -PautoInstallBundle profile. The bundle is xyz-1.2-SNAPSHOT.jar

The problem is that when I try to reinstall the same bundle I can't see any changes as if the bundle is not installed at all.

These are the only information I can get from the logs:

16.06.2017 10:24:07.410 INFO  com.adobe.aem.sightly.ide.impl.SightlyBeanFinderImpl Detected a change at /apps/xyz/install/xyz-1.2-SNAPSHOT.jar, rebuilding the beans information

16.06.2017 10:24:07.410 INFO  com.adobe.aem.sightly.ide.impl.SightlyBeanFinderImpl starting looking for bundles...

16.06.2017 10:24:08.410 INFO  com.adobe.aem.sightly.ide.impl.SightlyBeanFinderImpl Detected a change at /apps/xyz/install/xyz-1.2-SNAPSHOT.jar, rebuilding the beans information

16.06.2017 10:24:08.410 INFO  com.adobe.aem.sightly.ide.impl.SightlyBeanFinderImpl starting looking for bundles...

Do you know why I can't see the changes?

Thank you for your help

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Veena,

If you replace a bundle "mybundle-1.2.3.jar" with a newer bundle, but the same version number (in the Osgi metadata), this new bundle will never be started, but it will be ignored.

You have to increase the version number of the bundle to make it work. In a development mode you can also use SNAPSHOT versions; and for these the situation is different. Installing a fresh mybundle-1.2.3-SNAPSHOT.jar will replace an already existing mybundle-1.2.3-SNAPSHOT.jar

kind regards,

Jörg

View solution in original post

9 Replies

Avatar

Level 10

Try - mvn -PautoInstallPackage install

As you can see in articles like this:  Adobe Experience Manager Help | Creating your first Adobe Experience Manager 6.2 Project using Adobe...

This is the Maven command used to deploy.

Avatar

Employee Advisor

What version of AEM are you using? Do you see any messages in the log related to the OsgiInstaller thread?

kind regards,
Jörg

Avatar

Level 7

Hello

are you not able to see the changes particularly for a class or nothing is getting change. Kindly download the jar and see if you are able to the changes there in a decompiler.

worth would be to deleting the bundle from crxde and deploy again.

if it's only for a specific class adding immediate = true might help.

most probably you have done all these but worth a shot if not

thanks

Avatar

Level 10

Another option is to deploy bundle manually.

Avatar

Employee Advisor

Check if you have a node below /system/sling/installer/jcr/pauseInstallation in the repository. If there is a node, remove it.

kind regards,

Jörg

Avatar

Community Advisor

We have faced similar issues with almost all versions of AEM. Most of the time when we install a  bundle with same version number as previous never picks up the changes, mostly in our servers . I have sometimes faced this issue in my local too. But then I have the option of going to my felix console , delete the bundle and install the new bundle which I think should not be a good practice.

Normally, for every deployment, we increase our version number (that's a REM practice too ), (even if it is a minor fix or hardly a fix ) so that the bundles are refreshed properly. 

I never got a chance to dig into the cause of this issue, but I would be happy to know that too

Thanks

Veena

Avatar

Correct answer by
Employee Advisor

Veena,

If you replace a bundle "mybundle-1.2.3.jar" with a newer bundle, but the same version number (in the Osgi metadata), this new bundle will never be started, but it will be ignored.

You have to increase the version number of the bundle to make it work. In a development mode you can also use SNAPSHOT versions; and for these the situation is different. Installing a fresh mybundle-1.2.3-SNAPSHOT.jar will replace an already existing mybundle-1.2.3-SNAPSHOT.jar

kind regards,

Jörg

Avatar

Community Advisor

oh waw Jorg. ! that resolves my dilemma. Now I have an answer .

So this answers why our servers never picked a bundle installation with same jar version ( as for any deployment, we should remove the SNAPSHOT and none of our bundles have those for a real deployment )

Thanks a lot Jörg Hoh​ .

Thanks

Veena

Avatar

Community Advisor

I would really love to have a share option for the answers we get here as in Stack Overflow