springroo从头开始安装

时间:2011-03-18 17:18:19

标签: spring-roo

我想知道springroo控制台在哪里保存状态?我想要一个干净的springroo安装,我试图从安装目录中删除所有并解压缩下载的存档,但这没有帮助,而且springroo丢失了一些预装的捆绑包

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

如果我尝试执行

addon install id --searchResultId 01

springroo console首先下载一些东西然后抛出异常

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)

2 个答案:

答案 0 :(得分:0)

你在这里问了几个问题,所以我会逐一介绍它们:

  • “下载接受命令'下载接受'未找到” - 正确的命令是“下载接受使用条款”,如果您键入“dow [tab] a [tab]”,shell将自动为您完成。< / LI>
  • “我试图从安装目录中删除所有内容并解压缩下载的存档,但这没有帮助” - 安装目录是Spring Roo(好吧,1.1.5无论如何)存储任何内容的唯一地方,除了一些通过Java Preferences API保存的使用信息;出于所有实际目的,吹走Roo的主目录并重新安装应该给你一个干净的开始。
  • java.lang.NullPointerException - 如果没有更多信息,我无法对此进行诊断,但是如果您可以在latest release中复制它,请log a ticket提供足够的信息以便我们复制它。

除了JIRA之外,您还可以通过我们定期检查的forum提出问题(与此处不同)。

答案 1 :(得分:0)

Roo缓存目录

我最好的选择是,如果要重置Roo安装,则必须删除Roo cache目录。

让我解释一下:我安装了STS 2.8.1,它与Roo 1.5.1.RELEASE捆绑在一起,然后在安装后,我创建了一个安装的本地Git存储库。

运行Roo一次后,它创建了以下缓存,从Git状态可以看出:

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/

其他有趣的观察

我在全新安装的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

...之后我在Roo流程管理器中得到了NullPointerException,最后我在缓存中得到了以下额外的包:

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

...即。很多Roo cruft(安装附带)和一个新的Mongo OSGi包。

然后exit命令挂起。 Ctrl-C让我出局,但当我再次开始Roo时,乐趣就开始了。我得到了大量的信息:

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)

......并且没有Roo提示。删除缓存目录使其再次起作用,尽管我没有时间精确查明缓存中的哪些捆绑包导致了问题。