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

Pushin refactoring of Controller methods fails with Exception in Roo Shell

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: 1.1.3.RELEASE
    • Fix Version/s: 1.1.4.RELEASE
    • Component/s: WEB MVC
    • Labels:
      None

      Description

      I created a simple project with one entity "Foo" and one field.

      Then I scaffolded the controller with controller all.

      Now, I did 'push-in-refactoring' for the "update" method of the controller.

      The Roo shell gives following exception then:

      [Spring Roo Process Manager Background Polling Thread] Method 'update' already defined in target type 'de.controllerpushintest.web.Foo
      Controller' (ITD target 'de.controllerpushintest.web.FooController_Roo_Controller')

      java.lang.IllegalArgumentException: Method 'update' already defined in target type de.controllerpushintest.web.FooController' (ITD target 'de.controllerpushintest.web.FooController_Roo_Controller')

      at org.springframework.roo.support.util.Assert.isNull(Assert.java:89)
      at org.springframework.roo.classpath.details.ItdTypeDetailsBuilder.onAddMethod(ItdTypeDetailsBuilder.java:84)
      at org.springframework.roo.classpath.details.AbstractMemberHoldingTypeDetailsBuilder.addMethod(AbstractMemberHoldingTypeDetailsBuilder.java:138)
      at org.springframework.roo.classpath.details.AbstractMemberHoldingTypeDetailsBuilder.addMethod(AbstractMemberHoldingTypeDetailsBuilder.java:156)
      at org.springframework.roo.addon.web.mvc.controller.scaffold.mvc.WebScaffoldMetadata.<init>(WebScaffoldMetadata.java:105)

      ...

      Afterwards, the Roo shell seems not to react on changes applied to the controller at all.

      It's critical, since one cannot customize controllers anymore.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stewarta Alan Stewart
              Reporter:
              stefanoc Stefan Ocke
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: