Results 1 to 9 of 9

Thread: Wedding Example entity change?

  1. #1

    Default Wedding Example entity change?

    I'm trying the wedding RSVP example with the most recent Roo (because I want Integrated DB Reverse Engineering).

    I'm a bit stuck here....


    /Users/alex/Documents/spring-roo-1.1.0.RC1/bin/roo.sh
    ____ ____ ____
    / __ \/ __ \/ __ \
    / /_/ / / / / / / /
    / _, _/ /_/ / /_/ /
    /_/ |_|\____/\____/ 1.1.0.RC1 [rev 51cb976]


    Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
    roo> entity --name ~.domain.Rsvp
    You must specify option 'class' for this command
    roo> entity --name ~.domain.Rsvp --class
    entity --name ~.domain.Rsvp --class
    required --class: Name of the entity to create; no default value


    Is the example out of date, or is this a problem at my end?

    thanks.

  2. #2
    Join Date
    Nov 2009
    Location
    Montreal, Quebec
    Posts
    398

    Default

    There is no "--name" attribute when creating an entity from Roo. The correct syntax would be something like this:

    Code:
    entity --class ~.domain.Rsvp

  3. #3
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    I've made a note for us to update the wedding blog here:

    https://jira.springsource.org/browse/ROO-1634

    If you come across further 1.1.0.RELEASE-related changes, please post them and we'll thus be sure to reflect them.

    Thanks!
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  4. #4
    Join Date
    Nov 2010
    Posts
    11

    Default More Wedding differences: Extra output

    persistence setup --provider HIBERNATE --database HYPERSONIC_PERSISTENT

    now produces (in addition to the old output):
    Managed ROOT\pom.xml [Added dependency org.hsqldb:hsqldb:1.8.0.10]
    Managed ROOT\pom.xml [Added dependency org.hibernate:hibernate-core:3.5.5-Final]
    Managed ROOT\pom.xml [Added dependency org.hibernate:hibernate-entitymanager:3.5.5-Final]
    Managed ROOT\pom.xml [Added dependency org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.0.Final]
    Managed ROOT\pom.xml [Added dependency org.hibernate:hibernate-validator:4.1.0.Final]
    Managed ROOT\pom.xml [Added dependency javax.validation:validation-api:1.0.0.GA]
    Managed ROOT\pom.xml [Added dependency cglib:cglib-nodep:2.2]
    Managed ROOT\pom.xml [Added dependency javax.transaction:jta:1.1]
    Managed ROOT\pom.xml [Added dependency org.springframework:spring-jdbc:${spring.version}]
    Managed ROOT\pom.xml [Added dependency org.springframework:spring-orm:${spring.version}]
    Managed ROOT\pom.xml [Added dependency commons-pool:commons-pool:1.5.4]
    Managed ROOT\pom.xml [Added dependency commons-dbcp:commons-dbcp:1.3]

  5. #5
    Join Date
    Nov 2010
    Posts
    11

    Default More wedding changes: database.url

    Blog output:
    database.url = jdbc:hsqldb:${user.home}/wedding

    current output:
    database.url = jdbc:hsqldb:file:wedding;shutdown=true

    He edits the URL in the example. Given that it now has the extra bit, I felt it necessary to forgo the
    database properties set --key database.url --value jdbc:hsqldb:/home/balex/our-wedding

    call. Hopefully that won't bite me later in the demo

  6. #6
    Join Date
    Nov 2010
    Posts
    11

    Default More wedding changes: controller, logging, security

    controller scaffold ~.web.RsvpController
    now takes a --class parameter

    controller scaffold --class ~.web.RsvpController

    And the output is at least slightly different

    For logging support I ran the following (--[tab] gave me --level first). It had no output, unlike what's shown in the blog
    roo> logging setup --level DEBUG --package WEB

    So I ran the blog's version, and got this:
    roo> logging setup --package WEB --level DEBUG
    Managed SRC_MAIN_RESOURCES\log4j.properties

    The output from security setup is different than in the blog. And when I click on the link
    http://www.springsource.org/spring-security/
    I get a 404

  7. #7
    Join Date
    Nov 2010
    Posts
    11

    Default More wedding changes: controller creation

    controller class --name ~.web.PublicRsvpController
    needs to be changed to --class

    Oh, and the roo shell doesn't seem to want to do command completion on single characters, even when they're unique ("controller c" gets a beep, "controller cl" completes correctly. "perform p" gets a beep, "perform pa" completes correctly).

  8. #8
    Join Date
    Nov 2010
    Posts
    11

    Default More wedding changes: Failure

    Note: I'm using Eclipse, not STS. It was a major PITA getting Eclipse set up the way I like it, so I'm going to need some serious payoff to even consider looking at STS. So, if this code isn't supposed to compile in POE (plain old Eclipse), you can ignore the rest of this.

    Using Helios, with no Roo plugings installed (if there's a Roo plugin I should be using, let me know how to get it).

    "First rename src/main/webapp/WEB-INF/index.jsp to thanks.jsp."

    No such file exists. There are two different index.jspx files (one in views/publicrsvp/, one in views/).

    "Next copy src/main/webapp/WEB-INF/views/rsvp/create.jspx"

    This file does exist. But it does not have any of the elements discussed in the text.

    "The very last step is to edit src/main/webapp/WEB-INF/urlrewrite.xml"

    File does not exist.

    The PublicRsvpController code does not compile. Essentially none of the elements of Rsvp that it references exist.

  9. #9

    Default

    I have finally made changes to the post to make it 1.1.0 compatible.

Posting Permissions

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