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

Atlassian JIRA | Mark Chaimungkalanont | 8 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

    If a test case is named "test " (space is important) the getMethodName throws a StringIndexOutOfBoundsException {noformat} 2009-04-07 08:51:40,793 WARN [BAM::iipax::Agent] [DefaultBuildResultsIndexer] Failed to index build results for IIPAX-SE. Skipping. java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:558) at com.atlassian.bamboo.results.tests.TestResults.getMethodName(TestResults.java:91) at com.atlassian.bamboo.results.tests.TestCaseResultWrapper.getMethodName(TestCaseResultWrapper.java:195) at com.atlassian.bamboo.index.TestCaseResultDocument.getDocument(TestCaseResultDocument.java:70) at com.atlassian.bamboo.index.DefaultBuildResultsIndexer.addTestDocuments(DefaultBuildResultsIndexer.java:277) at com.atlassian.bamboo.index.DefaultBuildResultsIndexer.indexBuildResult(DefaultBuildResultsIndexer.java:223) 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:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy15.indexBuildResult(Unknown Source) at com.atlassian.bamboo.build.pipeline.tasks.SaveBuildTask.call(SaveBuildTask.java:69) at sun.reflect.GeneratedMethodAccessor293.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy56.call(Unknown Source) at com.atlassian.bamboo.v2.build.agent.LocalBuildResultProcessor.processBuildResult(LocalBuildResultProcessor.java:106) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:114) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:101) at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$1.run(NamedThreadFactory.java:32) at edu.emory.mathcs.backport.java.util.concurrent.helpers.ThreadHelpers$1.run(ThreadHelpers.java:34) at java.lang.Thread.run(Thread.java:595) {noformat}

    Atlassian JIRA | 8 years ago | Mark Chaimungkalanont
    java.lang.StringIndexOutOfBoundsException: String index out of range: 0
  2. 0

    If a test case is named "test " (space is important) the getMethodName throws a StringIndexOutOfBoundsException {noformat} 2009-04-07 08:51:40,793 WARN [BAM::iipax::Agent] [DefaultBuildResultsIndexer] Failed to index build results for IIPAX-SE. Skipping. java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:558) at com.atlassian.bamboo.results.tests.TestResults.getMethodName(TestResults.java:91) at com.atlassian.bamboo.results.tests.TestCaseResultWrapper.getMethodName(TestCaseResultWrapper.java:195) at com.atlassian.bamboo.index.TestCaseResultDocument.getDocument(TestCaseResultDocument.java:70) at com.atlassian.bamboo.index.DefaultBuildResultsIndexer.addTestDocuments(DefaultBuildResultsIndexer.java:277) at com.atlassian.bamboo.index.DefaultBuildResultsIndexer.indexBuildResult(DefaultBuildResultsIndexer.java:223) 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:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy15.indexBuildResult(Unknown Source) at com.atlassian.bamboo.build.pipeline.tasks.SaveBuildTask.call(SaveBuildTask.java:69) at sun.reflect.GeneratedMethodAccessor293.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy56.call(Unknown Source) at com.atlassian.bamboo.v2.build.agent.LocalBuildResultProcessor.processBuildResult(LocalBuildResultProcessor.java:106) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:114) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:101) at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$1.run(NamedThreadFactory.java:32) at edu.emory.mathcs.backport.java.util.concurrent.helpers.ThreadHelpers$1.run(ThreadHelpers.java:34) at java.lang.Thread.run(Thread.java:595) {noformat}

    Atlassian JIRA | 8 years ago | Mark Chaimungkalanont
    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

    could not read column value from result set ; String index out of range: 0

    Stack Overflow | 9 years ago | Anthony Dahanne
    java.lang.StringIndexOutOfBoundsException: String index out of range: 0
  6. 0

    Web Services Tutorial with Apache CXF | Ben McCann

    benmccann.com | 6 months ago
    java.lang.StringIndexOutOfBoundsException: String index out of range: 0

  1. poroszd 12 times, last 6 days ago
  2. linxiaolong 1 times, last 2 months ago
  3. jokester 1 times, last 2 months ago
  4. tyson925 1 times, last 3 months ago
  5. Torasque 1 times, last 4 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:558)
    1 frame
  3. com.atlassian.bamboo
    DefaultBuildResultsIndexer.indexBuildResult
    1. com.atlassian.bamboo.results.tests.TestResults.getMethodName(TestResults.java:91)
    2. com.atlassian.bamboo.results.tests.TestCaseResultWrapper.getMethodName(TestCaseResultWrapper.java:195)
    3. com.atlassian.bamboo.index.TestCaseResultDocument.getDocument(TestCaseResultDocument.java:70)
    4. com.atlassian.bamboo.index.DefaultBuildResultsIndexer.addTestDocuments(DefaultBuildResultsIndexer.java:277)
    5. com.atlassian.bamboo.index.DefaultBuildResultsIndexer.indexBuildResult(DefaultBuildResultsIndexer.java:223)
    5 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:585)
    4 frames
  5. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    3 frames
  6. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
    1 frame
  7. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    2 frames
  8. Unknown
    $Proxy15.indexBuildResult
    1. $Proxy15.indexBuildResult(Unknown Source)
    1 frame
  9. com.atlassian.bamboo
    SaveBuildTask.call
    1. com.atlassian.bamboo.build.pipeline.tasks.SaveBuildTask.call(SaveBuildTask.java:69)
    1 frame
  10. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor293.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    3. java.lang.reflect.Method.invoke(Method.java:585)
    3 frames
  11. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    3 frames
  12. Hibernate
    HibernateInterceptor.invoke
    1. org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117)
    1 frame
  13. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    1 frame
  14. Hibernate
    HibernateInterceptor.invoke
    1. org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117)
    1 frame
  15. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    2 frames
  16. Unknown
    $Proxy56.call
    1. $Proxy56.call(Unknown Source)
    1 frame
  17. com.atlassian.bamboo
    NamedThreadFactory$1.run
    1. com.atlassian.bamboo.v2.build.agent.LocalBuildResultProcessor.processBuildResult(LocalBuildResultProcessor.java:106)
    2. com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:114)
    3. com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:101)
    4. com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$1.run(NamedThreadFactory.java:32)
    4 frames
  18. Backport of JSR 166
    ThreadHelpers$1.run
    1. edu.emory.mathcs.backport.java.util.concurrent.helpers.ThreadHelpers$1.run(ThreadHelpers.java:34)
    1 frame
  19. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:595)
    1 frame