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

Two bundles looking for same package, but different versions

Avatar

Avatar
Validate 1
Level 2
Srinin
Level 2

Like

1 like

Total Posts

22 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 2
Srinin
Level 2

Like

1 like

Total Posts

22 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
Srinin
Level 2

30-03-2017

Hi,

I have this ERROR:

org.osgi.framework.BundleException: Uses constraint violation. Unable to resolve bundle revision com.sample.test-wcm-bundle [397.825] because it is exposed to package 'org.apache.commons.lang.math' from bundle revisions com.sample.test-wcm-dependencies-bundle [398.824] and com.day.commons.osgi.wrapper.commons-lang2 [45.0] via two dependency chains.

com.day.commons.osgi.wrapper.commons-lang2 has commons-lang version 2.5, 

My bundle com.sample.test-wcm-dependencies-bundle needs commons-lang version 2.6.

How to resolve this?

thanks

Srini 

View Entire Topic

Avatar

Avatar
Validate 1
Level 2
Srinin
Level 2

Like

1 like

Total Posts

22 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 2
Srinin
Level 2

Like

1 like

Total Posts

22 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
Srinin
Level 2

31-03-2017

Hi Scott,

I am Sorry for the confusion. Here is the actual error. This com.day.cq.commons is using the old version. And this refers cq-commons-5.7.14.jar. I need to change the version Manifest of this file.

Chain 1:
  com.mynews.my-wcm-bundle [397.825]
    import: (&(osgi.wiring.package=org.apache.commons.lang.math)(version>=2.6.0)(!(version>=3.0.0)))
     |
    export: osgi.wiring.package=org.apache.commons.lang.math
  com.mynews.my-wcm-dependencies-bundle [398.824]

Chain 2:
  com.mynews.my-wcm-bundle [397.825]
    import: (osgi.wiring.package=com.day.cq.security)
     |
    export: osgi.wiring.package=com.day.cq.security; uses:=com.day.cq.commons
  com.day.cq.cq-security-api [468.0]
    import: (osgi.wiring.package=com.day.cq.commons)
     |
    export: osgi.wiring.package=com.day.cq.commons; uses:=org.apache.commons.lang.time
  com.day.cq.cq-commons [424.0]
    import: (&(osgi.wiring.package=org.apache.commons.lang.time)(version>=2.4.0)(!(version>=3.0.0)))
     |
    export: osgi.wiring.package=org.apache.commons.lang.time; uses:=org.apache.commons.lang.math
    export: osgi.wiring.package=org.apache.commons.lang.math
  com.day.commons.osgi.wrapper.commons-lang2 [45.0]
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3986)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2043)
        at org.apache.felix.framework.Felix$RefreshHelper.restart(Felix.java:4861)
        at org.apache.felix.framework.Felix.refreshPackages(Felix.java:4128)
        at org.apache.felix.framework.FrameworkWiringImpl.run(FrameworkWiringImpl.java:178)
        at java.lang.Thread.run(Thread.java:745)