![BlogImage.jpg](https://www.danklco.com/images/posts/2021-08/Groovy-Console-Error.png.transform/web-post-img.jpeg)
Abstract
Let's say I wanted to use the Microsoft Azure API's from my AEM application in Cloud Service.
After checking the bundles in AEM, I notice the bundle org.apache.jackrabbit.oak-segment-azure exposes the API packages I need. Awesome!
Oak Azure Segment Storage Bundle in the OSGi Console
Just to double check (or maybe first) I can use the Package Dependencies OSGi console to see if the package is exported and get the dependency information. I see the dependency there as well:
Package Dependencies showing the Azure Dependency
But, when I try to use the API I get an error indicating OSGi can't resolve the Azure imports? What is going on!?
Groovy Console Failing to Import Class
Some History
Most developers that have worked with CQ5 or AEM 6 are pretty familiar with an API surface that resembles the wild west.
Since OSGi only cares if a package is exported from a bundle, it was possible to use features of AEM dependencies or core bundles as long as they were exported, even if they weren't meant for customer use.
Since customers can (and do) reach into these unintended exports, upgrades become significantly harder due to the scope expansion beyond the intended API. This leads to challenges in supporting and enhancing AEM not to mention removing deprecated functionality.
To address this, Adobe has provided tooling, guidance and new constraints to make the upgrade process more sustainable and reliable.
Read Full Blog
Q&A
Please use this thread to ask the related questions.
Kautuk Sahni