我刚刚更新到roo 1.2.4,当我尝试使用实体命令时,我得到以下内容:
backoffice roo> entity
Command 'entity' not found (for assistance press TAB or type "hint" then hit ENTER)
Located add-on that may offer this command
1 found, sorted by rank; T = trusted developer; R = Roo 1.2 compatible
ID T R DESCRIPTION -------------------------------------------------------------
01 Y Y 1.2.0.M1 Support for the creation and management of domain entities.
--------------------------------------------------------------------------------
[HINT] use 'addon info id --searchResultId ..' to see details about a search result
[HINT] use 'addon install id --searchResultId ..' to install a specific search result, or
[HINT] use 'addon install bundle --bundleSymbolicName TAB' to install a specific add-on version
backoffice roo> addon install id --searchResultId 01
Target resource(s):
-------------------
Spring Roo - Addon - Entity (1.2.0.M1)
Required resource(s):
---------------------
Spring Roo - Support (1.2.0.RELEASE)
Deploying...done.
backoffice roo> [org.apache.felix.bundlerepository [12]] Resolver: Start error -
org.springframework.roo.addon.entity
org.apache.felix.log.LogException: org.osgi.framework.BundleException: Uses constraint violation. Unable to resolve module org.springframework.roo.addon.entity
[83.0] because it is exposed to package 'org.springframework.roo.support.util' from modules org.springframework.roo.support [68.1] and org.springframework.roo.s
upport [68.0] via two dependency chains.
Chain 1:
org.springframework.roo.addon.entity [83.0]
import: (&(package=org.springframework.roo.support.util)(version>=1.2.0)(!(version>=2.0.0)))
|
export: package=org.springframework.roo.support.util org.springframework.roo.support [68.1]
Chain 2:
org.springframework.roo.addon.entity [83.0]
import: (&(package=org.springframework.roo.classpath.customdata)(version>=1.2.0)(!(version>=2.0.0)))
|
export: package=org.springframework.roo.classpath.customdata; uses:=org.springframework.roo.support.util
org.springframework.roo.classpath [52.0]
import: (&(package=org.springframework.roo.support.util)(version>=1.2.0)(!(version>=2.0.0)))
|
export: package=org.springframework.roo.support.util org.springframework.roo.support [68.0]
at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3570)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1797)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:927)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:914)
at org.apache.felix.bundlerepository.impl.ResolverImpl.deploy(ResolverImpl.java:630)
at org.apache.felix.bundlerepository.impl.ObrCommandImpl._deploy(ObrCommandImpl.java:395)
at org.apache.felix.bundlerepository.impl.ObrCommandImpl.deploy(ObrCommandImpl.java:333)
at org.apache.felix.bundlerepository.impl.ObrCommandImpl.execute(ObrCommandImpl.java:119)
at org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activator.java:286)
at org.springframework.roo.felix.FelixDelegator.perform(FelixDelegator.java:208)
at org.springframework.roo.felix.FelixDelegator.obrStart(FelixDelegator.java:146)
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.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:47)
at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:283)
at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:64)
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:146)
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.AddODownloaded 100% of lookup
tallAddOn(AddOnRooBotOperationsImpl.java:458)
at org.springframework.roo.addon.roobot.client.AddOnCommands.installId(AddOnCommands.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nat
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.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:47)
at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:283)
at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:64)
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:146)
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(Unknown Source)
Successfully installed add-on: Spring Roo - Addon - Entity [version: 1.2.0.M1]
[Hint] Please consider rating this add-on with the following command:
[Hint] addon feedback bundle --bundleSymbolicName org.springframework.roo.addon.
entity --rating ... --comment "..."
backoffice roo> quit
在此之后,我再也无法开始了。如果我删除缓存目录,我可以启动它,但我最终会在同一个地方。
更多信息,我刚刚从1.2.3升级。在大多数情况下,我的实体是使用DBRE创建的。我的pom.xml使用的是roo版本1.2.4.RELEASE。
有什么想法吗?
答案 0 :(得分:1)
老问题,但它仍然是新Roo用户引用(相对)旧Roo指令,教程等的绊脚石。
答:语法已经改变。 entity
命令现在是entity jpa
命令。
对不起:匆忙我错过了另一个问题,这个问题由mvivo处理得很好。我会添加自己的观点,即捆绑目录可以 - 我应该说 - 应该删除。这样做可能会导致下载时间损失。如果坏东西以某种方式被下载或下载在本地系统上以某种方式被破坏,新版本和随后的插件命令将快速恢复捆绑目录到一致,最新的状态。似乎不存在可能不同步的Roo冗余数据结构。当然,我还没有遇到过。
我一直在做Roo只用了一两个星期,这样的帮助可以为我节省大量的深夜时间。不过,我会说,Roo表现得很好。我的意思是,当我尝试在我看来合理的解决方案时,事情通常会变得更好。我偶尔会使用另一种系统 - 事情变得更糟,显然不管你做什么。 Roo并不是那样的。它相对简单,因此具有内在的稳健性。我非常钦佩Roo背后的设计见解。
答案 1 :(得分:0)
解决Spring Roo无法启动的问题。删除所有Spring Roo文件夹(缓存和安装)尝试使用1.2.4(或1.2.5)版本的干净安装。
如前所述:entity
命令已重命名为entity jpa
(请参阅Spring Roo documentation)