java.lang.StringIndexOutOfBoundsException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

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


rprp
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.

  • I have configured the following welcome file: <welcome-file-list> <welcome-file>index.do</welcome-file> </welcome-file-list> and this servlet mapping: <servlet-mapping> <servlet-name>springDispatcherServlet</servlet-name> <url-pattern>/index.do</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> <dispatcher>INCLUDE</dispatcher> <dispatcher>ERROR</dispatcher> </servlet-mapping> When I try to access my application with just "http://server/<context-path>/", I get the following exception: java.lang.StringIndexOutOfBoundsException: String index out of range: -8 at java.lang.String.substring(String.java:1444) at java.lang.String.substring(String.java:1411) at org.springframework.web.util.UrlPathHelper.getPathWithinServletMapping(UrlPathHelper.java:148) at org.springframework.web.util.UrlPathHelper.getLookupPathForRequest(UrlPathHelper.java:127) at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.getHandlerInternal(AbstractUrlHandlerMapping.java:113) at org.springframework.web.servlet.handler.AbstractHandlerMapping.getHandler(AbstractHandlerMapping.java:95) at org.springframework.web.servlet.DispatcherServlet.getHandler(DispatcherServlet.java:578) at org.springframework.web.servlet.DispatcherServlet.getLastModified(DispatcherServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:685) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at de.schildbach.presentation.XsltFilter.doFilter(XsltFilter.java:110) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at de.schildbach.presentation.ResponseHeaderFilter.doFilter(ResponseHeaderFilter.java:33) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at de.schildbach.user.presentation.AuthenticationFilter.doFilter(AuthenticationFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:117) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:73) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at de.schildbach.presentation.ReferrerFilter.doFilter(ReferrerFilter.java:83) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at de.schildbach.presentation.URLRewritingFilter.doFilter(URLRewritingFilter.java:33) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534)
    via by Andreas Schildbach,
  • I have configured the following welcome file: <welcome-file-list> <welcome-file>index.do</welcome-file> </welcome-file-list> and this servlet mapping: <servlet-mapping> <servlet-name>springDispatcherServlet</servlet-name> <url-pattern>/index.do</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> <dispatcher>INCLUDE</dispatcher> <dispatcher>ERROR</dispatcher> </servlet-mapping> When I try to access my application with just "http://server/<context-path>/", I get the following exception: java.lang.StringIndexOutOfBoundsException: String index out of range: -8 at java.lang.String.substring(String.java:1444) at java.lang.String.substring(String.java:1411) at org.springframework.web.util.UrlPathHelper.getPathWithinServletMapping(UrlPathHelper.java:148) at org.springframework.web.util.UrlPathHelper.getLookupPathForRequest(UrlPathHelper.java:127) at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.getHandlerInternal(AbstractUrlHandlerMapping.java:113) at org.springframework.web.servlet.handler.AbstractHandlerMapping.getHandler(AbstractHandlerMapping.java:95) at org.springframework.web.servlet.DispatcherServlet.getHandler(DispatcherServlet.java:578) at org.springframework.web.servlet.DispatcherServlet.getLastModified(DispatcherServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:685) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at de.schildbach.presentation.XsltFilter.doFilter(XsltFilter.java:110) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at de.schildbach.presentation.ResponseHeaderFilter.doFilter(ResponseHeaderFilter.java:33) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at de.schildbach.user.presentation.AuthenticationFilter.doFilter(AuthenticationFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:117) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:73) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at de.schildbach.presentation.ReferrerFilter.doFilter(ReferrerFilter.java:83) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at de.schildbach.presentation.URLRewritingFilter.doFilter(URLRewritingFilter.java:33) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534)
    via by Andreas Schildbach,
  • From Zacharias J. Beckman: After increasing the logging level to DEBUG, I found this StringIndexOutOfBounds exception in the logs. Looks like it is blowing up while processing some CVS output, perhaps: 2004-03-08 23:04:21,290 DEBUG [web.util.component.PicoJavaActionFactory] Configuring class using PicoJavaActionFactory com.atlassian.jira.web.action.browser.Browser 2004-03-08 23:04:21,495 ERROR [atlassian.jira.vcs.DefaultRepositoryManager] Error occurred while updating repository 'Harmony'. java.lang.StringIndexOutOfBoundsException: String index out of range: -8 at java.lang.String.substring(String.java:1444) at java.lang.String.substring(String.java:1411) at org.netbeans.lib.cvsclient.command.log.LogBuilder.processRevisionDate(LogBuilder.java:282) at org.netbeans.lib.cvsclient.command.log.LogBuilder.parseLine(LogBuilder.java:134) at com.atlassian.jira.vcs.cvsimpl.CvsRepositoryUtilImpl$1.parseLine(CvsRepositoryUtilImpl.java:78) at org.netbeans.lib.cvsclient.command.BuildableCommand.messageSent(BuildableCommand.java:94) at org.netbeans.lib.cvsclient.event.MessageEvent.fireEvent(MessageEvent.java:96) at org.netbeans.lib.cvsclient.event.EventManager.fireCVSEvent(EventManager.java:107) at org.netbeans.lib.cvsclient.response.MessageResponse.process(MessageResponse.java:52) at org.netbeans.lib.cvsclient.Client.handleResponse(Client.java:444) at org.netbeans.lib.cvsclient.Client.processRequests(Client.java:405) at org.netbeans.lib.cvsclient.command.log.LogCommand.execute(LogCommand.java:132) at org.netbeans.lib.cvsclient.Client.executeCommand(Client.java:488) at com.atlassian.jira.vcs.cvsimpl.CvsRepositoryUtilImpl.updateCvs(CvsRepositoryUtilImpl.java:87) at com.atlassian.jira.vcs.cvsimpl.CvsRepository.updateCvs(CvsRepository.java:95) at com.atlassian.jira.vcs.DefaultRepositoryManager.updateRepository(DefaultRepositoryManager.java:446) at com.atlassian.jira.vcs.DefaultRepositoryManager.updateRepositories(DefaultRepositoryManager.java:406) at com.atlassian.jira.service.services.vcs.VcsService.run(VcsService.java:48) at com.atlassian.jira.service.JiraServiceContainer.run(JiraServiceContainer.java:51) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:50) at org.quartz.core.JobRunShell.run(JobRunShell.java:147) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:387)2004-03-08 23:04:21,498 DEBUG [service.services.vcs.VcsService] VcsService service finished.2004-03-08 23:04:21,498 DEBUG [atlassian.jira.service.ServiceRunner] Finished Running Service [Container: com.atlassian.jira.service.services.vcs.VcsService null delay [3600000ms]]2004-03-08 23:04:21,498 DEBUG [atlassian.jira.service.ServiceRunner] Running Service [Container: com.atlassian.jira.service.services.export.ExportService null delay [43200000ms]]
    via by Keith Brophy,
  • Getting Internal Error
    via GitHub by taimur97
    ,
  • People and IMDB broken
    via GitHub by Omertron
    ,
    • java.lang.StringIndexOutOfBoundsException: String index out of range: -8 at java.lang.String.substring(String.java:1444) at java.lang.String.substring(String.java:1411) at org.springframework.web.util.UrlPathHelper.getPathWithinServletMapping(UrlPathHelper.java:148) at org.springframework.web.util.UrlPathHelper.getLookupPathForRequest(UrlPathHelper.java:127) at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.getHandlerInternal(AbstractUrlHandlerMapping.java:113) at org.springframework.web.servlet.handler.AbstractHandlerMapping.getHandler(AbstractHandlerMapping.java:95) at org.springframework.web.servlet.DispatcherServlet.getHandler(DispatcherServlet.java:578) at org.springframework.web.servlet.DispatcherServlet.getLastModified(DispatcherServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:685) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at de.schildbach.presentation.XsltFilter.doFilter(XsltFilter.java:110) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at de.schildbach.presentation.ResponseHeaderFilter.doFilter(ResponseHeaderFilter.java:33) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at de.schildbach.user.presentation.AuthenticationFilter.doFilter(AuthenticationFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:117) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:73) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at de.schildbach.presentation.ReferrerFilter.doFilter(ReferrerFilter.java:83) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at de.schildbach.presentation.URLRewritingFilter.doFilter(URLRewritingFilter.java:33) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534)

    Users with the same issue

    HandemelindoHandemelindo
    1 times, last one,
    CasperCasper
    8 times, last one,
    zsambokizsamboki
    1 times, last one,
    PilleoPilleo
    1 times, last one,
    Unknown UserUnknown User
    36 times, last one,
    92 more bugmates