java.lang.IllegalArgumentException: Method 'getTreeNodeConverter' already defined in ITD (ITD target 'com.example.treenode.webscaffold.web.roo.TreeNodeController_Roo_Controller'

Spring JIRA | Jim Smart | 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'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'
  2. 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'

    Root Cause Analysis

    1. 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()
    2. org.springframework.roo
      ControllerCommands.newController
      1. org.springframework.roo.support.util.Assert.isNull(Assert.java:89)
      2. org.springframework.roo.classpath.details.ItdTypeDetailsBuilder.onAddMethod(ItdTypeDetailsBuilder.java:78)
      3. org.springframework.roo.classpath.details.AbstractMemberHoldingTypeDetailsBuilder.addMethod(AbstractMemberHoldingTypeDetailsBuilder.java:105)
      4. org.springframework.roo.classpath.details.AbstractMemberHoldingTypeDetailsBuilder.addMethod(AbstractMemberHoldingTypeDetailsBuilder.java:123)
      5. org.springframework.roo.addon.web.mvc.controller.WebScaffoldMetadata.getRegisterConvertersMethod(WebScaffoldMetadata.java:948)
      6. org.springframework.roo.addon.web.mvc.controller.WebScaffoldMetadata.<init>(WebScaffoldMetadata.java:137)
      7. org.springframework.roo.addon.web.mvc.controller.WebScaffoldMetadataProviderImpl.getMetadata(WebScaffoldMetadataProviderImpl.java:76)
      8. org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:251)
      9. org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:139)
      10. org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:125)
      11. org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:179)
      12. org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:262)
      13. org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:138)
      14. org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:344)
      15. org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanNotified(PollingFileMonitorService.java:217)
      16. org.springframework.roo.process.manager.internal.DefaultFileManager.scan(DefaultFileManager.java:195)
      17. org.springframework.roo.addon.web.mvc.controller.WebMvcOperationsImpl.createWebApplicationContext(WebMvcOperationsImpl.java:151)
      18. org.springframework.roo.addon.web.mvc.controller.WebMvcOperationsImpl.installMinmalWebArtefacts(WebMvcOperationsImpl.java:48)
      19. org.springframework.roo.addon.web.mvc.controller.WebMvcOperationsImpl.installAllWebMvcArtifacts(WebMvcOperationsImpl.java:54)
      20. org.springframework.roo.addon.web.mvc.controller.ControllerOperationsImpl.createAutomaticController(ControllerOperationsImpl.java:123)
      21. org.springframework.roo.addon.web.mvc.controller.ControllerCommands.newController(ControllerCommands.java:93)
      21 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    4. org.springframework.roo
      JLineShell.run
      1. org.springframework.roo.support.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:191)
      2. org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:49)
      3. org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:177)
      4. org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:140)
      5. org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:47)
      6. org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:165)
      7. org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:358)
      8. org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:132)
      8 frames
    5. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:619)
      1 frame