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

Spring JIRA | Stefan Ocke | 6 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    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.

    Spring JIRA | 6 years ago | Stefan Ocke
    java.lang.IllegalArgumentException: Method 'update' already defined in target type de.controllerpushintest.web.FooController' (ITD target 'de.controllerpushintest.web.FooController_Roo_Controller')
  2. 0

    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.

    Spring JIRA | 6 years ago | Stefan Ocke
    java.lang.IllegalArgumentException: Method 'update' already defined in target type de.controllerpushintest.web.FooController' (ITD target 'de.controllerpushintest.web.FooController_Roo_Controller')

    Root Cause Analysis

    1. 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()
    2. org.springframework.roo
      WebScaffoldMetadata.<init>
      1. org.springframework.roo.support.util.Assert.isNull(Assert.java:89)
      2. org.springframework.roo.classpath.details.ItdTypeDetailsBuilder.onAddMethod(ItdTypeDetailsBuilder.java:84)
      3. org.springframework.roo.classpath.details.AbstractMemberHoldingTypeDetailsBuilder.addMethod(AbstractMemberHoldingTypeDetailsBuilder.java:138)
      4. org.springframework.roo.classpath.details.AbstractMemberHoldingTypeDetailsBuilder.addMethod(AbstractMemberHoldingTypeDetailsBuilder.java:156)
      5. org.springframework.roo.addon.web.mvc.controller.scaffold.mvc.WebScaffoldMetadata.<init>(WebScaffoldMetadata.java:105)
      5 frames