Expand my Community achievements bar.

Nomination window for the Adobe Community Advisor Program, Class of 2025, is now open!
SOLVED

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

Avatar

Employee

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)))

1 Accepted Solution

Avatar

Correct answer by
Employee

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

View solution in original post

3 Replies

Avatar

Correct answer by
Employee

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

Avatar

Level 2

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 ?

Avatar

Level 7

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.