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

Pushing in a member into an entity which is monitored by DoD causes an exception

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.1.4.RELEASE
    • Fix Version/s: 1.1.5.RELEASE
    • Component/s: TESTING
    • Labels:
      None

      Description

      For example pushing in setUsername in the stock expenses project causes the following:

      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
      

        Attachments

          Activity

            People

            Assignee:
            jtyrrell James Tyrrell
            Reporter:
            jtyrrell James Tyrrell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: