-
1. Re: Packages -- Cannot be resolved
ffang Jun 7, 2011 11:36 PM (in response to shamik)Hi,
Some quick question,
1. What do you mean by "being internally refered by this osgi bundle", you put non-osgi jar files as embed jar in your bundle? Generally this isn't a good practice in OSGi world, you should also turn non-osgi jars into OSGi friendly bundles first so that it could be used by all other bundles
2. Are you using FUSE ESB as OSGi container? For all other third-party bundles which pre-installed into FUSE ESB, you need ensure the version also match the import of your customer bundle, for example, we have org.apache.commons.lang(version 2.4) pre-installed, so if your customer bundle need version 2.5, then it can't be resolved.
Btw, compile time successfully doesn't mean it will work during deployment time, it depend on if all necessary bundles is available in the OSGi container. If you're new to OSGi world, you may need take a look at to get some concrete idea about how OSGi container works.
http://fusesource.com/docs/esb/4.3.1/esb_deploy_osgi/index.html
Freeman
-
2. Re: Packages -- Cannot be resolved
shamik Jun 8, 2011 4:40 AM (in response to ffang)Freeman, thanks for your reply. As you've guessed right that I'm new to OSGI and struggling a bit to understand the concept. I used couple of third part jars as well a custom jar in my OSGI bundle. I did realize that perhaps the OSGI container requires jars in an OSGI friendly format. But, I'm having a hard time to figure how to achieve that, or what's the best practice in this regard. I tried using <Embed-Dependency> but not been successful so far. It seemed to have its own challenges.
I did go through the fuse documentation you've mentioned, but it didn't have much insight on using non-OSGI jars. The part I'm not clear is how do one resolve the transitive dependencies while using a third party jar. It might have reference to other jars internally,which again are non complaint.