java.lang.StringIndexOutOfBoundsException: String index out of range: 0

SpringSource Issue Tracker | Andreas Nyberg | 6 years ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0

    I have seen this on a few occasions recently after an Ivy resolve and build in a very large workspace. It should be straght-forward to track down using the stack trace. Could it be something like following a trail of imported Spring contexts into a jar on the classpath (that doesn't have a project name in Eclipse)? {noformat} -- Error Details -- Date: Wed Aug 31 16:53:46 BST 2011 Message: An internal error occurred during: "Building Spring AOP reference model". Severity: Error Product: SpringSource Tool Suite 2.7.1.201107091000-RELEASE (com.springsource.sts.ide) Plugin: org.eclipse.core.jobs Session Data: eclipse.buildId=2.7.1.201107091000-RELEASE java.version=1.6.0_25 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB Framework arguments: -product com.springsource.sts.ide -showlocation STS 2.7.0.UPDATE Command-line arguments: -os win32 -ws win32 -arch x86 -product com.springsource.sts.ide -showlocation STS 2.7.0.UPDATE This is a continuation of log file C:\Temp\coredev\.metadata\.bak_8.log Created Time: 2011-08-31 12:34:07.424 Exception Stack Trace: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:686) at org.springframework.ide.eclipse.beans.core.internal.model.BeansModel.getProject(BeansModel.java:194) at org.springframework.ide.eclipse.beans.core.internal.model.BeansModel.getConfig(BeansModel.java:258) at org.springframework.ide.eclipse.beans.core.internal.model.BeansProject.getConfig(BeansProject.java:494) at org.springframework.ide.eclipse.beans.core.internal.model.BeansProject.getConfig(BeansProject.java:468) at org.springframework.ide.eclipse.beans.core.internal.model.BeansProject.getConfigs(BeansProject.java:423) at org.springframework.ide.eclipse.beans.core.internal.model.BeansProject.getConfig(BeansProject.java:413) at org.springframework.ide.eclipse.beans.core.internal.model.BeansModel.getConfig(BeansModel.java:224) at org.springframework.ide.eclipse.beans.core.BeansCoreUtils.isBeansConfig(BeansCoreUtils.java:43) at org.springframework.ide.eclipse.aop.core.internal.model.builder.AnnotationAspectDefinitionBuilder.buildAspectDefinitions(AnnotationAspectDefinitionBuilder.java:70) at org.springframework.ide.eclipse.aop.core.internal.model.builder.AspectDefinitionBuilderHelper.buildAspectDefinitions(AspectDefinitionBuilderHelper.java:90) at org.springframework.ide.eclipse.aop.core.internal.model.builder.AopReferenceModelBuilderJob.buildAspectDefinitions(AopReferenceModelBuilderJob.java:402) at org.springframework.ide.eclipse.aop.core.internal.model.builder.AopReferenceModelBuilderJob.addAspectInfosFromImport(AopReferenceModelBuilderJob.java:366) at org.springframework.ide.eclipse.aop.core.internal.model.builder.AopReferenceModelBuilderJob.addAspectInfosFromImport(AopReferenceModelBuilderJob.java:367) at org.springframework.ide.eclipse.aop.core.internal.model.builder.AopReferenceModelBuilderJob.buildAopReferencesForFile(AopReferenceModelBuilderJob.java:333) at org.springframework.ide.eclipse.aop.core.internal.model.builder.AopReferenceModelBuilderJob.buildAopModel(AopReferenceModelBuilderJob.java:445) at org.springframework.ide.eclipse.aop.core.internal.model.builder.AopReferenceModelBuilderJob.run(AopReferenceModelBuilderJob.java:159) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) {noformat}

    SpringSource Issue Tracker | 6 years ago | Andreas Nyberg
    java.lang.StringIndexOutOfBoundsException: String index out of range: 0
  2. 0

    I have seen this on a few occasions recently after an Ivy resolve and build in a very large workspace. It should be straght-forward to track down using the stack trace. Could it be something like following a trail of imported Spring contexts into a jar on the classpath (that doesn't have a project name in Eclipse)? {noformat} -- Error Details -- Date: Wed Aug 31 16:53:46 BST 2011 Message: An internal error occurred during: "Building Spring AOP reference model". Severity: Error Product: SpringSource Tool Suite 2.7.1.201107091000-RELEASE (com.springsource.sts.ide) Plugin: org.eclipse.core.jobs Session Data: eclipse.buildId=2.7.1.201107091000-RELEASE java.version=1.6.0_25 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB Framework arguments: -product com.springsource.sts.ide -showlocation STS 2.7.0.UPDATE Command-line arguments: -os win32 -ws win32 -arch x86 -product com.springsource.sts.ide -showlocation STS 2.7.0.UPDATE This is a continuation of log file C:\Temp\coredev\.metadata\.bak_8.log Created Time: 2011-08-31 12:34:07.424 Exception Stack Trace: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:686) at org.springframework.ide.eclipse.beans.core.internal.model.BeansModel.getProject(BeansModel.java:194) at org.springframework.ide.eclipse.beans.core.internal.model.BeansModel.getConfig(BeansModel.java:258) at org.springframework.ide.eclipse.beans.core.internal.model.BeansProject.getConfig(BeansProject.java:494) at org.springframework.ide.eclipse.beans.core.internal.model.BeansProject.getConfig(BeansProject.java:468) at org.springframework.ide.eclipse.beans.core.internal.model.BeansProject.getConfigs(BeansProject.java:423) at org.springframework.ide.eclipse.beans.core.internal.model.BeansProject.getConfig(BeansProject.java:413) at org.springframework.ide.eclipse.beans.core.internal.model.BeansModel.getConfig(BeansModel.java:224) at org.springframework.ide.eclipse.beans.core.BeansCoreUtils.isBeansConfig(BeansCoreUtils.java:43) at org.springframework.ide.eclipse.aop.core.internal.model.builder.AnnotationAspectDefinitionBuilder.buildAspectDefinitions(AnnotationAspectDefinitionBuilder.java:70) at org.springframework.ide.eclipse.aop.core.internal.model.builder.AspectDefinitionBuilderHelper.buildAspectDefinitions(AspectDefinitionBuilderHelper.java:90) at org.springframework.ide.eclipse.aop.core.internal.model.builder.AopReferenceModelBuilderJob.buildAspectDefinitions(AopReferenceModelBuilderJob.java:402) at org.springframework.ide.eclipse.aop.core.internal.model.builder.AopReferenceModelBuilderJob.addAspectInfosFromImport(AopReferenceModelBuilderJob.java:366) at org.springframework.ide.eclipse.aop.core.internal.model.builder.AopReferenceModelBuilderJob.addAspectInfosFromImport(AopReferenceModelBuilderJob.java:367) at org.springframework.ide.eclipse.aop.core.internal.model.builder.AopReferenceModelBuilderJob.buildAopReferencesForFile(AopReferenceModelBuilderJob.java:333) at org.springframework.ide.eclipse.aop.core.internal.model.builder.AopReferenceModelBuilderJob.buildAopModel(AopReferenceModelBuilderJob.java:445) at org.springframework.ide.eclipse.aop.core.internal.model.builder.AopReferenceModelBuilderJob.run(AopReferenceModelBuilderJob.java:159) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) {noformat}

    SpringSource Issue Tracker | 6 years ago | Andreas Nyberg
    java.lang.StringIndexOutOfBoundsException: String index out of range: 0
  3. 0
    samebug tip
    Thrown by String methods to indicate that an index is either negative or greater than the size of the string. For some methods such as the charAt method, this exception also is thrown when the index is equal to the size of the string.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Poor parsing of internal strings.

    GitHub | 5 years ago | Hardcore-fs
    java.lang.StringIndexOutOfBoundsException: String index out of range: 0
  6. 0

    args[] parsing fails to handle excess whitespace properly

    GitHub | 4 years ago | jvilk
    java.lang.StringIndexOutOfBoundsException: String index out of range: 0

  1. linxiaolong 1 times, last 1 month ago
  2. jokester 1 times, last 2 months ago
  3. tyson925 1 times, last 2 months ago
  4. Torasque 1 times, last 3 months ago
  5. Hronom 32257 times, last 3 months ago
11 more registered users
18 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.StringIndexOutOfBoundsException

    String index out of range: 0

    at java.lang.String.charAt()
  2. Java RT
    String.charAt
    1. java.lang.String.charAt(String.java:686)
    1 frame
  3. org.springframework.ide
    AopReferenceModelBuilderJob.run
    1. org.springframework.ide.eclipse.beans.core.internal.model.BeansModel.getProject(BeansModel.java:194)
    2. org.springframework.ide.eclipse.beans.core.internal.model.BeansModel.getConfig(BeansModel.java:258)
    3. org.springframework.ide.eclipse.beans.core.internal.model.BeansProject.getConfig(BeansProject.java:494)
    4. org.springframework.ide.eclipse.beans.core.internal.model.BeansProject.getConfig(BeansProject.java:468)
    5. org.springframework.ide.eclipse.beans.core.internal.model.BeansProject.getConfigs(BeansProject.java:423)
    6. org.springframework.ide.eclipse.beans.core.internal.model.BeansProject.getConfig(BeansProject.java:413)
    7. org.springframework.ide.eclipse.beans.core.internal.model.BeansModel.getConfig(BeansModel.java:224)
    8. org.springframework.ide.eclipse.beans.core.BeansCoreUtils.isBeansConfig(BeansCoreUtils.java:43)
    9. org.springframework.ide.eclipse.aop.core.internal.model.builder.AnnotationAspectDefinitionBuilder.buildAspectDefinitions(AnnotationAspectDefinitionBuilder.java:70)
    10. org.springframework.ide.eclipse.aop.core.internal.model.builder.AspectDefinitionBuilderHelper.buildAspectDefinitions(AspectDefinitionBuilderHelper.java:90)
    11. org.springframework.ide.eclipse.aop.core.internal.model.builder.AopReferenceModelBuilderJob.buildAspectDefinitions(AopReferenceModelBuilderJob.java:402)
    12. org.springframework.ide.eclipse.aop.core.internal.model.builder.AopReferenceModelBuilderJob.addAspectInfosFromImport(AopReferenceModelBuilderJob.java:366)
    13. org.springframework.ide.eclipse.aop.core.internal.model.builder.AopReferenceModelBuilderJob.addAspectInfosFromImport(AopReferenceModelBuilderJob.java:367)
    14. org.springframework.ide.eclipse.aop.core.internal.model.builder.AopReferenceModelBuilderJob.buildAopReferencesForFile(AopReferenceModelBuilderJob.java:333)
    15. org.springframework.ide.eclipse.aop.core.internal.model.builder.AopReferenceModelBuilderJob.buildAopModel(AopReferenceModelBuilderJob.java:445)
    16. org.springframework.ide.eclipse.aop.core.internal.model.builder.AopReferenceModelBuilderJob.run(AopReferenceModelBuilderJob.java:159)
    16 frames
  4. Eclipse Jobs
    Worker.run
    1. org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
    1 frame