Results 1 to 10 of 14

Thread: Problem getting started with DBRE

Hybrid View

  1. #1
    Join Date
    Nov 2011
    Posts
    4

    Default Problem getting started with DBRE

    I am using Roo 1.2.0.M1 [rev 1fa252f]

    I have some troubles getting started with DBRE; I can't make Roo accept H2 as my database.

    Here's what I have done so far:
    Code:
    project --topLevelPackage se.ic.log --projectName LogViewer --java 6
    jpa setup --database H2_IN_MEMORY --provider HIBERNATE
    database properties set --key database.url --value jdbc:h2:tcp://localhost/~/h2db/afa
    // [failed] database introspect --schema no-schema-required
    addon install bundle --bundleSymbolicName org.springframework.roo.wrapping.h2;1.3.160.0001
    // [failed] database introspect --schema no-schema-required
    addon install id --searchResultId 01
    // [failed] database introspect --schema no-schema-required
    Every time i have tried the failed database introspect command, I get the following output:

    Code:
    Located add-on that may offer this JDBC driver
    1 found, sorted by rank; T = trusted developer; R = Roo 1.2 compatible
    ID T R DESCRIPTION -------------------------------------------------------------
    01 Y Y 1.3.160.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'
    It seems to me my adding of the h2 bundle should fix the problem, but I am getting nowhere.

    Could someone please explain to me what I should do.

  2. #2
    Join Date
    Dec 2005
    Posts
    930

    Default

    Did you execute the the command addon install id --searchResultId 1 when prompted above? You should see as a result
    Code:
    roo> addon install id --searchResultId 1
    Target resource(s):
    -------------------
       Spring Roo - Wrapping - h2 (1.3.161.0001)
    
    Deploying...done.
    
    Successfully installed add-on: Spring Roo - Wrapping - h2 [version: 1.3.160.0001]
    [Hint] Please consider rating this add-on with the following command:
    [Hint] addon feedback bundle --bundleSymbolicName org.springframework.roo.wrapping.h2 --rating ... --comment "..."
    roo>
    Alan
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  3. #3
    Join Date
    Nov 2011
    Posts
    4

    Default

    Yes, I did try to install the module, and the output indicates that it went well. That is why I am stuck: The installation seems to have gone well, but every time I try to get further with the "database introspect" command, it's the same error again.


    Code:
    roo> database introspect --schema no-schema-required
    Located add-on that may offer this JDBC driver
    1 found, sorted by rank; T = trusted developer; R = Roo 1.2 compatible
    ID T R DESCRIPTION -------------------------------------------------------------
    01 Y Y 1.3.160.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 1
    roo> Target resource(s):
    -------------------
       Spring Roo - Wrapping - h2 (1.3.161.0001)
    
    Optional resource(s):
    ---------------------
       slf4j-api (1.6.1)
       Servlet Specification API (2.5.0)
       slf4j-nop (1.6.1)
    
    Deploying...done.
    
    roo>

  4. #4
    Join Date
    Dec 2005
    Posts
    930

    Default

    H2 is normally configured as an in memory database in Roo, so to use with DBRE you either to have to run the db in server mode or spin up a web app, otherwise the database in not active and cannot be connected to.
    Alan
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  5. #5
    Join Date
    Nov 2011
    Posts
    4

    Default

    Thanks for your quick replies, Alan!

    I should have mentioned that I had the H2 database server running when I tried the above, so that is not the reason for it to fail.

    Another thing I didn't mention is that I was running Roo 1.2.0.M1 from within STS 2.8.0.RELEASE. I now tried to do the same thing but from a command window (under Windows), i.e. running Roo 1.2.0.M1 in a shell. And then it works! So it seems to me that the trouble I have has something to do with the interaction of STS and Roo.

    Could this possibly be a bug in STS or Roo, or a mismatch of the versions? I can live with doing this in the command shell, but if you want me to suppply more info for debugging purposes, I'd be happy to do so.

  6. #6
    Join Date
    Dec 2005
    Posts
    930

    Default

    Try the latest snapshot at http://static.springsource.org/downl...hp?project=ROO in STS 2.8.0 before deciding if there is a bug or not. There have been may changes since M1.
    Alan
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  7. #7
    Join Date
    Dec 2005
    Posts
    930

    Default

    sorry, duplicate
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •