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

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.


rafael

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

  • [STDOUT] 23:46:51,023 WARN [PortalImpl] Unable to impersonate JpVZ4mObbp4%3D because the string cannot be decrypted java.lang.StringIndexOutOfBoundsException: String index out of range: 14 at java.lang.String.charAt(String.java:558) at com.liferay.portal.kernel.util.Base64.decode(Base64.java:143) at com.liferay.util.Encryptor.decrypt(Encryptor.java:126) at com.liferay.portal.util.PortalImpl.getDoAsUserId(PortalImpl.java:3378) at com.liferay.portal.util.PortalImpl.getUserId(PortalImpl.java:2560) at com.liferay.portal.util.PortalUtil.getUserId(PortalUtil.java:759) at com.liferay.portlet.PortletRequestImpl.init(PortletRequestImpl.java:629) at com.liferay.portlet.RenderRequestFactory.create(RenderRequestFactory.java:63) at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:915) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481) at com.liferay.portal.util.PortalImpl.renderPortlet(PortalImpl.java:2884) at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:897) at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(RuntimePortletUtil.java:170) at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(RuntimePortletUtil.java:90) at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(RuntimePortletUtil.java:77) at com.liferay.portlet.layoutconfiguration.util.velocity.PortletLogic.processContent(PortletLogic.java:85) at com.liferay.portlet.layoutconfiguration.util.velocity.TemplateProcessor.processMax(TemplateProcessor.java:85) at sun.reflect.GeneratedMethodAccessor701.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    via by sameer danthurthy,
  • Multiple exceptions in logs - 社区论坛 | Liferay
    via by Unknown author,
  • Infix to postfix with real numbers
    via Stack Overflow by mpluse
    ,
  • SIOOBE in JSHint#fixPosition
    via GitHub by ralfstx
    ,
  • StringIndex Error
    via Stack Overflow by chrisk012
    ,
  • StringIndexOutOfBoundsException
    via GitHub by ewapptus
    ,
    • java.lang.StringIndexOutOfBoundsException: String index out of range: 14 at java.lang.String.charAt(String.java:687) at com.liferay.portal.kernel.util.Base64.decode(Base64.java:139) at com.liferay.util.Encryptor.decrypt(Encryptor.java:126) at com.liferay.portal.util.PortalImpl.getDoAsUserId(PortalImpl.java:3225) at com.liferay.portal.util.PortalImpl.getUserId(PortalImpl.java:2405) at com.liferay.portal.util.PortalUtil.getUserId(PortalUtil.java:718) at com.liferay.portlet.PortletRequestImpl.init(PortletRequestImpl.java:629) at com.liferay.portlet.RenderRequestFactory.create(RenderRequestFactory.java:63) at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:896) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:584) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497) at com.liferay.portal.util.PortalImpl.renderPortlet(PortalImpl.java:2801) at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:858) at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(RuntimePortletUtil.java:170) at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(RuntimePortletUtil.java:103) at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:281) at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:190) at org.apache.jsp.html.portal.layout.view.portlet_jsp._jspService(portlet_jsp.java:817) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:584) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497) at com.liferay.portal.action.LayoutAction.includeLayoutContent(LayoutAction.java:294) at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:466) at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:195) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:159) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:627) at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:505) at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:732) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:143) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154) at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:142) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154) at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:140) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154) at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:282) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154) at com.liferay.portal.servlet.filters.cache.CacheFilter.processFilter(CacheFilter.java:380) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154) at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:244) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154) at com.liferay.portal.servlet.filters.sso.opensso.OpenSSOFilter.processFilter(OpenSSOFilter.java:73) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154) at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:193) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154) at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:188) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:619)

    Users with the same issue

    poroszd
    12 times, last one,
    olle.hallin
    1 times, last one,
    linxiaolong
    1 times, last one,
    jokester
    1 times, last one,
    tyson925
    1 times, last one,
    30 more bugmates