Cannot be resolved but is not required and overwritten by Boot Delegation while Migrating from 6.2 to 6.5 | Community
Skip to main content
May 22, 2023
Solved

Cannot be resolved but is not required and overwritten by Boot Delegation while Migrating from 6.2 to 6.5

  • May 22, 2023
  • 2 replies
  • 2188 views

Hi Team, We are migrating from 6.2 to 6.5 and on top of that installed 6.5.15, we were able to resolve dependency issues in all bundles except one bundle. Getting Boot deligation issues.

Please find the screens shots of bundle and can someone let me know how to resolve the following dependencies.

Bundle:

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Shashi_Mulugu

@srinivasreddyaem welcome to AEM Experience League communities.. Great place to co-learn, collaborate and communicate.. 

 

For your issue, sun.io related packages are related to jre and comes with sling container.. so even though your bundle depends on some other external bundle dependencies to get these packages, sling ignores them and resolve dependencies from container only. That's what boot delegation means.. try excluding those dependencies from your bundle pom

2 replies

Shashi_Mulugu
Community Advisor
Shashi_MuluguCommunity AdvisorAccepted solution
Community Advisor
May 23, 2023

@srinivasreddyaem welcome to AEM Experience League communities.. Great place to co-learn, collaborate and communicate.. 

 

For your issue, sun.io related packages are related to jre and comes with sling container.. so even though your bundle depends on some other external bundle dependencies to get these packages, sling ignores them and resolve dependencies from container only. That's what boot delegation means.. try excluding those dependencies from your bundle pom

fmateen
Level 2
April 4, 2025

I encountered a similar issue when updating the JDK version from JDK 8 to JDK 11. My custom bundle was failing with the error:

java.sql -- Cannot be resolved and overwritten by Boot Delegation

I'm posting the solution here, as it might be helpful for others facing the same issue.

The solution that worked for me was to exclude the java.sql dependency from the pom.xml file by using:

Import-Package: !java.sql,javax.annotation;version=0.0.0,*
Reference: https://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html