cschneider / Karaf-Tutorial

http://cschneider.github.io/Karaf-Tutorial/
Apache License 2.0
271 stars 305 forks source link

Tutorial db example-jpa not working #51

Closed samnanhan closed 5 years ago

samnanhan commented 6 years ago

Hello Christian,

Thank you very much for your tutorials about Karaf, as a newbie, it has been helping me a lot.

But I have a little problem starting the bundle with karaf, and I am getting an error I tried to fixed without success. Maybe I am to new to Karaf to understand what is going wrong?

Error executing command: Error installing bundles:
Unable to start bundle mvn:net.lr.tutorial.karaf.db/db-examplejpa/1.0-SNAPSHOT: org.osgi.framework.BundleException: Unable to resolve db-examplejpa [152](R 152.0): missing requirement [db-examplejpa [152](R 152.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.felix.service.command)(version>=1.0.0)(!(version>=0.0.0))) Unresolved requirements: [[db-examplejpa [152](R 152.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.felix.service.command)(version>=1.0.0)(!(version>=0.0.0)))]

This is what I am getting , and I tried to change the version, add bundles, changed my pom file but I could not go any further :-(

Could you please help me?

Thank you Kind regards

damicadd commented 5 years ago

Hi. I had the same error but with a different package. Which package version did you change in your POM?

I don't think you have to take a blind guess on which package version you need to change. In your logs you see: (osgi.wiring.package=org.apache.felix.service.command) This means that the version of the org.apache.felix.service.command in your POM has to be changed.

This is how I resolved it.

samnanhan commented 5 years ago

Thank you damicadd, this was last year and I just read your answer, I was able to resolve the problem.

I was referencing an old version of the command. As I changed it it worked.

Thank you