java.lang.StringIndexOutOfBoundsException

tip

You need to make sure that capitalisation of the case for the plugin in the
properties file is exactly: "AllocinePlugin" and not "allocineplugin"

tip

This is a bug when using Micromax devices with VideoView. You can either exclude these devices or look at this workaround: http://stackoverflow.com/a/31942841/4347859

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • 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)
    via by Stephanie Brubaker,
  • 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)
    via by Stephanie Brubaker,
  • adding a float type field leads to exception "String index out of range: -1" in gwt setup Step to reproduce: persistence setup --provider DATANUCLEUS --database HYPERSONIC_IN_MEMORY entity --class ~.server.domain.Test --testAutomatically field number --fieldName aFloat --type java.lang.Float gwt setup Error message: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1937) at org.springframework.roo.addon.gwt.GwtMetadata.buildDataDictionary(GwtMetadata.java:580) at org.springframework.roo.addon.gwt.GwtMetadata.buildActivitiesMapper(GwtMetadata.java:248) at org.springframework.roo.addon.gwt.GwtMetadata.<init>(GwtMetadata.java:123) at org.springframework.roo.addon.gwt.GwtMetadataProvider.get(GwtMetadataProvider.java:130) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:128) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:147) at org.springframework.roo.addon.gwt.GwtOperationsImpl.setupGwt(GwtOperationsImpl.java:143) at org.springframework.roo.addon.gwt.GwtCommands.installSecurity(GwtCommands.java:28) 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:159) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:327) at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:120) at java.lang.Thread.run(Thread.java:619)
    via by René Buffat,
  • adding a float type field leads to exception "String index out of range: -1" in gwt setup Step to reproduce: persistence setup --provider DATANUCLEUS --database HYPERSONIC_IN_MEMORY entity --class ~.server.domain.Test --testAutomatically field number --fieldName aFloat --type java.lang.Float gwt setup Error message: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1937) at org.springframework.roo.addon.gwt.GwtMetadata.buildDataDictionary(GwtMetadata.java:580) at org.springframework.roo.addon.gwt.GwtMetadata.buildActivitiesMapper(GwtMetadata.java:248) at org.springframework.roo.addon.gwt.GwtMetadata.<init>(GwtMetadata.java:123) at org.springframework.roo.addon.gwt.GwtMetadataProvider.get(GwtMetadataProvider.java:130) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:128) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:147) at org.springframework.roo.addon.gwt.GwtOperationsImpl.setupGwt(GwtOperationsImpl.java:143) at org.springframework.roo.addon.gwt.GwtCommands.installSecurity(GwtCommands.java:28) 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:159) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:327) at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:120) at java.lang.Thread.run(Thread.java:619)
    via by René Buffat,
  • Error with View State with JSF2
    via by Unknown author,
  • Indexing exception
    via GitHub by ggiudetti
    ,
    • 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)

    Users with the same issue

    zsamboki
    1 times, last one,
    osvzs
    2 times, last one,
    richard77
    2 times, last one,
    MoYapro
    1 times, last one,
    kjhdofjosvs
    2 times, last one,
    92 more bugmates