jgoodyear / ApacheKarafCookbook

Samples for Packt Publishing's Apache Karaf Cookbook
Other
66 stars 47 forks source link

chapter5-recipe1 example is not working #6

Open abhilaughs opened 8 years ago

abhilaughs commented 8 years ago

Dear Author, I learning to work on osgi karaf containers. I am using your example as samples. When I am working on chapter5-recipe1, I tried your example on Karaf containers version 4.x and as well as 3.x

All through the below exception. One of process I followed is below. Please help where I am failing to create module.

Find the below steps that i have followed a. INstalled karaf 4.x b. feature:repo-add cxf 3.0.0-milestone2 c. feature:install http d. feature:install http-whiteboard e. feature:install war

Then when i run the command - install -s mvn:com.packt/chapter5-recipe1/1.0.0-SNAPSHOT

when I try to install it is throwing below errors org.apache.karaf.shell.console.MultiException: Error installing bundles: Unable to install bundle recipe4-all-modules at org.apache.karaf.shell.console.MultiException.throwIf(MultiException.java:91) at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:70) at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38) at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_75] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_75] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_75] at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_75] at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)[15:org.apache.aries.proxy.impl:1.0.3] at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)[15:org.apache.aries.proxy.impl:1.0.3] at org.apache.karaf.shell.console.commands.$BlueprintCommand602444695.execute(Unknown Source)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.karaf.shell.console.jline.Console$DelegateSession.execute(Console.java:453)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.karaf.shell.console.jline.Console.run(Console.java:196)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] Caused by: java.lang.Exception: Unable to install bundle recipe4-all-modules at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:45) ... 19 more Caused by: org.osgi.framework.BundleException: Unable to cache bundle: recipe4-all-modules at org.apache.felix.framework.Felix.installBundle(Felix.java:2878) at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165) at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:43) ... 19 more Caused by: java.net.MalformedURLException: no protocol: recipe4-all-modules at java.net.URL.(URL.java:585)[:1.7.0_75] at org.apache.felix.framework.util.SecureAction.createURL(SecureAction.java:254) at org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:148) at org.apache.felix.framework.cache.JarRevision.(JarRevision.java:77) at org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:878) at org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550) at org.apache.felix.framework.cache.BundleArchive.(BundleArchive.java:153) at org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277) at org.apache.felix.framework.Felix.installBundle(Felix.java:2874) ... 21 more

jgoodyear commented 8 years ago

The recipe was developed on Karaf 3, I'm not surprised K4 has issues :(

I'm going to ping Heath when he returns from vacation as he wrote that chapter.

On Tue, Jul 26, 2016 at 3:38 AM, abhilaughs notifications@github.com wrote:

Dear Author, I learning to work on osgi karaf containers. I am using your example as samples. When I am working on chapter5-recipe1, I tried your example on Karaf containers version 4.x and as well as 3.x

All through the below exception. One of process I followed is below. Please help where I am failing to create module.

Find the below steps that i have followed a. INstalled karaf 4.x b. feature:repo-add cxf 3.0.0-milestone2 c. feature:install http d. feature:install http-whiteboard e. feature:install war

Then when i run the command - install -s mvn:com.packt/chapter5-recipe1/1.0.0-SNAPSHOT

when I try to install it is throwing below errors org.apache.karaf.shell.console.MultiException: Error installing bundles: Unable to install bundle recipe4-all-modules at org.apache.karaf.shell.console.MultiException.throwIf(MultiException.java:91) at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:70) at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38) at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_75] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_75] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_75] at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_75] at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)[15:org.apache.aries.proxy.impl:1.0.3] at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)[15:org.apache.aries.proxy.impl:1.0.3] at org.apache.karaf.shell.console.commands.$BlueprintCommand602444695.execute(Unknown Source)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.karaf.shell.console.jline.Console$DelegateSession.execute(Console.java:453)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.karaf.shell.console.jline.Console.run(Console.java:196)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] at org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)[22:org.apache.karaf.shell.console:2.4.0.redhat-620004] Caused by: java.lang.Exception: Unable to install bundle recipe4-all-modules at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:45) ... 19 more Caused by: org.osgi.framework.BundleException: Unable to cache bundle: recipe4-all-modules at org.apache.felix.framework.Felix.installBundle(Felix.java:2878) at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165) at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:43) ... 19 more Caused by: java.net.MalformedURLException: no protocol: recipe4-all-modules at java.net.URL.(URL.java:585)[:1.7.0_75] at org.apache.felix.framework.util.SecureAction.createURL(SecureAction.java:254) at org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:148) at org.apache.felix.framework.cache.JarRevision.(JarRevision.java:77) at org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:878) at org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550) at org.apache.felix.framework.cache.BundleArchive.(BundleArchive.java:153) at org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277) at org.apache.felix.framework.Felix.installBundle(Felix.java:2874) ... 21 more

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jgoodyear/ApacheKarafCookbook/issues/6, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYlIS6LlTmL_sD05opVabvfjbV6uYlKks5qZaRngaJpZM4JU0LP .