[ROO-3578] Not able to install any addons from eclipse sts roo shell. Created: 03/Jan/15  Updated: 08/Jun/15  Resolved: 08/Jun/15

Status: Resolved
Project: Spring Roo
Component/s: @ ROO SHELL
Affects Version/s: 1.3.0.RELEASE
Fix Version/s: 2.0.0.M1

Type: Bug Priority: Critical
Reporter: Ajinkya Ghorpade Assignee: Juan Carlos García del Canto
Resolution: Complete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OS X Yosemite, Java 6



 Description   

I get following error while trying to install any addon from roo shell.

roo> addon install id --searchResultId 13
Command 'osgi obr url add --url http://spring-roo-repository.springsource.org/repository.xml' not found (for assistance press TAB or type "hint" then hit ENTER)
addon search --requiresCommand "osgi obr url add" found no matches
org.osgi.framework.BundleException: Unable to cache bundle: org.springframework.roo.wrapping.aopalliance
at org.apache.felix.framework.Felix.installBundle(Felix.java:2878)
at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:138)
at org.apache.felix.gogo.command.Basic.start(Basic.java:724)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)
at org.springframework.roo.felix.FelixDelegator.perform(FelixDelegator.java:185)
at org.springframework.roo.felix.FelixDelegator.obrStart(FelixDelegator.java:146)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:47)
at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:325)
at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:71)
at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:44)
at org.springframework.roo.shell.AbstractShell.executeCommandImpl(AbstractShell.java:226)
at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:136)
at org.springframework.roo.addon.roobot.client.AddOnRooBotOperationsImpl.installOrUpgradeAddOn(AddOnRooBotOperationsImpl.java:478)
at org.springframework.roo.addon.roobot.client.AddOnRooBotOperationsImpl.installAddon(AddOnRooBotOperationsImpl.java:396)
at org.springframework.roo.addon.roobot.client.AddOnRooBotOperationsImpl.installAddOn(AddOnRooBotOperationsImpl.java:458)
at org.springframework.roo.addon.roobot.client.AddOnCommands.installId(AddOnCommands.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:47)
at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:325)
at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:71)
at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:44)
at org.springframework.roo.shell.AbstractShell.executeCommandImpl(AbstractShell.java:226)
at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:136)
at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:421)
at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:539)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.MalformedURLException: no protocol: org.springframework.roo.wrapping.aopalliance
at java.net.URL.<init>(URL.java:585)
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.<init>(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.<init>(BundleArchive.java:153)
at org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)
at org.apache.felix.framework.Felix.installBundle(Felix.java:2874)
... 44 more
java.net.MalformedURLException: no protocol: org.springframework.roo.wrapping.aopalliance



 Comments   
Comment by Gary Mach [ 01/Mar/15 ]

I am having a similar problem.

My Roo version is 1.3.1.Release.
It happens no matter what the bundleSymbolic name is, even if it is something that exists within the given repository.xml

roo> osgi obr url add --url file:///C:/.m2/repository/repository.xml

roo> osgi obr start --bundleSymbolicName xxx
org.osgi.framework.BundleException: Unable to cache bundle: xxx
at org.apache.felix.framework.Felix.installBundle(Felix.java:2878)
at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:138)
at org.apache.felix.gogo.command.Basic.start(Basic.java:724)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)
at org.springframework.roo.felix.FelixDelegator.perform(FelixDelegator.java:234)
at org.springframework.roo.felix.FelixDelegator.obrStart(FelixDelegator.java:167)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:47)
at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:325)
at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:71)
at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:44)
at org.springframework.roo.shell.AbstractShell.executeCommandImpl(AbstractShell.java:242)
at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:149)
at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:421)
at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:539)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.MalformedURLException: no protocol: xxx
at java.net.URL.<init>(URL.java:585)
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.<init>(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.<init>(BundleArchive.java:153)
at org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)
at org.apache.felix.framework.Felix.installBundle(Felix.java:2874)
... 30 more
java.net.MalformedURLException: no protocol: xxx

Comment by Juan Carlos García del Canto [ 08/Jun/15 ]

Solved using new addon commands of Spring Roo 2.0.0.M1 version

Generated at Sun Nov 17 20:21:32 UTC 2019 using Jira 7.13.8#713008-sha1:1606a5c1e7006e1ab135aac81f7a9566b2dbc3a6.