Announcement Announcement Module
No announcement yet.
Wedding Example entity change? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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....

    ____ ____ ____
    / __ \/ __ \/ __ \
    / /_/ / / / / / / /
    / _, _/ /_/ / /_/ /
    /_/ |_|\____/\____/ 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?


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

    entity --class ~.domain.Rsvp


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

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



      • #4
        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:]
        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
          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
            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\

            The output from security setup is different than in the blog. And when I click on the link
            I get a 404


            • #7
              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
                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
                  I have finally made changes to the post to make it 1.1.0 compatible.