This error shows you didn't install OSGi bundle jar correctly which contain com.mongodb package.
IMHO install third party lib as separate OSGi bundle jar is a good practice in OSGi container, so that more bundles can use it.
Also you can put the third party lib(I don't recommand you to do it) in your OSGi bundle under certain folder, but you need add Class-Path OSGi header, also in this case you shouldn't add Import-Package header, as Import-Package will always try to look for the package from other bundles which export it.
You said you can't convert a jar to OSGi bundle, then what's the problem you encounter?
Thank you very much, I solved.
Just remove the line from pom.xml
and follow the instruction to convert a simple jar (in my case, mongo-db.jar) into a osgi bundle (mongo-db.bar) as described in fuse documentation, Chapter 5: Deploying a JAR Library (below the instructions I follow).
Download bnd.jar from http://www.aqute.biz/Code/Download#bnd
(this generate mongo-db-1.4.bar)
java -jar bnd.jar wrap mongo-db-1.4.jar
(deploy mongo-db-1.4.bar bundle)
cp mongo-db-1.4.bar $FUSE_HOME/deploy
Thank you very much.
Edited by: walter.accantelli on May 18, 2010 9:20 AM
Edited by: walter.accantelli on May 18, 2010 9:21 AM