java.lang.IllegalStateException: java.lang.IllegalArgumentException: Method 'setUserName' already defined in ITD (ITD target 'org.springsource.roo.extrack.server.domain.EmployeeDataOnDemand_Roo_DataOnDemand'

Spring JIRA | James Tyrrell | 5 years ago
  1. 0

    For example pushing in setUsername in the stock expenses project causes the following: {code} java.lang.IllegalArgumentException: Method 'setUserName' already defined in ITD (ITD target 'org.springsource.roo.extrack.server.domain.EmployeeDataOnDemand_Roo_DataOnDemand' java.lang.IllegalStateException: java.lang.IllegalArgumentException: Method 'setUserName' already defined in ITD (ITD target 'org.springsource.roo.extrack.server.domain.EmployeeDataOnDemand_Roo_DataOnDemand' at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:178) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:216) at org.springframework.roo.addon.test.IntegrationTestMetadataProviderImpl.getMetadata(IntegrationTestMetadataProviderImpl.java:69) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:269) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:147) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:147) at org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:236) at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:191) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:131) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:330) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:304) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:178) at org.springframework.roo.process.manager.internal.DefaultProcessManager.backgroundPoll(DefaultProcessManager.java:125) at org.springframework.roo.process.manager.internal.DefaultProcessManager.timerBasedPoll(DefaultProcessManager.java:240) at org.springframework.roo.process.manager.internal.DefaultProcessManager$2.run(DefaultProcessManager.java:68) at java.lang.Thread.run(Thread.java:680) Caused by: java.lang.IllegalArgumentException: Method 'setUserName' already defined in ITD (ITD target 'org.springsource.roo.extrack.server.domain.EmployeeDataOnDemand_Roo_DataOnDemand' at org.springframework.roo.support.util.Assert.isNull(Assert.java:89) at org.springframework.roo.classpath.details.ItdTypeDetailsBuilder.onAddMethod(ItdTypeDetailsBuilder.java:100) at org.springframework.roo.classpath.details.AbstractMemberHoldingTypeDetailsBuilder.addMethod(AbstractMemberHoldingTypeDetailsBuilder.java:183) at org.springframework.roo.classpath.details.AbstractMemberHoldingTypeDetailsBuilder.addMethod(AbstractMemberHoldingTypeDetailsBuilder.java:207) at org.springframework.roo.addon.dod.DataOnDemandMetadata.addFieldMutatorMethodsToBuilder(DataOnDemandMetadata.java:426) at org.springframework.roo.addon.dod.DataOnDemandMetadata.<init>(DataOnDemandMetadata.java:120) at org.springframework.roo.addon.dod.DataOnDemandMetadataProviderImpl.getMetadata(DataOnDemandMetadataProviderImpl.java:130) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:269) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:147) ... 17 more {code}

    Spring JIRA | 5 years ago | James Tyrrell
    java.lang.IllegalStateException: java.lang.IllegalArgumentException: Method 'setUserName' already defined in ITD (ITD target 'org.springsource.roo.extrack.server.domain.EmployeeDataOnDemand_Roo_DataOnDemand'
  2. 0

    For example pushing in setUsername in the stock expenses project causes the following: {code} java.lang.IllegalArgumentException: Method 'setUserName' already defined in ITD (ITD target 'org.springsource.roo.extrack.server.domain.EmployeeDataOnDemand_Roo_DataOnDemand' java.lang.IllegalStateException: java.lang.IllegalArgumentException: Method 'setUserName' already defined in ITD (ITD target 'org.springsource.roo.extrack.server.domain.EmployeeDataOnDemand_Roo_DataOnDemand' at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:178) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:216) at org.springframework.roo.addon.test.IntegrationTestMetadataProviderImpl.getMetadata(IntegrationTestMetadataProviderImpl.java:69) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:269) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:147) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:147) at org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:236) at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:191) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:131) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:330) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:304) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:178) at org.springframework.roo.process.manager.internal.DefaultProcessManager.backgroundPoll(DefaultProcessManager.java:125) at org.springframework.roo.process.manager.internal.DefaultProcessManager.timerBasedPoll(DefaultProcessManager.java:240) at org.springframework.roo.process.manager.internal.DefaultProcessManager$2.run(DefaultProcessManager.java:68) at java.lang.Thread.run(Thread.java:680) Caused by: java.lang.IllegalArgumentException: Method 'setUserName' already defined in ITD (ITD target 'org.springsource.roo.extrack.server.domain.EmployeeDataOnDemand_Roo_DataOnDemand' at org.springframework.roo.support.util.Assert.isNull(Assert.java:89) at org.springframework.roo.classpath.details.ItdTypeDetailsBuilder.onAddMethod(ItdTypeDetailsBuilder.java:100) at org.springframework.roo.classpath.details.AbstractMemberHoldingTypeDetailsBuilder.addMethod(AbstractMemberHoldingTypeDetailsBuilder.java:183) at org.springframework.roo.classpath.details.AbstractMemberHoldingTypeDetailsBuilder.addMethod(AbstractMemberHoldingTypeDetailsBuilder.java:207) at org.springframework.roo.addon.dod.DataOnDemandMetadata.addFieldMutatorMethodsToBuilder(DataOnDemandMetadata.java:426) at org.springframework.roo.addon.dod.DataOnDemandMetadata.<init>(DataOnDemandMetadata.java:120) at org.springframework.roo.addon.dod.DataOnDemandMetadataProviderImpl.getMetadata(DataOnDemandMetadataProviderImpl.java:130) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:269) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:147) ... 17 more {code}

    Spring JIRA | 5 years ago | James Tyrrell
    java.lang.IllegalStateException: java.lang.IllegalArgumentException: Method 'setUserName' already defined in ITD (ITD target 'org.springsource.roo.extrack.server.domain.EmployeeDataOnDemand_Roo_DataOnDemand'
  3. 0

    The following Stack trace is output in the Shell when the setEmbeddedId method is implemented in the DataOnDemand java class. Method 'setEmbeddedId' already defined in target type 'com.iquo.igneous.brokersystem.server.domain.working.client.ClientDataOnDemand' (ITD target 'com.iquo.igneous.brokersystem.server.domain.working.client.ClientDataOnDemand_Roo_DataOnDemand') java.lang.IllegalArgumentException: Method 'setEmbeddedId' already defined in target type 'com.iquo.igneous.brokersystem.server.domain.working.client.ClientDataOnDemand' (ITD target 'com.iquo.igneous.brokersystem.server.domain.working.client.ClientDataOnDemand_Roo_DataOnDemand') 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.dod.DataOnDemandMetadata.<init>(DataOnDemandMetadata.java:136)

    Spring JIRA | 6 years ago | David Wilkinson
    java.lang.IllegalArgumentException: Method 'setEmbeddedId' already defined in target type 'com.iquo.igneous.brokersystem.server.domain.working.client.ClientDataOnDemand' (ITD target 'com.iquo.igneous.brokersystem.server.domain.working.client.ClientDataOnDemand_Roo_DataOnDemand')
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    The following Stack trace is output in the Shell when the setEmbeddedId method is implemented in the DataOnDemand java class. Method 'setEmbeddedId' already defined in target type 'com.iquo.igneous.brokersystem.server.domain.working.client.ClientDataOnDemand' (ITD target 'com.iquo.igneous.brokersystem.server.domain.working.client.ClientDataOnDemand_Roo_DataOnDemand') java.lang.IllegalArgumentException: Method 'setEmbeddedId' already defined in target type 'com.iquo.igneous.brokersystem.server.domain.working.client.ClientDataOnDemand' (ITD target 'com.iquo.igneous.brokersystem.server.domain.working.client.ClientDataOnDemand_Roo_DataOnDemand') 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.dod.DataOnDemandMetadata.<init>(DataOnDemandMetadata.java:136)

    Spring JIRA | 6 years ago | David Wilkinson
    java.lang.IllegalArgumentException: Method 'setEmbeddedId' already defined in target type 'com.iquo.igneous.brokersystem.server.domain.working.client.ClientDataOnDemand' (ITD target 'com.iquo.igneous.brokersystem.server.domain.working.client.ClientDataOnDemand_Roo_DataOnDemand')
  6. 0

    If a JPA Entity is annotated with @Embeddable, Roo fails to generate ApplicationConversionServiceFactoryBean_Roo_ConversionService (ultimately resulting in no Roo files being generated). Steps to reproduce: // Spring Roo 1.3.1.RELEASE [rev f4f5256] log opened at 2015-04-20 11:58:19 project --topLevelPackage com.foo jpa setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY entity jpa --class ~.Bar // At this point, add @Embeddable annotation to the class, then continue: web mvc setup web mvc scaffold --class ~.Bar // [failed] web mvc scaffold --class ~.BarController With 'development mode' turned on, error message looks like this: Method 'getBarToStringConverter' already defined in ITD (ITD target 'com.foo.ApplicationConversionServiceFactoryBean_Roo_ConversionService') java.lang.IllegalArgumentException: Method 'getBarToStringConverter' already defined in ITD (ITD target 'com.foo.ApplicationConversionServiceFactoryBean_Roo_ConversionService') at org.apache.commons.lang3.Validate.isTrue(Validate.java:155) at org.springframework.roo.classpath.details.ItdTypeDetailsBuilder.onAddMethod(ItdTypeDetailsBuilder.java:286) at org.springframework.roo.classpath.details.AbstractMemberHoldingTypeDetailsBuilder.addMethod(AbstractMemberHoldingTypeDetailsBuilder.java:187) at org.springframework.roo.addon.web.mvc.controller.converter.ConversionServiceMetadata.getInstallEmbeddableConvertersMethod(ConversionServiceMetadata.java:141) at org.springframework.roo.addon.web.mvc.controller.converter.ConversionServiceMetadata.<init>(ConversionServiceMetadata.java:123) at org.springframework.roo.addon.web.mvc.controller.converter.ConversionServiceMetadataProviderImpl.getMetadata(ConversionServiceMetadataProviderImpl.java:220) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:264) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:212) at org.springframework.roo.metadata.DefaultMetadataService.evictAndGet(DefaultMetadataService.java:121) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:601) at org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:325) at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:200) at org.springframework.roo.classpath.DefaultPhysicalTypeMetadataProvider.onFileEvent(DefaultPhysicalTypeMetadataProvider.java:250) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:433) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publishRequestedFileEvents(PollingFileMonitorService.java:456) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanNotified(PollingFileMonitorService.java:660) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:335) at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:71) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:44) at org.springframework.roo.shell.AbstractShell.executeCommandImpl(AbstractShell.java:242) at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:149) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:421) at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:539) at java.lang.Thread.run(Thread.java:745)

    Spring JIRA | 2 years ago | Alan Hamilton
    java.lang.IllegalArgumentException: Method 'getBarToStringConverter' already defined in ITD (ITD target 'com.foo.ApplicationConversionServiceFactoryBean_Roo_ConversionService')

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Method 'setUserName' already defined in ITD (ITD target 'org.springsource.roo.extrack.server.domain.EmployeeDataOnDemand_Roo_DataOnDemand'

      at org.springframework.roo.support.util.Assert.isNull()
    2. org.springframework.roo
      AbstractMemberHoldingTypeDetailsBuilder.addMethod
      1. org.springframework.roo.support.util.Assert.isNull(Assert.java:89)
      2. org.springframework.roo.classpath.details.ItdTypeDetailsBuilder.onAddMethod(ItdTypeDetailsBuilder.java:100)
      3. org.springframework.roo.classpath.details.AbstractMemberHoldingTypeDetailsBuilder.addMethod(AbstractMemberHoldingTypeDetailsBuilder.java:183)
      4. org.springframework.roo.classpath.details.AbstractMemberHoldingTypeDetailsBuilder.addMethod(AbstractMemberHoldingTypeDetailsBuilder.java:207)
      4 frames
    3. Spring Roo - Annotations (ASLv2 Licensed)
      DataOnDemandMetadataProviderImpl.getMetadata
      1. org.springframework.roo.addon.dod.DataOnDemandMetadata.addFieldMutatorMethodsToBuilder(DataOnDemandMetadata.java:426)
      2. org.springframework.roo.addon.dod.DataOnDemandMetadata.<init>(DataOnDemandMetadata.java:120)
      3. org.springframework.roo.addon.dod.DataOnDemandMetadataProviderImpl.getMetadata(DataOnDemandMetadataProviderImpl.java:130)
      3 frames
    4. org.springframework.roo
      DefaultMetadataService.get
      1. org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:269)
      2. org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:147)
      3. org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81)
      4. org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:216)
      4 frames
    5. Spring Roo - Annotations (ASLv2 Licensed)
      IntegrationTestMetadataProviderImpl.getMetadata
      1. org.springframework.roo.addon.test.IntegrationTestMetadataProviderImpl.getMetadata(IntegrationTestMetadataProviderImpl.java:69)
      1 frame
    6. org.springframework.roo
      DefaultProcessManager$2.run
      1. org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:269)
      2. org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:147)
      3. org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81)
      4. org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:147)
      5. org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:236)
      6. org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:191)
      7. org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:131)
      8. org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:330)
      9. org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:304)
      10. org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:178)
      11. org.springframework.roo.process.manager.internal.DefaultProcessManager.backgroundPoll(DefaultProcessManager.java:125)
      12. org.springframework.roo.process.manager.internal.DefaultProcessManager.timerBasedPoll(DefaultProcessManager.java:240)
      13. org.springframework.roo.process.manager.internal.DefaultProcessManager$2.run(DefaultProcessManager.java:68)
      13 frames
    7. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:680)
      1 frame