getting org.apache.sling.models.annotations,version=[1.5,2) -- Cannot be resolved while installing osgi bundle in aem 6.3 | Community
Skip to main content
nehacms-0r3f0r
Level 3
Jun 28, 2017 10:19 AM UTC
Solved

getting org.apache.sling.models.annotations,version=[1.5,2) -- Cannot be resolved while installing osgi bundle in aem 6.3

Hi,

While following helpx article:

Developing your first Experience Manager 6.3 Components

after importing the package into aem 6.3 instance. Getting below error in the OSGI Bundle.

getting org.apache.sling.models.annotations,version=[1.5,2) -- Cannot be resolved

Attaching the screenshot as well.

Does aem needs some other version than what is available in pom.xml. Pom.xml has below dependency being used:

<dependency>

                <groupId>biz.aQute.bnd</groupId>

                <artifactId>annotation</artifactId>

                <version>2.4.0</version>

                <scope>provided</scope>

            </dependency>

Thanks,

Neha

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Ratna_Kumar
Ratna_KumarAccepted solution
Level 10
Jun 28, 2017 6:15 PM UTC

Hi,

Yes Jorg is absolutely correct. I have re-tested the article and AEM 6.3 comes with the version 1.4.0 in Sling models annotation. Below is the screenshot for the same.

Hope this helps!

~Ratna.

6 replies

nehacms-0r3f0r
Level 3
Jun 30, 2017 8:42 AM UTC

Thanks all for update.

Issue got resolved by updating dependency for:

<dependency>

            <groupId>org.apache.sling</groupId>

            <artifactId>org.apache.sling.models.api</artifactId>

            <version>1.3.2</version>

        </dependency>

in pom.xml. Earlier I had placed version 1.3.4 which was causing issue.   

Translate
Ratna_Kumar
Ratna_KumarAccepted solution
Level 10
Jun 28, 2017 6:15 PM UTC

Hi,

Yes Jorg is absolutely correct. I have re-tested the article and AEM 6.3 comes with the version 1.4.0 in Sling models annotation. Below is the screenshot for the same.

Hope this helps!

~Ratna.

Translate
joerghoh
Employee
Jun 28, 2017 5:02 PM UTC

Hi,

AEM 6.3 comes with org.apache.sling.models.annotations in version 1.4.0. (exported by Bundle Sling Models API version 1.3.2). Your project obviously compiles against a newer version of the Sling Models bundle. Please check your dependencies.

Jörg

Translate
smacdonald2008
Level 10
Jun 28, 2017 3:53 PM UTC

This also bring up a great point - we will also add this artilce to our YouTube channel so community members can see all steps in action.

Translate
smacdonald2008
Level 10
Jun 28, 2017 3:51 PM UTC

Did you follow the article exactly - we tested this and never encountered this issue? Did you use Lazybones to setup project?

Translate
kautuk_sahni
Employee
Jun 28, 2017 10:49 AM UTC

navinkaushal  smacdonald2008​ See this?

~kautuk

Translate
Kautuk Sahni