使用spring roo问题总结

JDBC driver not available for 'com.mysql.jdbc.Driver'

执行:database reverse engineer --schema project --package ~.domain

提示:

Located add-on that may offer this JDBC driver

1 found, sorted by rank; T = trusted developer; R = Roo 1.3 compatible

ID T R DESCRIPTION -------------------------------------------------------------

 

01 Y Y 5.1.18.0001 #jdbcdriver driverclass:com.mysql.jdbc.Driver. This...

--------------------------------------------------------------------------------

 

[HINT] use 'addon info id --searchResultId ..' to see details about a search res

ult

[HINT] use 'addon install id --searchResultId ..' to install a specific search r

esult, or

[HINT] use 'addon install bundle --bundleSymbolicName TAB' to install a specific

 add-on version

JDBC driver not available for 'com.mysql.jdbc.Driver'

问题:

系统默认addon加载01,但是01不是Mysql的驱动,所以提示出错。

解决方案:

ROO shell下执行:

osgi start --url file:///C:/Users/wenky/.m2/repository/mysql/mysql-connector-java/5.1.34/mysql-connector-java-5.1.34.jar

注册一下mysql驱动。

 

Invalid byte 1 of 1-byte UTF-8 sequence.

执行:database reverse engineer --schema project --package ~.domain

提示:

Created SRC_MAIN_RESOURCES\dbre.xml

Updated ROOT\pom.xml

Updated SRC_MAIN_RESOURCES\META-INF\persistence.xml

Undo manage SRC_MAIN_RESOURCES\META-INF\persistence.xml

Undo manage ROOT\pom.xml

Undo create SRC_MAIN_RESOURCES\dbre.xml

Invalid byte 1 of 1-byte UTF-8 sequence.

问题:

编码格式问题

解决方案:

roo.bat中执行java命令前加入以下代码:

set ROO_OPTS=-Dfile.encoding=UTF-8

你可能感兴趣的:(spring roo)