java.lang.IndexOutOfBoundsException

Liferay Issues | Richard Gibson | 5 years ago
  1. 0

    Testing latest sources from Liferay 6.1, breaks the application in our environments and causes this error in logs: {noformat} 08:47:25,300 ERROR [StripFilter:59] java.lang.IndexOutOfBoundsException java.lang.IndexOutOfBoundsException at java.nio.StringCharBuffer.subSequence(StringCharBuffer.java:92) at com.liferay.portal.kernel.io.unsync.UnsyncPrintWriter.append(UnsyncPrintWriter.java:97) at java.io.PrintWriter.append(PrintWriter.java:35) at com.liferay.portal.servlet.filters.strip.StripFilter.processJavaScript(StripFilter.java:432) at com.liferay.portal.servlet.filters.strip.StripFilter.strip(StripFilter.java:603) at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:337) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:199) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:241) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.cache.CacheFilter.processFilter(CacheFilter.java:401) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:55) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:68) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:871) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:558) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:490) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:382) at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:300) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:68) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:291) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:670) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:601) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:875) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:365) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:285) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:221) at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:387) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:269) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:111) {noformat} Don't know why, it works at my home computer (Ubuntu Linux 10.04). This makes many javascript errors, causing the portal to be completely unusable Error reproduces when downloading tomcat bundled nightly builds too.

    Liferay Issues | 5 years ago | Juan G
    java.lang.IndexOutOfBoundsException
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    *Reproduction steps:* *1.)* Install jdk-6u17 (in order to do this, we can edit catalina.sh file (For windows operating system, edit catalina.bat). Add "export JAVA_HOME=java location 1.6.17 export JRE_HOME=java location/jre" to the head of these files. Java location is where we unzip JDK, just like we set JAVA_HOME. This will make tomcat find specific jdk and jre to run Liferay portal, not system installed jdk.) *2.)* Start a 6.2 Portal and go to home page *Actual result:* home page doesn't show well. *Console exception:* {noformat} INFO [localhost-startStop-1][LicenseManager:?] Failed to find directory C:\Portal\liferay-portal-6.2-ee-sp8\data\license 13:20:40,544 ERROR [http-bio-8080-exec-3][StripFilter:83] java.lang.IndexOutOfBoundsException java.lang.IndexOutOfBoundsException at java.nio.StringCharBuffer.subSequence(StringCharBuffer.java:92) at java.io.PrintWriter.append(PrintWriter.java:998) at java.io.PrintWriter.append(PrintWriter.java:35) at com.liferay.portal.servlet.filters.strip.StripFilter.processJavaScript(StripFilter.java:499) at com.liferay.portal.servlet.filters.strip.StripFilter.strip(StripFilter.java:672) at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:397) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169) at {noformat} *trunk:* could not test. Once I set tomcat to use 1.6.0_17, console shows {noformat} SEVERE: Error configuring application listener of class org.apache.catalina.deploy.ApplicationListener@771e98f4 java.lang.UnsupportedClassVersionError: com/liferay/portal/spring/context/PortalContextLoaderListener : Unsupported major.minor version 51.0 (unable to load class com.liferay.portal.spring.context.PortalContextLoaderListener) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2899) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:527) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:509) {noformat} *ee-7.0.x:* the same result like trunk.

    Liferay Issues | 2 years ago | Bejond Shao
    java.lang.IndexOutOfBoundsException
  4. 0

    java.lang.IndexOutOfBoundsException while opening netbeans

    Stack Overflow | 2 years ago | Praveen Rawat
    java.lang.IndexOutOfBoundsException

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

      No message provided

      at java.nio.StringCharBuffer.subSequence()
    2. Java RT
      StringCharBuffer.subSequence
      1. java.nio.StringCharBuffer.subSequence(StringCharBuffer.java:92)
      1 frame
    3. Liferay Portal Service
      UnsyncPrintWriter.append
      1. com.liferay.portal.kernel.io.unsync.UnsyncPrintWriter.append(UnsyncPrintWriter.java:97)
      1 frame
    4. Java RT
      PrintWriter.append
      1. java.io.PrintWriter.append(PrintWriter.java:35)
      1 frame
    5. Liferay Portal Impl
      StripFilter.processFilter
      1. com.liferay.portal.servlet.filters.strip.StripFilter.processJavaScript(StripFilter.java:392)
      2. com.liferay.portal.servlet.filters.strip.StripFilter.strip(StripFilter.java:563)
      3. com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:335)
      3 frames
    6. Liferay Portal Service
      InvokerFilterChain.processDoFilter
      1. com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
      2. com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
      2 frames