Skip to main content
rk39193348
Level 4
Oct 16, 2015 2:29 AM UTC
Solved

Dependency error in jar ..

Hi All ,

I have an issue where i get this below dependency error in my bundle , when i open OSGI console. 
org.apache.sling.api,version=[2.3,3) -- Cannot be resolved 
org.apache.sling.api.request,version=[2.4,3) -- Cannot be resolved
org.apache.sling.api.resource,version=[2.5,3) -- Cannot be resolved. Maven build of the package is 
successful , still i get this dependency error when i install the jar , so the jar is in installed mode and obviously the site is down. I am using 5.6.1 , kindly let me know how to resolve this issue. Any suggestions would be very helpful.

Thanks in advance
,RK

When I attempt to deploy a newer version of the org.apache.sling.api bundle eg 2.6 etc several other bundles stop and cannot be started.

Can anybody guide me in the right way to resolve this issue?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
ogillAccepted solution
Adobe Employee
Oct 16, 2015 2:29 AM UTC

In your POM file, what versions are you setting for the dependencies below and what is the scope set to for each?:

org.apache.sling.api,version
org.apache.sling.api.request
org.apache.sling.api.resource

 

Regards,

Opkar

3 replies

Lokesh_Shivalingaiah
Level 10
Oct 16, 2015 2:29 AM UTC

Check the versions in your instance for these package here [1] and update the same in you pom.xml

[1] http://<domain>:<port>/system/console/depfinder

Translate
ogillAdobe EmployeeAccepted solution
Adobe Employee
Oct 16, 2015 2:29 AM UTC

In your POM file, what versions are you setting for the dependencies below and what is the scope set to for each?:

org.apache.sling.api,version
org.apache.sling.api.request
org.apache.sling.api.resource

 

Regards,

Opkar

Translate
Lokesh_Shivalingaiah
Level 10
Oct 16, 2015 2:29 AM UTC

also, mentioning version range is not valid. refer [1] for the same

[1] https://maven.apache.org/enforcer/enforcer-rules/versionRanges.html

Translate