Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-2802

pizzashop.roo script doesn't introduce required services until shell restarted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.2.0.M1
    • Fix Version/s: 1.2.0.RC1
    • Component/s: WEB MVC
    • Labels:
      None

      Description

      After running pizzashop.roo, the generated project does not compile:

      [ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.2:compile (default) on project pizzashop: Compiler errors :
      [ERROR] error at PizzaOrder pizzaorder = pizzaOrderService.findPizzaOrder(id);
      [ERROR] ^^^^^^^^
      [ERROR] /Users/aswan/projects/bugs/2800/src/main/java/com/springsource/pizzashop/PizzaOrderController_Roo_Controller_Json.aj:24:0::0 pizzaOrderService cannot be resolved
      [ERROR] error at List<PizzaOrder> result = pizzaOrderService.findAllPizzaOrders();
      [ERROR] ^^^^^^^^
      [ERROR] /Users/aswan/projects/bugs/2800/src/main/java/com/springsource/pizzashop/PizzaOrderController_Roo_Controller_Json.aj:38:0::0 pizzaOrderService cannot be resolved
      [ERROR] error at pizzaOrderService.savePizzaOrder(pizzaOrder);
      [ERROR] ^^^^^^^^
      [ERROR] /Users/aswan/projects/bugs/2800/src/main/java/com/springsource/pizzashop/PizzaOrderController_Roo_Controller_Json.aj:45:0::0 pizzaOrderService cannot be resolved
      [ERROR] error at pizzaOrderService.savePizzaOrder(pizzaOrder);
      [ERROR] ^^^^
      [ERROR] /Users/aswan/projects/bugs/2800/src/main/java/com/springsource/pizzashop/PizzaOrderController_Roo_Controller_Json.aj:54:0::0 pizzaOrderService cannot be resolved
      [ERROR] error at if (pizzaOrderService.updatePizzaOrder(pizzaOrder) == null) {
      [ERROR] ^^^^^^^^
      [ERROR] /Users/aswan/projects/bugs/2800/src/main/java/com/springsource/pizzashop/PizzaOrderController_Roo_Controller_Json.aj:66:0::0 pizzaOrderService cannot be resolved
      [ERROR] error at if (pizzaOrderService.updatePizzaOrder(pizzaOrder) == null) {
      [ERROR] ^^^^
      [ERROR] /Users/aswan/projects/bugs/2800/src/main/java/com/springsource/pizzashop/PizzaOrderController_Roo_Controller_Json.aj:77:0::0 pizzaOrderService cannot be resolved
      [ERROR] error at PizzaOrder pizzaOrder = pizzaOrderService.findPizzaOrder(id);
      [ERROR] ^^^^^^^^
      [ERROR] /Users/aswan/projects/bugs/2800/src/main/java/com/springsource/pizzashop/PizzaOrderController_Roo_Controller_Json.aj:86:0::0 pizzaOrderService cannot be resolved
      [ERROR] error at pizzaOrderService.deletePizzaOrder(pizzaOrder);
      [ERROR] ^^^^^^^^
      [ERROR] /Users/aswan/projects/bugs/2800/src/main/java/com/springsource/pizzashop/PizzaOrderController_Roo_Controller_Json.aj:92:0::0 pizzaOrderService cannot be resolved
      [ERROR] error at Pizza pizza = pizzaService.findPizza(id);
      [ERROR] ^^^
      [ERROR] /Users/aswan/projects/bugs/2800/src/main/java/com/springsource/pizzashop/PizzaController_Roo_Controller_Json.aj:24:0::0 pizzaService cannot be resolved
      [ERROR] error at List<Pizza> result = pizzaService.findAllPizzas();
      [ERROR] ^^^
      [ERROR] /Users/aswan/projects/bugs/2800/src/main/java/com/springsource/pizzashop/PizzaController_Roo_Controller_Json.aj:38:0::0 pizzaService cannot be resolved
      [ERROR] error at pizzaService.savePizza(pizza);
      [ERROR] ^^^
      [ERROR] /Users/aswan/projects/bugs/2800/src/main/java/com/springsource/pizzashop/PizzaController_Roo_Controller_Json.aj:45:0::0 pizzaService cannot be resolved
      [ERROR] error at pizzaService.savePizza(pizza);
      [ERROR] 
      [ERROR] /Users/aswan/projects/bugs/2800/src/main/java/com/springsource/pizzashop/PizzaController_Roo_Controller_Json.aj:54:0::0 pizzaService cannot be resolved
      [ERROR] error at if (pizzaService.updatePizza(pizza) == null) {
      [ERROR] ^^^
      [ERROR] /Users/aswan/projects/bugs/2800/src/main/java/com/springsource/pizzashop/PizzaController_Roo_Controller_Json.aj:66:0::0 pizzaService cannot be resolved
      [ERROR] error at if (pizzaService.updatePizza(pizza) == null) {
      [ERROR] 
      [ERROR] /Users/aswan/projects/bugs/2800/src/main/java/com/springsource/pizzashop/PizzaController_Roo_Controller_Json.aj:77:0::0 pizzaService cannot be resolved
      [ERROR] error at Pizza pizza = pizzaService.findPizza(id);
      [ERROR] ^^^
      [ERROR] /Users/aswan/projects/bugs/2800/src/main/java/com/springsource/pizzashop/PizzaController_Roo_Controller_Json.aj:86:0::0 pizzaService cannot be resolved
      [ERROR] error at pizzaService.deletePizza(pizza);
      [ERROR] ^^^
      [ERROR] /Users/aswan/projects/bugs/2800/src/main/java/com/springsource/pizzashop/PizzaController_Roo_Controller_Json.aj:92:0::0 pizzaService cannot be resolved

      It turns out that the pizzaService and pizzaOrderService fields are not introduced until the shell is restarted:

      [FelixDispatchQueue] 62f090b Updated SRC_MAIN_JAVA/com/springsource/pizzashop/PizzaOrderController_Roo_Controller.aj
      [FelixDispatchQueue] 1fcfcf9 Updated SRC_MAIN_JAVA/com/springsource/pizzashop/PizzaController_Roo_Controller.aj

      ... after which the project compiles OK.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              aswan Andrew Swan
              Reporter:
              aswan Andrew Swan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: