I have the common "use conflict" problem in OSGi, I am new to OSGi so sorry if this is very simple. I have read this and this other questions. I have also read this which explains in more detail how to debug these problems; yet, i can't figure it out. I can't find the duplicated export (quoting that last article "There must always be more than one supplier for you to see a uses constraint violation.")
This is the full error
initial@reference:file:../../Dev/mine/target/dependency/jasperreports-3.7.1-osgi.jar [151]
Package uses conflict: Import-Package: org.apache.commons.collections.comparators; version="0.0.0"
Here is the relevant snippet of the jasper manifest. It is too long to paste completely
Export-Package: ...,net.sf.jasperreports.crosstabs.fill.calculation;uses:="org.apache.commons.collections,net.sf.jasperreports.engine,org.apache.commons.collections.comparators,org.apache.commons.logging,..."
And here is the output of packages org.apache.commons.collections.comparators
to show that the package is exported correctly and only once
osgi> packages org.apache.commons.collections.comparators
org.apache.commons.collections.comparators; version="3.2.0"<org.apache.commons.collections_3.2.0 [869]>
Any ideas? something else i could try? I really doubt this but, is equinox complaining that the exported version is 3.2.0 but the uses
version is 0.0.0?
I ended up going with a third option. It's related to @PeterKriens suggestion, hopefully it will be another approach for others to tackle these problems. I installed Karaf, which runs on top of Felix and used the hot-deploy folder to deploy one jar at a time. This way I could see the problems as they arose. It is very slow but verbose. Using only Felix I found no way to deploy like this