springroo install from scratch
I want to know where does springroo console saves its state? I want to have a clean springroo installation, I tried to delete all from installation directory and unpack there downloaded archive, but that didn't help, moreover springroo lost some its preinstalled bundles
roo> download accept Command 'download accept' not found
(for assistance press TAB or type "hint" the n hit ENTER)
Located add-on that may offer this command
1 found, sorted by rank; T = trusted developer; R = Roo 1.1 compatible
ID T R DESCRIPTION -------------------------------------------------------------
01 Y Y 1.1.1.RELEASE Provides POM configuration inheritence for standard Roo...
-----开发者_如何学编程---------------------------------------------------------------------------
[HINT] use 'addon info id --searchResultId ..' to see details about a search res
ult
[HINT] use 'addon install id --searchResultId ..' to install a specific search r
esult, or
[HINT] use 'addon install bundle --bundleSymbolicName TAB' to install a specific
add-on version
and if I try to execute
addon install id --searchResultId 01
springroo console firstly downloads something and then throws exceptions
roo> addon install id --searchResultId 01
Target resource(s):
-------------------
Spring Roo - User Agent Analysis (UAA) Integration (1.1.3.BUILD-SNAPSHOT)
Deploying...done.
[Thread-2] [org.apache.felix.bundlerepository [2]] Resolver: Update error - Spri
ng Roo - User Agent Analysis (UAA) Integration
java.lang.NullPointerException
at org.springframework.roo.felix.HttpPgpUrlStreamHandlerServiceIm
pl.openConnection(HttpPgpUrlStreamHandlerServiceImpl.java:75)
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.openC
onnection(URLHandlersStreamHandlerProxy.java:271)
at java.net.URL.openConnection(Unknown Source)
at org.apache.felix.bundlerepository.impl.FileUtil.openURL(FileUt
il.java:196)
at org.apache.felix.bundlerepository.impl.ResolverImpl.deploy(Res
olverImpl.java:563)
at org.apache.felix.bundlerepository.impl.ObrCommandImpl._deploy(
ObrCommandImpl.java:395)
at org.apache.felix.bundlerepository.impl.ObrCommandImpl.deploy(O
brCommandImpl.java:333)
at org.apache.felix.bundlerepository.impl.ObrCommandImpl.execute(
ObrCommandImpl.java:119)
at org.apache.felix.shell.impl.Activator$ShellServiceImpl.execute
Command(Activator.java:286)
at org.springframework.roo.felix.FelixDelegator.perform(FelixDele
gator.java:218)
at org.springframework.roo.felix.FelixDelegator.obrStart(FelixDel
egator.java:207)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source
)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.roo.support.util.ReflectionUtils.invokeMet
hod(ReflectionUtils.java:191)
at org.springframework.roo.process.manager.ProcessManagerHostedEx
ecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:49)
at org.springframework.roo.process.manager.internal.DefaultProces
sManager.doTransactionally(DefaultProcessManager.java:180)
at org.springframework.roo.process.manager.internal.DefaultProces
sManager.execute(DefaultProcessManager.java:143)
at org.springframework.roo.process.manager.ProcessManagerHostedEx
ecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:47)
at org.springframework.roo.shell.AbstractShell.executeCommand(Abs
tractShell.java:165)
at org.springframework.roo.addon.roobot.client.AddOnRooBotOperati
onsImpl.installOrUpgradeAddOn(AddOnRooBotOperationsImpl.java:207)
at org.springframework.roo.addon.roobot.client.AddOnRooBotOperati
onsImpl.installAddon(AddOnRooBotOperationsImpl.java:184)
at org.springframework.roo.addon.roobot.client.AddOnRooBotOperati
onsImpl.installAddOn(AddOnRooBotOperationsImpl.java:179)
at org.springframework.roo.addon.roobot.client.AddOnCommands.inst
allId(AddOnCommands.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source
)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.roo.support.util.ReflectionUtils.invokeMet
hod(ReflectionUtils.java:191)
at org.springframework.roo.process.manager.ProcessManagerHostedEx
ecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:49)
at org.springframework.roo.process.manager.internal.DefaultProces
sManager.doTransactionally(DefaultProcessManager.java:180)
at org.springframework.roo.process.manager.internal.DefaultProces
sManager.execute(DefaultProcessManager.java:143)
at org.springframework.roo.process.manager.ProcessManagerHostedEx
ecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:47)
at org.springframework.roo.shell.AbstractShell.executeCommand(Abs
tractShell.java:165)
at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLin
eShell.java:358)
at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.
java:132)
at java.lang.Thread.run(Unknown Source)
NullPointerException at org.springframework.roo.addon.roobot.client.AddOnRooBotO
perationsImpl.installOrUpgradeAddOn(AddOnRooBotOperationsImpl.java:210)
You've asked a few questions here, so I'll take them one by one:
- "download accept Command 'download accept' not found" - the correct command is "download accept terms of use", which the shell will auto complete for you if you type "dow[tab]a[tab]".
- "I tried to delete all from installation directory and unpack there downloaded archive, but that didn't help" - the installation directory is the only place that Spring Roo (well, 1.1.5 anyway) stores anything, apart from some usage information saved via the Java Preferences API; for all practical purposes, blowing away Roo's home directory and re-installing should give you a clean start.
- java.lang.NullPointerException - I can't diagnose this without more information, but if you can replicate it in the latest release, please log a ticket with enough information for us to replicate it.
Apart from JIRA, you can also raise issues via the forum, which we check regularly (unlike here on SO).
Roo cache directory
My best bet is that if you want to reset your Roo installation, you have to remove the Roo cache
directory.
Let me explain: I installed STS 2.8.1, which comes bundled with Roo 1.5.1.RELEASE and then, after installing, I created a local Git repository of the installation.
After running Roo once, it created the following cache, as can be seen from the Git status:
opyate:springsource git:(master*) $ git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# spring-roo-1.1.5.RELEASE/cache/
Other interesting observations
I ran the following commands on a fresh install of Roo 1.5.1.RELEASE:
development mode
download accept terms of use
pgp automatic trust
addon install bundle --bundleSymbolicName org.springframework.roo.addon.layers.repository.mongo
...after which I also get a NullPointerException
in the Roo process manager, and I ended up with the following extra bundles in the cache:
file:/Users/opyate/Applications/springsource/spring-roo-1.1.5.RELEASE/bundle/org.springframework.roo.addon.dod-1.1.5.RELEASE.jar
obr://org.springframework.roo.addon.layers.repository.mongo/-1322818602247
file:/Users/opyate/Applications/springsource/spring-roo-1.1.5.RELEASE/bundle/org.springframework.roo.addon.propfiles-1.1.5.RELEASE.jar
file:/Users/opyate/Applications/springsource/spring-roo-1.1.5.RELEASE/bundle/org.springframework.roo.classpath-1.1.5.RELEASE.jar
file:/Users/opyate/Applications/springsource/spring-roo-1.1.5.RELEASE/bundle/org.springframework.roo.file.monitor-1.1.5.RELEASE.jar
file:/Users/opyate/Applications/springsource/spring-roo-1.1.5.RELEASE/bundle/org.springframework.roo.file.undo-1.1.5.RELEASE.jar
file:/Users/opyate/Applications/springsource/spring-roo-1.1.5.RELEASE/bundle/org.springframework.roo.process.manager-1.1.5.RELEASE.jar
file:/Users/opyate/Applications/springsource/spring-roo-1.1.5.RELEASE/bundle/org.springframework.roo.support-1.1.5.RELEASE.jar
file:/Users/opyate/Applications/springsource/spring-roo-1.1.5.RELEASE/bundle/org.springframework.roo.support.osgi-1.1.5.RELEASE.jar
file:/Users/opyate/Applications/springsource/spring-roo-1.1.5.RELEASE/bundle/org.springframework.roo.metadata-1.1.5.RELEASE.jar
...i.e. a whole lot of Roo cruft (that came with the installation) and one new Mongo OSGi package.
The exit
command then hangs. Ctrl-C
gets me out, but when I start Roo again, the fun starts. I get reams and reams of this:
ERROR: Error starting file:/Users/opyate/Applications/springsource/spring-roo-1.1.5.RELEASE/bundle/org.springframework.roo.project-1.1.5.RELEASE.jar
...OSGi errors omitted for brevity's sake...
at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1719)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1148)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
at java.lang.Thread.run(Thread.java:680)
...and no Roo prompt. Removing the cache directory makes it work again, although I did not have time to pinpoint exactly which bundles in the cache caused the issue.
精彩评论