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

DoD doesn't fail gracefully or resolve properly once metadata has stabilized

    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: @ CORE
    • Labels:
      None

      Description

      When declaring the id field in the governor the following exception is thrown:

      [Spring Roo Process Manager Background Polling Thread] java.lang.IllegalArgumentException: Identifier accessor method required
      java.lang.IllegalStateException: java.lang.IllegalArgumentException: Identifier accessor method required
         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: Identifier accessor method required
         at org.springframework.roo.support.util.Assert.notNull(Assert.java:112)
         at org.springframework.roo.addon.dod.DataOnDemandMetadata.<init>(DataOnDemandMetadata.java:77)
         at org.springframework.roo.addon.dod.DataOnDemandMetadataProviderImpl.getMetadata(DataOnDemandMetadataProviderImpl.java:127)
         at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:269)
         at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:147)
         ... 17 more
      

      The issue can be replicated by running the expenses script and pushing in the id field using the code below, closing the shell, launching the shell again, and commenting out the pushed in id field.

      @javax.persistence.Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      @Column(name = "id")
      private Long id;
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: