thanks in advance for the help! I'm following an tutorial, and when I try to start the bundle I installed in karaf it wont start... the log is that:
20:12:18.713 ERROR [Karaf local console user karaf] Exception caught while executing command org.apache.karaf.shell.support.MultiException: Error executing command on bundles: Error starting bundle 157: Unable to resolve db-examplejpa [157](R 157.0): missing requirement [db-examplejpa [157](R 157.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.felix.service.command)(version>=0.6.0)(!(version>=1.0.0))) Unresolved requirements: [[db-examplejpa [157](R 157.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.felix.service.command)(version>=0.6.0)(!(version>=1.0.0)))] at org.apache.karaf.shell.support.MultiException.throwIf(MultiException.java:61) ~[?:?] at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:70) ~[?:?] at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:55) ~[?:?] at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) ~[?:?] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) ~[?:?] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) ~[?:?] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) ~[?:?] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?] at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?] at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?] at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:?] at java.lang.Thread.run(Thread.java:748) [?:?] Suppressed: java.lang.Exception: Error starting bundle 157: Unable to resolve db-examplejpa [157](R 157.0): missing requirement [db-examplejpa [157](R 157.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.felix.service.command)(version>=0.6.0)(!(version>=1.0.0))) Unresolved requirements: [[db-examplejpa [157](R 157.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.felix.service.command)(version>=0.6.0)(!(version>=1.0.0)))] at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:67) ~[?:?] at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:55) ~[?:?] at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) ~[?:?] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) ~[?:?] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) ~[?:?] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) ~[?:?] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?] at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?] at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?] at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:?] at java.lang.Thread.run(Thread.java:748) [?:?] Caused by: org.osgi.framework.BundleException: Unable to resolve db-examplejpa [157](R 157.0): missing requirement [db-examplejpa [157](R 157.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.felix.service.command)(version>=0.6.0)(!(version>=1.0.0))) Unresolved requirements: [[db-examplejpa [157](R 157.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.felix.service.command)(version>=0.6.0)(!(version>=1.0.0)))] at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4149) ~[?:?] at org.apache.felix.framework.Felix.startBundle(Felix.java:2119) ~[?:?] at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?] at org.apache.karaf.bundle.command.Start.executeOnBundle(Start.java:38) ~[?:?] at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:65) ~[?:?] ... 14 more
the tutorial is this one if you are interested:http://liquid-reality.de/Karaf-Tutorial/06/
I thought it was the versiong problem, but I tried to change the version in the pom but it didnt work. i have seem some answers here but no luck...
edit:Im not using bndtool btw... is it required? the tut doesnt say anything about that
thank you!
The example did not match the current versions of Apache Karaf and JPA anymore.
The issue you see means that we use a package "org.apache.felix.service.command" but there is no bundle that exports this package. In this case the reason is that the annotations from this package are deprecated and are not supported by the current karaf version anymore.
I have adapted the example for current Apache Karaf and also converted to use the lambda based JPA style as well as declarative services instead of blueprint. This makes the example quite a bit simpler.
I hope this helps.