Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Upgrading from AEM 6.0 to 6.3 - Code deployment question

Avatar

Level 2

Hello All,

this is my first post in this forum. At Cisco we are currently using AEM 6.0 and have built a pretty big code around it :-) We are planning to upgrade the AEM version to 6.3 and have started a POC.

We have just installed the 6.3 on a sandbox environment and trying to deploy the existing code to it. Some of the bundles are not getting active. There are bunch of errors in the error.log but they are all pretty much same about some version complain. I have pasted a couple of them below. I think we need to change some of the com.day.cq.* jar versions in our pom.xml file but not exactly sure which ones. Can someone please help us out here ?

Thanks

- Atul

23.03.2017 16:56:31.950 *INFO* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.tasks.BundleStartTask Could not start bundle it.cits.ciscoworkforcecontentservices.wem.cdc-devops.workflows [617]. Reason: {}. Will retry.
org.osgi.framework.BundleException: Unable to resolve it.cits.ciscoworkforcecontentservices.wem.cdc-devops.workflows [617](R 617.0): missing requirement [it.cits.ciscoworkforcecontentservices.wem.cdc-devops.workflows [617](R 617.0)] osgi.wiring.package; (&(osgi.wiring.package=com.cisco.wem.services)(version>=1.35.0)(!(version>=2.0.0))) [caused by: Unable to resolve it.cits.ciscoworkforcecontentservices.wem.cdc-devops.services [608](R 608.0): missing requirement [it.cits.ciscoworkforcecontentservices.wem.cdc-devops.services [608](R 608.0)] osgi.wiring.package; (&(osgi.wiring.package=com.cisco.wem.author.common.services)(version>=1.35.0)(!(version>=2.0.0))) [caused by: Unable to resolve it.cits.ciscoworkforcecontentservices.wem.cdc-devops.authoringcommonutils [530](R 530.0): missing requirement [it.cits.ciscoworkforcecontentservices.wem.cdc-devops.authoringcommonutils [530](R 530.0)] osgi.wiring.package; (&(osgi.wiring.package=com.day.cq.replication)(version>=5.5.0)(!(version>=6.0.0)))]] Unresolved requirements: [[it.cits.ciscoworkforcecontentservices.wem.cdc-devops.workflows [617](R 617.0)] osgi.wiring.package; (&(osgi.wiring.package=com.cisco.wem.services)(version>=1.35.0)(!(version>=2.0.0)))]
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4112)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2118)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984)
        at org.apache.sling.installer.core.impl.tasks.BundleStartTask.execute(BundleStartTask.java:97)
        at org.apache.sling.installer.core.impl.OsgiInstallerImpl.doExecuteTasks(OsgiInstallerImpl.java:894)
        at org.apache.sling.installer.core.impl.OsgiInstallerImpl.executeTasks(OsgiInstallerImpl.java:729)
        at org.apache.sling.installer.core.impl.OsgiInstallerImpl.run(OsgiInstallerImpl.java:286)
        at java.lang.Thread.run(Thread.java:745)
23.03.2017 16:56:32.018 *INFO* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.tasks.BundleStartTask Could not start bundle it.cits.ciscoworkforcecontentservices.wem.cdc-devops.authoringcommonutils [530]. Reason: {}. Will retry.
org.osgi.framework.BundleException: Unable to resolve it.cits.ciscoworkforcecontentservices.wem.cdc-devops.authoringcommonutils [530](R 530.0): missing requirement [it.cits.ciscoworkforcecontentservices.wem.cdc-devops.authoringcommonutils [530](R 530.0)] osgi.wiring.package; (&(osgi.wiring.package=com.day.cq.replication)(version>=5.5.0)(!(version>=6.0.0))) Unresolved requirements: [[it.cits.ciscoworkforcecontentservices.wem.cdc-devops.authoringcommonutils [530](R 530.0)] osgi.wiring.package; (&(osgi.wiring.package=com.day.cq.replication)(version>=5.5.0)(!(version>=6.0.0)))]
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4112)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2118)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984)

1 Accepted Solution

Avatar

Correct answer by
Level 3

Hi

Sorry couldn't revert earlier. I would suggest following approach:

Deploy your code base to AEM 6.3 and simply try to build. Your build will show errors related to jars which are not compatible with 6.3. For such dependencies, you should look into Adobe's maven repository first. In case you are not able to find the jar, then go to OSGI bundles and search for the dependency name. Keep note of the bundle id and now go to your crx-repository on the file system. Let's say the bundle number is 102. Go to crx-quickstart->launchpad->felix->bundle-<id> (bundle-102) . You can check the .info file, it will contain the same information as you can see if you open the bundle from OSGI bundle console.

I am attaching screenshots too. 

I think I downloaded uber-jar for 6.3 beta latest load. Let me get back to you on this by tomorrow EOD.

Thanks, Dipti 

View solution in original post

13 Replies

Avatar

Level 5

Can someone confirm from Adobe, is AEM6.3 available to use ? i was under the impression that only beta is available and actual version would be released in May.

Avatar

Administrator

AEM 6.3 is not released yet though if someone attended Adobe Digital summit 2017 they would have seen some demo/Announcements.

Currently Beta program is going on.

~kautuk 



Kautuk Sahni

Avatar

Level 3

Hi Atul

Generally with launch of new AEM version, following documents are released:
https://docs.adobe.com/docs/en/aem/6-2/develop/ref/javadoc/deprecated-list.html#package
https://docs.adobe.com/docs/en/aem/6-2/develop/ref/diff-previous/changes.html
https://docs.adobe.com/docs/en/aem/6-2/release-notes/deprecated-removed-features.html
 
This helps in identifying deprecations.
As of now AEM 6.3 is in Beta state and I am sure it can be used only for some POC purposes. But since it is Beta, you should actually wait for the final launch to see what is deprecated. After couple of weeks I see a new Beta load being released, so not sure you downloaded which Beta load jar.

Anyhow, to make your code compatible with upgrade, you would need to update the dependencies in pom.xml. I generally check the latest version from Maven repository: https://repo.adobe.com/nexus/content/repositories/public/com/. But sometimes you would need to get the version used in AEM installer (as this repo doesn't get updated frequently) and that can be retrieved from AEM's OSGI console. Let me know if you need to know the steps for this.

Thanks, Dipti

Avatar

Level 2

Thanks for the response. Just to clarify, we are part of the AEM 6.3 Beta program and right now we are only trying to do the POC. Our goal is to find out as many code compatibility issues with 6.3 as possible, once the final version is released we may have to do some more tweaks.

We have kind of done a pretty heavy customization ;-) with around 100+ OSGi bundles and several UI changes in the ExtJS files.

Our pom.xml is quite large, unfortunately I couldn't attach that to this post. I am not sure what attachment types are supported.

So are you suggesting that for each of the jcr/sling/cq related dependency, we should go back to the Maven repository and get the latest version ? How would I know which version is supported by 6.3 ?

Also can you please us know the steps to retrieve from OSGi console ? I am relatively new to AEM and still learning!

Thanks

- Atul

Avatar

Employee

On the beta-site you can use the beta 6.3 uber-jar.

That resolves these dependency errors.

Avatar

Level 2

Thanks Feike !

I guess the beta-site is closed now, can you please suggest from where else I can get the beta 6.3 uber-jar ?

- Atul

Avatar

Correct answer by
Level 3

Hi

Sorry couldn't revert earlier. I would suggest following approach:

Deploy your code base to AEM 6.3 and simply try to build. Your build will show errors related to jars which are not compatible with 6.3. For such dependencies, you should look into Adobe's maven repository first. In case you are not able to find the jar, then go to OSGI bundles and search for the dependency name. Keep note of the bundle id and now go to your crx-repository on the file system. Let's say the bundle number is 102. Go to crx-quickstart->launchpad->felix->bundle-<id> (bundle-102) . You can check the .info file, it will contain the same information as you can see if you open the bundle from OSGI bundle console.

I am attaching screenshots too. 

I think I downloaded uber-jar for 6.3 beta latest load. Let me get back to you on this by tomorrow EOD.

Thanks, Dipti 

Avatar

Level 3

Sorry I am unable to attach uber jar here.  But if you are able to access 'https://www.adobeprerelease.com/beta/04FD755F-8BC0-4CE4-CDA6-5E2503624B3C' , then you should be able to download the jar too.

Avatar

Level 2

Hi Dipti,

sorry I got preoccupied in other priorities so couldn't reply. I was able to narrow down inactive bundles from 30 to 9 by trial & error. As per your suggestion, I got the right versions of jars from the installed bundles and replaced in our pom.xml. However I am having a new issue now.

There are 2 bundles that use classes from “org.apache.sling.event” package. As per our understanding, these classes are gone in 6.3 version 

  1. org.apache.sling.event.EventUtil;
  2. org.apache.sling.event.EventPropertiesMap;

We were able to find the solution for #1 as below

Current (6.0):

if (EventUtil.isLocal(event)) {

Future (6.3):

if (event.getProperty("event.application") == null) {

However we don’t know how to refactor the code for #2. This is how our current code looks like

Current (6.0):

ArrayList modification = (ArrayList) event.getProperty(MODIFICATIONS);
if (modification != null) {
log.debug("Modicfications is not null");
EventPropertiesMap map = (EventPropertiesMap) modification.get(0);
String type = (String) map.get("type");
log.debug("User ID: {}", userId);
log.debug("Event type is ++++++++ " + type);
String nodePath = null;
if (map.containsKey("path")) {
nodePath = (String) map.get("path");
log.debug("page path is " + nodePath);
}

Can someone let us know how to refactor this code for 6.3 ?

Also I tried to get the uber-jar for 6.3 beta from the below link, but got access denied error.

https://download.adobeprerelease.com/04FD755F-8BC0-4CE4-CDA6-5E2503624B3C/1489727500/cq-quickstart-b...

 

Thanks

- Atul

Avatar

Level 3

Hi Dipti,

Can you please share path where we can download 6.3 uber jar. Not able to find the same