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

pushing in controller method breaks roo shell



    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Duplicate
    • Affects Version/s: 1.1.3.RELEASE
    • Fix Version/s: 1.1.4.RELEASE
    • Component/s: WEB MVC
    • Labels:
    • Environment:
      STS 2.6.0 on OS X 10.6


      Pushing a controller method in from the generated aspect causes the roo shell to complain about the method already existing in the target type

      "Method 'show' already defined in target type 'com.company.web.ThermalSpaceController' (ITD target 'com.company.web.ThermalSpaceController_Roo_Controller')"

      Even worse, the roo shell apparently fails to continue executing after issuing that warning, so once a method has been pushed in, no changes to any other file in the project will be correctly round-tripped in the shell. In my case, I made changes to some of my entities, none of which were reflected in the generated aspects - no new methods in toString(), no changes to _Roo_Entity, etc. It took me a very long time to determine that the problem was that I had pushed in a single controller method. I didn't even modify the method. I hadn't gotten that far yet. I pushed the method in, then attempted to modify a couple of entities in a manner that would then require changes to the controller, but I could not get the entities to update.

      YOu can see my original thread about the problem, before I figured out what was causing it, here:


      I started a second thread to discuss the problem that I eventually discovered:


      Note - If I change the name of the method in the java file, then the problem goes away. However, roo continues to generate the equivalent method with the exact same RequestMapping. So then, when I run the code, I get complaints about ambiguous handler methods. I'm ok with changing the method name, but roo then needs to match on RequestMapping annotations and strip any methods in the generated aspects which match mappings in the java file. Or something. Roo is unusable as it stands today. Once you've modified a single controller, all round-tripping appears to be broken


          Issue Links



              sschmidt Stefan Schmidt
              ideasculptor NotMy Name
              0 Vote for this issue
              0 Start watching this issue