4
我在Ubuntu Linux上運行Eclipse Indigo,Spring Tools 2.7.1,Spring Roo 1.1.5。我讀Getting Started with Roo,當我嘗試在DB反向工程我有以下錯誤:即使我嘗試用Spring Roo:JDBC驅動程序不適用於'org.h2.Driver'
roo> addon install id --searchResultId 01
再次運行的反向工程導致相同的錯誤
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'
然而, 。在我的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:在獨立的外殼再另一個示例項目反向工程的工作,但在Eclipse中沒有工作。所以現在我的解決方法是在獨立的roo shell中問題逆向工程。