Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

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

Avatar

Avatar
Validate 1
Level 2
nehacms-0r3f0r
Level 2

Likes

5 likes

Total Posts

36 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
nehacms-0r3f0r
Level 2

Likes

5 likes

Total Posts

36 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
nehacms-0r3f0r
Level 2

28-06-2017

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.

1239511_pastedImage_2.png

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 25
MVP
Ratna_Kumar
MVP

Likes

158 likes

Total Posts

755 posts

Correct Reply

134 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile

Avatar
Validate 25
MVP
Ratna_Kumar
MVP

Likes

158 likes

Total Posts

755 posts

Correct Reply

134 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile
Ratna_Kumar
MVP

28-06-2017

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.

SlingModel1.PNG

Hope this helps!

~Ratna.

Answers (5)

Answers (5)

Avatar

Avatar
Validate 1
Level 2
nehacms-0r3f0r
Level 2

Likes

5 likes

Total Posts

36 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
nehacms-0r3f0r
Level 2

Likes

5 likes

Total Posts

36 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
nehacms-0r3f0r
Level 2

30-06-2017

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.   

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,090 likes

Total Posts

3,123 posts

Correct Reply

1,063 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,090 likes

Total Posts

3,123 posts

Correct Reply

1,063 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

28-06-2017

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

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

28-06-2017

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.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

28-06-2017

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

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,135 likes

Total Posts

6,158 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,135 likes

Total Posts

6,158 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

28-06-2017

navinkaushal  smacdonald2008​ See this?

~kautuk