Troubleshooting Missing OSGi bundles

After deployment sometimes post upgrade or change in dependencies we see there are some inactive bundles in OSGi console. In this blog we will discuss how we can find out where the issue is and how we can resolve it.

Error that we get while checking inside the bundle in console at http://<aem-host>:<aem-port>/system/console/bundles/<bundle-id>.

*INFO* [OsgiInstallerImpl] Could not start bundle com.acme.samples.aem.bundledependency.samples-bundle-dependency-bundle [457]. Reason: {}. Will retry.

org.osgi.framework.BundleException: Unresolved constraint in bundle com.acme.samples.aem.bundledependency.samples-bundle-dependency-bundle [457]: Unable to resolve 457.14: missing requirement [457.14] osgi.wiring.package; (&(osgi.wiring.package=org.apache.commons.beanutils)(version>=1.9.0)(!(version>=2.0.0)))

at org.apache.felix.framework.Felix.resolveBundleRevision(

This means that AEM was unable to resolve my bundle dependencies at deployment time.

Use classes exported by another bundle

By default, AEM has a lot of OSGi bundles deployed and one of them may be exporting the classes that you’ve been looking for. You just need to find out which versions are being exported and add to your project the correct version as a dependency.

Let’s say that you have a Maven-based project and you want to use Apache Commons Lang. therefore:

  • Access http://<aem-host>:<aem-port>/system/console/depfinder

  • Type org.apache.commons.lang3;

  • Click on find;

  • Copy the value provided as Maven dependency;

  • Paste it into your parent POM;

  • Paste it into your child POM, removing the tags <version> and <scope>.

Apache Felix Maven Bundle Plugin

Suppose that you have a Maven-based project and you want to use Apache Commons BeanUtils. therefore.

1. Add the dependency to your POM

  • Access;

  • Type commons beanutils;

  • Click on Search;

  • Select any version that depends on commons-collections 3.2.1;

  • Copy the content of the Maven tab;

  • Paste into your parent POM, adding <scope>compile</scope>;

  • Paste it into your child POM, removing the tags <version> and <scope>;

2. Instruct the Bundle Plugin to embed the dependency

  • Open your child POM;

  • Locate maven-bundle-plugin <instructions> tag;

  • Insert the following into it:

<!-- embed all compile and runtime scope dependencies -->


Example of maven file:
























Issue:,version=[1.0,2) -- Cannot be resolved,version=[1.0,2) -- Cannot be resolved mean that you are trying to use these felix packages from within AEM. However - there are no OSGi bundles in AEM that exports these packages.

You can download the bundle from maven repo and upload it into the AEM Felix console and use it.

OR you can create it as your parent pom dependency as one of module and wrap along with your project jar and use it.

To verify the availability of any package and dependencies use AEM Dependency finder.

109 views0 comments

Recent Posts

See All

GraphQL - A query language for API - Part 1

Have you recently started hearing about GraphQL and wondering what is it all about? Here is a short introduction to get you up to speed. So, lets start with What is GraphQL? In simple words, its a que

"this" in javascript

Here we will talk about this keyword in javascript and how it is different from any other javascript object. "this" is and current context object in runtime engine, but unlike any other object the pro