Matt Brown – Journeys of a software engineer

January 25, 2012

Database Reverse Engineering With Spring Roo

Filed under: Uncategorized — Tags: , , — mattbsoftware @ 11:51 pm

roo’s database-reverse command will not work out of the box because Spring doesn’t ship or make available an osgi driver for Roo due to licensing restrictions.
Pre-reqs

Reference

Instructions

  1. get this pom
  2. mvn install
  3. start roo and run the following commands

osgi install --url file://{maven repo}/javax/resource/com.springsource.javax.resource/1.5.0/com.springsource.javax.resource-1.5.0.jar
osgi install --url file://{maven repo}/javax/transaction/com.springsource.javax.transaction/1.1.0/com.springsource.javax.transaction-1.1.0.jar
osgi install --url file://{maven repo}/com/oracle/roo/jdbc/com.oracle.roo.jdbc.ojdbc5/11.1.0.7.0.0001/com.oracle.roo.jdbc.ojdbc5-11.1.0.7.0.0001.jar

osgi start --url file://{maven repo}/javax/resource/com.springsource.javax.resource/1.5.0/com.springsource.javax.resource-1.5.0.jar
osgi start --url file://{maven repo}/javax/transaction/com.springsource.javax.transaction/1.1.0/com.springsource.javax.transaction-1.1.0.jar
osgi start --url file://{maven repo}/com/oracle/roo/jdbc/com.oracle.roo.jdbc.ojdbc5/11.1.0.7.0.0001/com.oracle.roo.jdbc.ojdbc5-11.1.0.7.0.0001.jar

Connect Roo to Oracle DB

  • get into roo (‘roo>’) and execute the following

project --topLevelPackage --projectName --java 6
persistence setup --provider HIBERNATE --database ORACLE
database properties set --key database.url --value jdbc:oracle:thin:@:1526:
database properties set --key database.username --value
database properties set --key database.password --value

The fun part

Enter the following command, and lean back.

database reverse engineer –schema –package

Advertisements

1 Comment »

  1. Note that the File URL for Windows should be prefixed as file:///(full path with slashes switched).
    For Example:
    osgi install –url file:///Users/dickens/.m2/repository/javax/resource/com.springsource.javax.resource/1.5.0/com.springsource.javax.resource-1.5.0.jar

    Comment by Gordon Dickens — October 31, 2012 @ 12:08 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: