If your Sling Models are not working..... | Community
Skip to main content
Employee
April 23, 2015
Solved

If your Sling Models are not working.....

  • April 23, 2015
  • 3 replies
  • 2343 views

You need to have:

org.apache.sling.models.api.1-1.0.jar installed in the OSGI console, system/console/bundles. Before doing extensive troubleshooting, be sure this bundle is installed. The error might look something like this:

Failed installing bundle : Unable to install/update bundle from dir C:\Users : Unresolved constraint in bundle com.adobe.training.dc.core [393]: Unable to resolve 393.0: missing requirement [393.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.sling.models.annotations)(version>=1.1.0)(!(version>=2.0.0)))

Unable to install/update bundle from dir C:\Users: Unresolved constraint in bundle com.adobe.training.dc.core [393]: Unable to resolve 393.0: missing requirement [393.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.sling.models.annotations)(version>=1.1.0)(!(version>=2.0.0)))

Best answer by JamesTa6

Also, do not forget to delete the old bundle that wasn't working from system/console/bundles

3 replies

AmitVishwakarma
New Participant
January 18, 2025

To resolve the issue:

  1. Install the missing bundle: Ensure org.apache.sling.models.api version 1.1.0+ is installed in AEM via the OSGi console (/system/console/bundles).
  2. Update bundle version: If already installed, ensure it’s version 1.1.0 or higher.
  3. Reinstall affected bundle: Reinstall the com.adobe.training.dc.core bundle after the dependency is resolved.
  4. Restart AEM: Restart AEM to apply the changes.

This should fix the unresolved dependency error.

chanchalesj6077
New Participant
August 29, 2017

what if you have WCMUSEPOJO working but not the sling models as sling models-->@postconstruct method not at all being called form the HTL component in AEM 6.3 .

Any clue ?

JamesTa6AuthorAccepted solution
Employee
April 23, 2015

Also, do not forget to delete the old bundle that wasn't working from system/console/bundles