0

我刚刚更新到 roo 1.2.4,当尝试使用 entity 命令时,我得到以下信息:

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

在此之后,我不能再开始 roo 了。如果我删除缓存目录,我可以启动它,但我最终在同一个地方。

更多信息,我最近刚从 1.2.3 升级。在大多数情况下,我的实体是使用 DBRE 创建的。我的 pom.xml 使用的是 roo 版本 1.2.4.RELEASE。

有任何想法吗?

4

2 回答 2

1

老问题,但对于参考(相对)旧 Roo 说明、教程等的新 Roo 用户来说,它仍然是一个可能的绊脚石。

答:语法发生了变化。该entity命令现在是entity jpa命令。

抱歉:我匆忙错过了另一个问题,mvivo 处理得很好。我会添加我自己的观点,即捆绑目录是可以 - 我会说应该 - 被删除的目录。这样做可能会导致下载时间损失。如果在本地系统上以某种方式下载了不良内容或下载内容以某种方式损坏,则新版本和后续插件命令将快速将捆绑目录恢复到一致的最新状态。Roo 中似乎没有可能不同步的冗余数据结构。当然我还没有遇到过。

我只做了一两个星期的 Roo,这样的帮助可以为我节省大量的深夜时间。不过,我会说,Roo 似乎表现得很好。我的意思是,当我尝试在我看来合理的解决方法时,事情通常会变得更好。我有时会使用另一种系统——不管你做什么,情况都会变得更糟。罗不是这样的。它相对简单,因此具有内在的鲁棒性。我非常钦佩 Roo 背后的设计洞察力。

于 2014-08-05T09:36:30.080 回答
0

解决 Spring Roo 的问题没有启动。删除所有 Spring Roo 文件夹(缓存和安装)尝试全新安装 1.2.4(或 1.2.5)版本。

正如这里已经回答的那样:entity命令被重命名为entity jpa(参见Spring Roo 文档

于 2014-08-05T09:50:30.487 回答