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

Float fields throw an exception during Roo codegen

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 1.1.0.RC1
    • Component/s: GWT
    • Labels:
      None

      Description

      Including the following field in a Roo gwt app:
      field number --fieldName weight --type java.lang.Float --notNull --min 0

      Getting this exception during codegen:

      String index out of range: -1
      java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      at java.lang.String.substring(String.java:1949)
      at org.springframework.roo.addon.gwt.GwtMetadata.buildDataDictionary(GwtMetadata.java:434)
      at org.springframework.roo.addon.gwt.GwtMetadata.buildActivitiesMapper(GwtMetadata.java:145)
      at org.springframework.roo.addon.gwt.GwtMetadata.<init>(GwtMetadata.java:102)
      at org.springframework.roo.addon.gwt.GwtMetadataProvider.get(GwtMetadataProvider.java:131)
      at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:139)
      at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:159)
      at org.springframework.roo.addon.gwt.GwtOperationsImpl.setupGwt(GwtOperationsImpl.java:140)
      at org.springframework.roo.addon.gwt.GwtCommands.installSecurity(GwtCommands.java:28) Please wait - still loading
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Met [org.springframework.roo.process.manager [54]] ServiceEvent UNREGISTERING
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      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:161)
      at org.springframework.roo.shell.AbstractShell.executeScriptLine(AbstractShell.java:103)
      at org.springframework.roo.shell.AbstractShell.script(AbstractShell.java:83)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      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:161)
      at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:109)
      at java.lang.Thread.run(Thread.java:636)
      Script execution aborted
      java.lang.IllegalStateException: Script execution aborted
      at org.springframework.roo.shell.AbstractShell.script(AbstractShell.java:86)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      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:161)
      at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:109)
      at java.lang.Thread.run(Thread.java:636)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              amitmanjhi@google.com Amit Manjhi
              Reporter:
              sbrubaker Stephanie Brubaker
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: