Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install app on aem 6.5.9 #805

Closed
bartoszWesolowski opened this issue Sep 2, 2022 · 4 comments
Closed

Unable to install app on aem 6.5.9 #805

bartoszWesolowski opened this issue Sep 2, 2022 · 4 comments
Assignees
Labels
Milestone

Comments

@bartoszWesolowski
Copy link

bartoszWesolowski commented Sep 2, 2022

Describe the bug
Installing the all package on AEM 6.5.9 (with all required dependencies present) fails due to missing cloud dependencies:

com.adobe.cq.dam.download.api,version=[3.4,4) -- Cannot be resolved but is not required
com.adobe.cq.dam.download.spi,version=[1.1,2) -- Cannot be resolved but is not required

2022-09-02_13h05_48

I followed instructions from documentation and added dependency for

<dependency>
    <groupId>com.adobe.aem.commons</groupId>
    <artifactId>assetshare.all</artifactId>
    <version>2.3.4</version>
    <type>zip</type>
</dependency>

Logs when I try to activate the bundle

02.09.2022 13:32:27.758 *ERROR* [qtp1818270852-2448] org.apache.felix.http.jetty Bundles: Cannot start (org.osgi.framework.BundleException: Unable to resolve com.adobe.aem.commons.assetshare.core [620](R 620.0): missing requirement [com.adobe.aem.commons.assetshare.core [620](R 620.0)] osgi.contract; (&(osgi.contract=JavaActivation)(version=1.2.0)) Unresolved requirements: [[com.adobe.aem.commons.assetshare.core [620](R 620.0)] osgi.contract; (&(osgi.contract=JavaActivation)(version=1.2.0))])
org.osgi.framework.BundleException: Unable to resolve com.adobe.aem.commons.assetshare.core [620](R 620.0): missing requirement [com.adobe.aem.commons.assetshare.core [620](R 620.0)] osgi.contract; (&(osgi.contract=JavaActivation)(version=1.2.0)) Unresolved requirements: [[com.adobe.aem.commons.assetshare.core [620](R 620.0)] osgi.contract; (&(osgi.contract=JavaActivation)(version=1.2.0))]

Environment

  • AEM Version: 6.5.9
  • Asset Share Commons Version: 2.3.4
  • Author, Publish or both: both

To Reproduce
Steps to reproduce the behavior:

  1. Install all package on AEM 6.5.9 (or probably any on-prem AEM)

Expected behavior
Application works (bundle active)

@davidjgonzalez
Copy link
Contributor

Hi! This is expected for 6.5 since the AEM CS download framework is not available on 6.5. This is why these imports are optional.

That said, ASC should fall back on 6.5 to an internal implementation that supports downaloads being orchestrated in the AEM JVM. Please let us know if the download aren't working on 6.5 -- vs just having an optional dependency being unsatisfied (again, it's optional for a reason)

@bartoszWesolowski
Copy link
Author

Hi @davidjgonzalez

You are right - missing imports are optional and they do not cause the problem with this bundle. As far as I understand bundle was failing to start because of missing dependency (based on the error log)

02.09.2022 13:32:27.758 *ERROR* [qtp1818270852-2448] org.apache.felix.http.jetty Bundles: Cannot start (org.osgi.framework.BundleException: Unable to resolve com.adobe.aem.commons.assetshare.core [620](R 620.0): missing requirement [com.adobe.aem.commons.assetshare.core [620](R 620.0)] osgi.contract; (&(osgi.contract=JavaActivation)(version=1.2.0)) Unresolved requirements: [[com.adobe.aem.commons.assetshare.core [620](R 620.0)] osgi.contract; (&(osgi.contract=JavaActivation)(version=1.2.0))])
org.osgi.framework.BundleException: Unable to resolve com.adobe.aem.commons.assetshare.core [620](R 620.0): missing requirement [com.adobe.aem.commons.assetshare.core [620](R 620.0)] osgi.contract; (&(osgi.contract=JavaActivation)(version=1.2.0)) Unresolved requirements: [[com.adobe.aem.commons.assetshare.core [620](R 620.0)] osgi.contract; (&(osgi.contract=JavaActivation)(version=1.2.0))]

and mostly this part of the log (osgi.contract=JavaActivation)(version=1.2.0).

I checked the documentation and found out that on my AEM bundle exporting javax.activation package had version 1.1.1 and asset-share-commons bundle required version 1.2.0

I installed additional bundle locally and it resolved the issue:

<dependency>
    <groupId>org.apache.sling</groupId>
    <artifactId>org.apache.sling.javax.activation</artifactId>
    <version>0.3.0</version>
</dependency>

I guess this still needs some fix in the app - I am not sure whether this should be included in the app package or maybe documentation needs to be extended.

@kwin
Copy link
Collaborator

kwin commented Sep 13, 2022

This is a regression of #767. Using dependabot on OSGi dependencies is usually not helpful.

@davidjgonzalez
Copy link
Contributor

davidjgonzalez commented Sep 14, 2022

@bartoszWesolowski This should be fixed in 2.4.0 (just released) - thanks to @kwin for spotting this.

I tested it on my 6.5.9 and everything resolves.

Please re-open if you see anything funny.

@davidjgonzalez davidjgonzalez added this to the 2.4.0 milestone Sep 14, 2022
@davidjgonzalez davidjgonzalez self-assigned this Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants