Mac上的Spring Roo设置

时间:2018-05-23 08:21:10

标签: spring spring-roo

我一直在阅读有关Spring Roo的内容,我非常着迷于尝试它,因为它会减少我团队的大量手动数据输入类型的工作。但安装真的让我伤心。

我使用STS并安装Roo作为插件,我能够启动Roo Shell,但它停在:

" 请等待Roo Shell完全装满。"

我也没有看到任何工作空间错误日志。

接下来,我尝试在没有IDE的终端上启动,但由于以下错误而失败:

svc-notes-MacBook-Pro:roo-test tkhader $ roo

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.felix.framework.util.SecureAction (file:/Users/tkhader/Documents/Junk/RooAutogen/spring-roo-2.0.0.RELEASE/bin/org.apache.felix.framework-5.4.0.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of org.apache.felix.framework.util.SecureAction
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
ERROR: Bundle com.github.antlrjavaparser.antlr-java-parser [1] Error starting file:/Users/tkhader/Documents/Junk/RooAutogen/spring-roo-2.0.0.RELEASE/bundle/antlr-java-parser-1.0.15.jar (org.osgi.framework.BundleException: Unable to resolve com.github.antlrjavaparser.antlr-java-parser [1](R 1.0): missing requirement [com.github.antlrjavaparser.antlr-java-parser [1](R 1.0)] osgi.wiring.package; (osgi.wiring.package=org.antlr.v4.runtime.atn) [caused by: Unable to resolve org.springframework.roo.wrapping.antlr4-runtime [81](R 81.0): missing requirement [org.springframework.roo.wrapping.antlr4-runtime [81](R 81.0)] osgi.wiring.package; (osgi.wiring.package=javax.annotation.processing)] Unresolved requirements: [[com.github.antlrjavaparser.antlr-java-parser [1](R 1.0)] osgi.wiring.package; (osgi.wiring.package=org.antlr.v4.runtime.atn)])
org.osgi.framework.BundleException: Unable to resolve com.github.antlrjavaparser.antlr-java-parser [1](R 1.0): missing requirement [com.github.antlrjavaparser.antlr-java-parser [1](R 1.0)] osgi.wiring.package; (osgi.wiring.package=org.antlr.v4.runtime.atn) [caused by: Unable to resolve org.springframework.roo.wrapping.antlr4-runtime [81](R 81.0): missing requirement [org.springframework.roo.wrapping.antlr4-runtime [81](R 81.0)] osgi.wiring.package; (osgi.wiring.package=javax.annotation.processing)] Unresolved requirements: [[com.github.antlrjavaparser.antlr-java-parser [1](R 1.0)] osgi.wiring.package; (osgi.wiring.package=org.antlr.v4.runtime.atn)]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.base/java.lang.Thread.run(Thread.java:844)

2 个答案:

答案 0 :(得分:1)

Roo在java 9中不起作用,我不得不降级到java 8并且它第一次运行。

svc-notes-MacBook-Pro:java6 tkhader$ jenv versions
  system
  1.6
  1.6.0.65
* 1.8 (set by /usr/local/Caskroom/java6/.java-version)
  1.8.0.162
  9.0
  9.0.4
  oracle64-1.6.0.65
  oracle64-1.8.0.162
  oracle64-9.0.4
svc-notes-MacBook-Pro:java6 tkhader$ jenv exec roo
                _                               
 ___ _ __  _ __(_)_ __   __ _   _ __ ___   ___  
/ __| '_ \| '__| | '_ \ / _` | | '__/ _ \ / _ \ 
\__ \ |_) | |  | | | | | (_| | | | | (_) | (_) |
|___/ .__/|_|  |_|_| |_|\__, | |_|  \___/ \___/ 
    |_|                 |___/      2.0.0.RELEASE

Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
roo> 

答案 1 :(得分:0)

对我来说,有效的更改是将Java版本从10/9更改为8,