Hello,

I have an OSGi-based application which uses cglib. I'm running into a problem that seems very similar to what's described here:

http://www.osgi.org/blog/2007/07/to-declare-or-not-to-declare.html

Basically, I have one bundle which calls a method on a service provided by another bundle, passing it a class. The service implementation uses cglib to generate an alternative implementation of the passed-in class, and return an instance of it.

This all works fine in unit tests (not in an OSGi container), but fails when run inside of felix with a ClassNotFoundException on net.sf.cglib.proxy.Factory.

I was able to make this work by adding several cglib-specific imports on my client bundle manifest, but I'd rather not do that since the use of cglib is an implementation detail that I don't want to leak to clients.

The above article suggests that the user of the x-implicitwire directive will accomplish what I need, but it doesn't seem to work. I came across this post:

http://mail-archives.apache.org/mod_mbox/felix-users/200801.mbox/%[email protected]%3e

Which indicates that this directive is just an experiment and may go away. Has it been removed? If so, is there any viable alternative to adding the explicit import in the client bundle(s)?

Thanks,

Kris

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to