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')

Spring JIRA | David Wilkinson | 6 years ago
  1. 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')
  2. 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')
  3. 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'
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 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'
  6. 0

    I'm using Roo 1.1.1 from git, and on launching in an existing Roo 1.1.0 managed project I get an exception (below). I have been able to reduce this to a simple repeatable test case, which fails on the final line:- [Roo script] project --topLevelPackage com.example.treenode.webscaffold persistence setup --provider ECLIPSELINK --database HYPERSONIC_IN_MEMORY entity --class ~.domain.TreeNode --testAutomatically field string name --notNull --sizeMax 30 field reference --fieldName parent --type ~.domain.TreeNode --cardinality ONE_TO_ONE field set --fieldName children --type ~.domain.TreeNode --cardinality ONE_TO_MANY --mappedBy parent controller scaffold --class ~.web.roo.TreeNodeController --entity ~.domain.TreeNode [Exception] java.lang.IllegalArgumentException: Method 'getTreeNodeConverter' already defined in ITD (ITD target 'com.example.treenode.webscaffold.web.roo.TreeNodeController_Roo_Controller' at org.springframework.roo.support.util.Assert.isNull(Assert.java:89) at org.springframework.roo.classpath.details.ItdTypeDetailsBuilder.onAddMethod(ItdTypeDetailsBuilder.java:78) at org.springframework.roo.classpath.details.AbstractMemberHoldingTypeDetailsBuilder.addMethod(AbstractMemberHoldingTypeDetailsBuilder.java:105) at org.springframework.roo.classpath.details.AbstractMemberHoldingTypeDetailsBuilder.addMethod(AbstractMemberHoldingTypeDetailsBuilder.java:123) at org.springframework.roo.addon.web.mvc.controller.WebScaffoldMetadata.getRegisterConvertersMethod(WebScaffoldMetadata.java:948) at org.springframework.roo.addon.web.mvc.controller.WebScaffoldMetadata.<init>(WebScaffoldMetadata.java:137) at org.springframework.roo.addon.web.mvc.controller.WebScaffoldMetadataProviderImpl.getMetadata(WebScaffoldMetadataProviderImpl.java:76) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:251) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:139) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:125) at org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:179) at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:262) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:138) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:344) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanNotified(PollingFileMonitorService.java:217) at org.springframework.roo.process.manager.internal.DefaultFileManager.scan(DefaultFileManager.java:195) at org.springframework.roo.addon.web.mvc.controller.WebMvcOperationsImpl.createWebApplicationContext(WebMvcOperationsImpl.java:151) at org.springframework.roo.addon.web.mvc.controller.WebMvcOperationsImpl.installMinmalWebArtefacts(WebMvcOperationsImpl.java:48) at org.springframework.roo.addon.web.mvc.controller.WebMvcOperationsImpl.installAllWebMvcArtifacts(WebMvcOperationsImpl.java:54) at org.springframework.roo.addon.web.mvc.controller.ControllerOperationsImpl.createAutomaticController(ControllerOperationsImpl.java:123) at org.springframework.roo.addon.web.mvc.controller.ControllerCommands.newController(ControllerCommands.java:93) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.roo.support.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:191) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:49) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:177) at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:140) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:47) at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:165) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:358) at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:132) at java.lang.Thread.run(Thread.java:619)

    Spring JIRA | 6 years ago | Jim Smart
    java.lang.IllegalArgumentException: Method 'getTreeNodeConverter' already defined in ITD (ITD target 'com.example.treenode.webscaffold.web.roo.TreeNodeController_Roo_Controller'

    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 '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()
    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:84)
      3. org.springframework.roo.classpath.details.AbstractMemberHoldingTypeDetailsBuilder.addMethod(AbstractMemberHoldingTypeDetailsBuilder.java:138)
      4. org.springframework.roo.classpath.details.AbstractMemberHoldingTypeDetailsBuilder.addMethod(AbstractMemberHoldingTypeDetailsBuilder.java:156)
      4 frames
    3. Spring Roo - Annotations (ASLv2 Licensed)
      DataOnDemandMetadata.<init>
      1. org.springframework.roo.addon.dod.DataOnDemandMetadata.<init>(DataOnDemandMetadata.java:136)
      1 frame