jgoodyear / ApacheKarafCookbook

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

chapter1-recipe4 example is not working #3

Open raghunila opened 9 years ago

raghunila commented 9 years ago

Dear Author, I learning to work on osgi karaf containers. I am using your example as samples. When I am working on chapter1-recipe4, I tried your example on Karaf containers includes serivicemix, fabric and jboss fuse. 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 fabric8-karaf-1.2.0.Beta4 b. esb:create-admin-user c. fabric:create d. profile-create --parents default test e. Using hawtio i added test to root container f. fabric:profile-edit --repositories mvn:com.packt/features-file/1.0.0-SNAPSHOT/xml/features test g. install recipe4-all-modules

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 9 years ago

Hi,

I'll ping the author whom origin wrote that recipe.

In the mean time, please try using Apache Karaf instead of Fabric8 as our recipes were not designed or written for that platform.

Cheers, Jamie

raghunila commented 9 years ago

Thank you for the quick response. I will look forward for the answer.