Announcement Announcement Module
No announcement yet.
Pizza tutorial does not generate 'create' tags Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Pizza tutorial does not generate 'create' tags

    I'm new to Roo and just following the pizza tutorial
    I am using spring-roo-1.1.3.RELEASE

    I have issued all the commands up to 'Creating the Web Tier'
    I then issued the controller all --package ~.web command at the Roo command prompt - see attachment rooweblog.txt

    After quitting roo, I then issued the mvn tomcat:run command at the project command prompt

    When the command prompt indicates that Tomcat is running I navigate to:

    I can navigate to the application
    However, when I try and create a pizza order, I get an error:
    SEVERE: Servlet.service() for servlet jsp threw exception
    org.xml.sax.SAXException: No tag "create" defined in tag library associated with uri "urn:jsptagdir:/WEB-INF/tags/form"

    If I look in the pizza\src\main\webapp\WEB-INF\tags\form directory, I see:
    BUT no create.tagx
    -see maven log attached in mvntomcatlog.txt

    I'm guessing that Roo should generate a create tag during
    controller all --package ~.web
    - but I don't see that in the log file

    I've imported the project into STS and launched a Roo shell
    The Roo shell creates and then deletes create.tagx
    - see stsrooshelllog.txt

    Can anyone suggest how I can get the create tag generated
    And also why it was not generated from the controller command
    And any reason why the Roo shell in STS creates and deletes create.tagx

    Thanks for reading and any help

  • #2
    I just tried to replicate this with Roo 1.1.3 and the create.tagx file is copied into the user project. Have you followed these steps (as per tutorial)?:

    // Spring Roo 1.1.3.RELEASE [rev 4404ffb] log opened at 2011-05-18 12:49:12
    project --topLevelPackage com.springsource.roo.pizzashop
    persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY 
    entity --class ~.domain.Topping --testAutomatically
    field string --fieldName name --notNull --sizeMin 2
    entity --class ~.domain.Base --testAutomatically 
    field string --fieldName name --notNull --sizeMin 2
    entity --class ~.domain.Pizza --testAutomatically 
    field string --fieldName name --notNull --sizeMin 2
    field number --fieldName price --type java.lang.Float 
    field set --fieldName toppings --type ~.domain.Topping
    field reference --fieldName base --type ~.domain.Base
    entity --class ~.domain.PizzaOrder --testAutomatically 
    field string --fieldName name --notNull --sizeMin 2
    field string --fieldName address --sizeMax 30
    field number --fieldName total --type java.lang.Float 
    field date --fieldName deliveryDate --type java.util.Date
    field set --fieldName pizzas --type ~.domain.Pizza
    controller all --package ~.web


    • #3
      Pizza tutorial does not generate 'create' tags

      I moved the existing pizza folder aside and ran the script in a new pizza folder
      This time it created the 'create.jspx' files

      I'm pretty sure I entered all the commands individually on the previous occasion
      There's also the Roo log in STS after import:

      roo> Updated ROOT\pom.xml [Added dependencies org.apache.tiles:tiles-core:2.2.1, org.apache.tiles:tiles-jsp:2.2.1]
      Created SRC_MAIN_WEBAPP\WEB-INF\tags\form\create.tagx
      Undo create SRC_MAIN_WEBAPP\WEB-INF\tags\form\create.tagx
      Undo manage SRC_MAIN_WEBAPP\WEB-INF\spring\webmvc-config.xml
      Undo manage ROOT\pom.xml
      Actual file 'D:\Development\Tutorial\Roo\pizza\src\main\webapp \WEB-INF\tags\form\dependency.tagx' cannot exist

      Anyway, it's now working


      • #4
        Glad to hear its working for you now.