Spring Roo
  1. Spring Roo
  2. ROO-2396

pushing in controller method breaks roo shell

    Details

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

      Description

      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:

      http://forum.springsource.org/showthread.php?t=108776

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

      http://forum.springsource.org/showthread.php?t=108779

      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

          Activity

          Hide
          Stefan Schmidt added a comment -

          Hi,

          We are aware of this issue and I believe this has been fixed for the upcoming 1.1.4 release. Can you please try it out on a recent 1.1.4.BUILD-SNAPSHOT (http://static.springsource.org/downloads/nightly/snapshot-download.php?project=ROO) and let me know if this resolves your push-in issue?

          -Stefan

          Show
          Stefan Schmidt added a comment - Hi, We are aware of this issue and I believe this has been fixed for the upcoming 1.1.4 release. Can you please try it out on a recent 1.1.4.BUILD-SNAPSHOT ( http://static.springsource.org/downloads/nightly/snapshot-download.php?project=ROO ) and let me know if this resolves your push-in issue? -Stefan
          Hide
          NotMy Name added a comment -

          quickie test seems to show it is fixed. I have to say, I'm a little surprised that 1.1.3 is left to fester for many weeks with a blocker bug rather than pushing out a 1.1.4 release that fixes just the blocker problem. It's pretty annoying to lose the better part of a day's productivity to chasing down a bug that is known and fixed and which has no workaround. And I'm really not at all interested in having to run development snapshots. At the very least, post a note in the 1.1.3 announcement thread that no one should use that release because it doesn't actually work.

          Does 1.1.2 function correctly, or am I stuck with a development build?

          Show
          NotMy Name added a comment - quickie test seems to show it is fixed. I have to say, I'm a little surprised that 1.1.3 is left to fester for many weeks with a blocker bug rather than pushing out a 1.1.4 release that fixes just the blocker problem. It's pretty annoying to lose the better part of a day's productivity to chasing down a bug that is known and fixed and which has no workaround. And I'm really not at all interested in having to run development snapshots. At the very least, post a note in the 1.1.3 announcement thread that no one should use that release because it doesn't actually work. Does 1.1.2 function correctly, or am I stuck with a development build?
          Hide
          Alan Stewart added a comment -

          Resolved in ROO-2368

          Show
          Alan Stewart added a comment - Resolved in ROO-2368
          Hide
          NotMy Name added a comment -

          This doesn't appear to me to be resolved, since the 1.1.4 snapshot won't actually compile, it turns out. It does notice the files that weren't updating and properly generates them, finally, but it turns out to also have dependency problems. It appears to no longer no anything about org.springframework.roo.addon.dod.RooDataOnDemand, which is presumably related to the error I'm seeing below. I have no clue how to fix it.

          [WARNING] The POM for org.springframework.roo:org.springframework.roo.annotations:jar:1.1.4.BUILD-SNAPSHOT is missing, no dependency information available
          Downloading: https://repository.jboss.org/nexus/content/repositories/releases/org/springframework/roo/org.springframework.roo.annotations/1.1.4.BUILD-SNAPSHOT/org.springframework.roo.annotations-1.1.4.BUILD-SNAPSHOT.jar
          Downloading: http://download.osgeo.org/webdav/geotools/org/springframework/roo/org.springframework.roo.annotations/1.1.4.BUILD-SNAPSHOT/org.springframework.roo.annotations-1.1.4.BUILD-SNAPSHOT.jar
          Downloading: http://www.hibernatespatial.org/repository/org/springframework/roo/org.springframework.roo.annotations/1.1.4.BUILD-SNAPSHOT/org.springframework.roo.annotations-1.1.4.BUILD-SNAPSHOT.jar
          [INFO] ------------------------------------------------------------------------
          [INFO] BUILD FAILURE
          [INFO] ------------------------------------------------------------------------
          [INFO] Total time: 20.021s
          [INFO] Finished at: Wed May 04 05:07:42 PDT 2011
          [INFO] Final Memory: 8M/81M
          [INFO] ------------------------------------------------------------------------
          [ERROR] Failed to execute goal on project portal: Could not resolve dependencies for project com.ecorithm:portal:war:0.1.0.BUILD-SNAPSHOT: Failure to find org.springframework.roo:org.springframework.roo.annotations:jar:1.1.4.BUILD-SNAPSHOT in http://maven.springframework.org/release was cached in the local repository, resolution will not be reattempted until the update interval of spring-maven-release has elapsed or updates are forced -> [Help 1]

          Show
          NotMy Name added a comment - This doesn't appear to me to be resolved, since the 1.1.4 snapshot won't actually compile, it turns out. It does notice the files that weren't updating and properly generates them, finally, but it turns out to also have dependency problems. It appears to no longer no anything about org.springframework.roo.addon.dod.RooDataOnDemand, which is presumably related to the error I'm seeing below. I have no clue how to fix it. [WARNING] The POM for org.springframework.roo:org.springframework.roo.annotations:jar:1.1.4.BUILD-SNAPSHOT is missing, no dependency information available Downloading: https://repository.jboss.org/nexus/content/repositories/releases/org/springframework/roo/org.springframework.roo.annotations/1.1.4.BUILD-SNAPSHOT/org.springframework.roo.annotations-1.1.4.BUILD-SNAPSHOT.jar Downloading: http://download.osgeo.org/webdav/geotools/org/springframework/roo/org.springframework.roo.annotations/1.1.4.BUILD-SNAPSHOT/org.springframework.roo.annotations-1.1.4.BUILD-SNAPSHOT.jar Downloading: http://www.hibernatespatial.org/repository/org/springframework/roo/org.springframework.roo.annotations/1.1.4.BUILD-SNAPSHOT/org.springframework.roo.annotations-1.1.4.BUILD-SNAPSHOT.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 20.021s [INFO] Finished at: Wed May 04 05:07:42 PDT 2011 [INFO] Final Memory: 8M/81M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project portal: Could not resolve dependencies for project com.ecorithm:portal:war:0.1.0.BUILD-SNAPSHOT: Failure to find org.springframework.roo:org.springframework.roo.annotations:jar:1.1.4.BUILD-SNAPSHOT in http://maven.springframework.org/release was cached in the local repository, resolution will not be reattempted until the update interval of spring-maven-release has elapsed or updates are forced -> [Help 1]
          Hide
          Stefan Schmidt added a comment -

          The snapshot build of the (unreleased) Roo 1.1.4 annotations jar file is not published to any public maven repo. What you need to do is to copy the relevant jar from your unzipped Roo directory /annotations folder to your local maven repository. This way maven can find the jar file and your project should compile properly. Alternatively you can edit your project pom.xml file and find the dependency for the Roo annotations jar and change it to the Roo 1.1.3.RELEASE version.

          Show
          Stefan Schmidt added a comment - The snapshot build of the (unreleased) Roo 1.1.4 annotations jar file is not published to any public maven repo. What you need to do is to copy the relevant jar from your unzipped Roo directory /annotations folder to your local maven repository. This way maven can find the jar file and your project should compile properly. Alternatively you can edit your project pom.xml file and find the dependency for the Roo annotations jar and change it to the Roo 1.1.3.RELEASE version.

            People

            • Assignee:
              Stefan Schmidt
              Reporter:
              NotMy Name
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: