felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <ben...@basistech.com>
Subject Solved felix SCR Logging, but replaced that with a problem with optional dependency resolution in the framework
Date Thu, 11 Aug 2016 20:36:13 GMT
Quite some time ago, we had a requirement to have read-only
provisioned OSGi caches. So I had set up our standard configuration to
use Equinox rather than Felix.

Equinox sets up a LogService of its own, which in turn requires a
'LogReader' to get the log messages to show up anywhere. Adding
another LogService doesn't work. I have yet to figure out how to
politely instruct Equinox to stay out of the way in this respect.

As it turns out, the read-only requirement is gone. So I decided that
since I am in the occasional habit of asking for help on the Felix
list, it would be good if I was, well, using more of Felix.

So I switched to the Felix framework (5.4.0). Sure enough, there are
my log messages.

But some optional packages are now a problem that worked fine in Equinox.

I suspect that this will be impossible for anyone to comment on unless
I can build a minimized test case.

I get a class not found for a class in a package that I have
intentionally left out of this deployment. Leaving it out is
facilitated by the use of resolution:=optional. In Equinox, this works
fine. In Felix, somehow, something decides that it needs to wire up
this and fails.

If by some really unlikely accident this has the earmarks of a
well-known phenomenon, I'm sure someone will let me know. Otherwise,
I'll either bail back to Equinox or do the more complex refactoring
that I'm deferring and be able to remove the optional resolution.

Caused by: java.lang.ClassNotFoundException:
org.apache.cxf.common.i18n.Exception not found by
com.basistech.ws.rosapi-common [21]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org

View raw message