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

Roo does not roll back file system commits when an exception occurs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0.M1, 1.0.0.M2
    • Fix Version/s: 1.0.0.RC1
    • Component/s: @ CORE
    • Labels:
      None

      Description

      An exception ocurring in inflector is not picked up by Roo to roll back file system changes:

      roo> new persistent class jpa -name Tooth
      Created SRC_MAIN_JAVA\com\foo
      Created SRC_MAIN_JAVA\com\foo\Tooth.java
      String index out of range: -1
      java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      at java.lang.String.substring(Unknown Source)
      at org.jvnet.inflector.rule.SuffixInflectionRule.apply(SuffixInflectionRule.java:57)
      at org.jvnet.inflector.RuleBasedPluralizer.pluralizeInternal(RuleBasedPluralizer.java:169)
      at org.jvnet.inflector.RuleBasedPluralizer.pluralize(RuleBasedPluralizer.java:147)
      at org.jvnet.inflector.RuleBasedPluralizer.pluralize(RuleBasedPluralizer.java:121)
      at org.jvnet.inflector.Noun.pluralOf(Noun.java:121)
      at org.jvnet.inflector.Noun.pluralOf(Noun.java:89)
      at org.springframework.roo.addon.plural.PluralMetadata.<init>(PluralMetadata.java:57)
      at org.springframework.roo.addon.plural.PluralMetadataProvider.getMetadata(PluralMetadataProvider.java:30)
      at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:222)
      at org.springframework.roo.metadata.internal.DefaultMetadataService.get(DefaultMetadataService.java:106)
      at org.springframework.roo.metadata.internal.DefaultMetadataService.get(DefaultMetadataService.java:124)
      at org.springframework.roo.addon.entity.EntityMetadataProvider.getMetadata(EntityMetadataProvider.java:63)
      at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:222)
      at org.springframework.roo.metadata.internal.DefaultMetadataService.get(DefaultMetadataService.java:106)
      at org.springframework.roo.metadata.internal.DefaultMetadataService.get(DefaultMetadataService.java:124)
      at org.springframework.roo.addon.beaninfo.BeanInfoMetadataProvider.getMetadata(BeanInfoMetadataProvider.java:77)
      at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:222)
      at org.springframework.roo.metadata.internal.DefaultMetadataService.get(DefaultMetadataService.java:106)
      at org.springframework.roo.metadata.internal.DefaultMetadataService.get(DefaultMetadataService.java:124)
      at org.springframework.roo.addon.tostring.ToStringMetadataProvider.getMetadata(ToStringMetadataProvider.java:42)
      at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:222)
      at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:100)
      at org.springframework.roo.metadata.internal.DefaultMetadataService.notify(DefaultMetadataService.java:148)
      at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:224)
      at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:131)
      at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:184)
      at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:165)
      at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:122)
      at org.springframework.roo.process.manager.internal.DefaultProcessManager.backgroundPoll(DefaultProcessManager.java:77)
      at org.springframework.roo.process.manager.internal.DefaultProcessManager.run(DefaultProcessManager.java:155)
      at org.springframework.scheduling.timer.DelegatingTimerTask.run(DelegatingTimerTask.java:67)
      at java.util.TimerThread.mainLoop(Unknown Source)
      at java.util.TimerThread.run(Unknown Source)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              balex Ben Alex
              Reporter:
              sschmidt Stefan Schmidt
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: