0

I have installed org.amdatu.mongo.jar osgi bundle as well as its depedent bundles on apache felix.

I am able to start it successfully.This basically export pacakge for using mongo service.

Now I have another osgi bundle and I want to access/consume this service in my bundle.I have build.gradle file and bnd.bnd file in my project.Where to give dependencies of this org.amadatu.mongo.jar?

I have used below approache

1)Added org.amdatu.mongo.jar osgi bundle jar in build path by "configure buildpath" option eclipse. NOT WORKING Here project error removed but when I do buid from build.gradle it gives exception of. Unable to find symbol import org.amdatu.mongo.mongoDBService.

I am following below link

http://www.amdatu.org/components/mongodb.html

There are no dependencies of the package in central mvn repository for org.amdatu.mongo.jar otherwise I have added it in my build.gradle file.

What should I do so that my project compile successfully?

The osgi bundle in which I want to use this mongo service is a liferaymvcportlet osgi bundle.

Please find project setup and images,

enter image description here

enter image description here

enter image description here

enter image description here

Abhishek Suthar
  • 674
  • 1
  • 8
  • 27
  • Please show your `build.gradle` and probably your `bnd.bnd`. I had lots of problems with the default gradle `osgi` plugin so I ended up writing my own bnd wrapper. Gradle is aware this is a problem and has not fixed it. https://discuss.gradle.org/t/the-osgi-plugin-has-several-flaws/2546/4 – JBirdVegas Jul 22 '16 at 21:17
  • I have added necessary information. – Abhishek Suthar Jul 23 '16 at 06:21
  • Liferay hides some of the configuration it added more content in bnd.bnd and gradle files before bundled ....so this files may look irrelevant... – Abhishek Suthar Jul 24 '16 at 16:46
  • Looks like your jar isn't being included. What is the path to your jar? Is it in /libs? If so you just have to add the directory as a flat repository – JBirdVegas Jul 24 '16 at 16:50

0 Answers0