java.lang.StringIndexOutOfBoundsException: String index out of range: -1

Atlassian JIRA | Nathan Ollerenshaw | 1 decade 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

    Creating a file with a japanese filename and writing a japanese comment to that filename causes the following exception: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.charAt(String.java:460) at http.utils.multipartrequest.MultipartRequest.trimQuotes(MultipartRequest.java) at http.utils.multipartrequest.MultipartRequest.parse(MultipartRequest.java) at http.utils.multipartrequest.MultipartRequest.init(MultipartRequest.java) at http.utils.multipartrequest.MultipartRequest.(MultipartRequest.java) at http.utils.multipartrequest.ServletMultipartRequest.(ServletMultipartRequest.java) at webwork.multipart.PellMultiPartRequest.(PellMultiPartRequest.java:79) at webwork.multipart.MultiPartRequestWrapper.(MultiPartRequestWrapper.java:51) at webwork.dispatcher.ServletDispatcher.wrapRequest(ServletDispatcher.java:284) at webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:142) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:128) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:60) at com.atlassian.jira.web.filters.SitemeshExcludePathFilter.doFilter(SitemeshExcludePathFilter.java:35) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.core.security.SecurityFilter.doFilter(SecurityFilter.java:170) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.core.security.LoginFilter.doFilter(LoginFilter.java:191) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.jira.web.filters.EncodingFilter.doFilter(EncodingFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533) at java.lang.Thread.run(Thread.java:536)

    Atlassian JIRA | 1 decade ago | Nathan Ollerenshaw
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  2. 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.
  3. 0

    IndexOutOfBoundsException

    Eclipse Bugzilla | 1 decade ago | alain
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    StringIndexOutOfBoundsException: String index out of range: -1

    GitHub | 2 years ago | halilim
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  6. 0

    error retrieving sequence

    GitHub | 2 years ago | nathandunn
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
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: -1

    at java.lang.String.charAt()
  2. Java RT
    String.charAt
    1. java.lang.String.charAt(String.java:460)
    1 frame
  3. http.utils.multipartrequest
    ServletMultipartRequest.<init>
    1. http.utils.multipartrequest.MultipartRequest.trimQuotes(MultipartRequest.java)
    2. http.utils.multipartrequest.MultipartRequest.parse(MultipartRequest.java)
    3. http.utils.multipartrequest.MultipartRequest.init(MultipartRequest.java)
    4. http.utils.multipartrequest.MultipartRequest.<init>(MultipartRequest.java)
    5. http.utils.multipartrequest.ServletMultipartRequest.<init>(ServletMultipartRequest.java)
    5 frames
  4. webwork.multipart
    MultiPartRequestWrapper.<init>
    1. webwork.multipart.PellMultiPartRequest.<init>(PellMultiPartRequest.java:79)
    2. webwork.multipart.MultiPartRequestWrapper.<init>(MultiPartRequestWrapper.java:51)
    2 frames
  5. webwork.dispatcher
    ServletDispatcher.service
    1. webwork.dispatcher.ServletDispatcher.wrapRequest(ServletDispatcher.java:284)
    2. webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:142)
    2 frames
  6. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    1 frame
  7. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    2 frames
  8. Sitemesh
    PageFilter.doFilter
    1. com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:128)
    2. com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:60)
    2 frames
  9. com.atlassian.jira
    SitemeshExcludePathFilter.doFilter
    1. com.atlassian.jira.web.filters.SitemeshExcludePathFilter.doFilter(SitemeshExcludePathFilter.java:35)
    1 frame
  10. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    2 frames
  11. com.atlassian.core
    SecurityFilter.doFilter
    1. com.atlassian.core.security.SecurityFilter.doFilter(SecurityFilter.java:170)
    1 frame
  12. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    2 frames
  13. com.atlassian.core
    LoginFilter.doFilter
    1. com.atlassian.core.security.LoginFilter.doFilter(LoginFilter.java:191)
    1 frame
  14. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    2 frames
  15. com.atlassian.jira
    EncodingFilter.doFilter
    1. com.atlassian.jira.web.filters.EncodingFilter.doFilter(EncodingFilter.java:53)
    1 frame
  16. Glassfish Core
    ContainerBase.invoke
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
    4. org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    5. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    6. org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    7. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    8. org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    9. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    10. org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    11. org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
    12. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    13. org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    14. org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    15. org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    16. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
    17. org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    18. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    19. org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    20. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    21. org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    22. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    23. org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    23 frames
  17. org.apache.coyote
    CoyoteAdapter.service
    1. org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
    1 frame
  18. Grizzly HTTP
    TcpWorkerThread.runIt
    1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
    2. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
    3. org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
    3 frames
  19. Tomcat Util
    ThreadPool$ControlRunnable.run
    1. org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
    1 frame
  20. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:536)
    1 frame