我在Ubuntu Linux,Spring Tools 2.7.1,Spring Roo 1.1.5上运行Eclipse Indigo。我正在阅读Getting Started with Roo,当我尝试DB逆向工程时,我遇到以下错误:
roo> database reverse engineer --schema ROO_CRM --package org.obliquid.crm.domain
Located add-on that may offer this JDBC driver
1 found, sorted by rank; T = trusted developer; R = Roo 1.1 compatible
ID T R DESCRIPTION -------------------------------------------------------------
01 Y Y 1.3.159.0001 H2 #jdbcdriver driverclass:org.h2.Driver. This bundle...
--------------------------------------------------------------------------------
[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
JDBC driver not available for 'org.h2.Driver'
但是,即使我尝试
roo> addon install id --searchResultId 01
再次运行逆向工程师会导致相同的错误。在我的pom.xml中,我也有这种依赖:
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.3.155</version>
<classifier />
</dependency>
如何解决僵局?
UPDATE :在我后来的测试中,我将数据库转换为MySQL,而在eclipse中,它仍然无效,在它独立的roo shell中工作。但是,我现在在家,而今天我在工作,所以它也可能是一个网络问题。我怀疑它现在也适用于H2。
roo> addon install id --searchResultId 1
Target resource(s):
------------------
Spring Roo - Wrapping - mysql-connector-java (5.1.17.0020)
Required resource(s):
---------------------
slf4j-api (1.6.1)
slf4j-nop (1.6.1)
Deploying...done.
Successfully installed add-on: Spring Roo - Wrapping - mysql-connector-java [version: 5.1.17.0020]
[Hint] Please consider rating this add-on with the following command:
[Hint] addon feedback bundle --bundleSymbolicName org.springframework.roo.wrapping.mysql-connector-java --rating ... --comment "..."
更新2 :对于另一个示例项目,逆向工程师再次在独立shell中工作,但在Eclipse中无效。所以现在我的解决方法是在独立的roo shell中进行逆向工程。
答案 0 :(得分:0)
请检查您的Eclipse网络设置。如果您在代理服务器后面,通常会出现问题。