java.lang.IndexOutOfBoundsException

Liferay Issues | Bejond Shao | 2 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 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

    Root Cause Analysis

    1. java.lang.IndexOutOfBoundsException

      No message provided

      at java.nio.StringCharBuffer.subSequence()
    2. Java RT
      PrintWriter.append
      1. java.nio.StringCharBuffer.subSequence(StringCharBuffer.java:92)
      2. java.io.PrintWriter.append(PrintWriter.java:998)
      3. java.io.PrintWriter.append(PrintWriter.java:35)
      3 frames
    3. Liferay Portal Impl
      StripFilter.processFilter
      1. com.liferay.portal.servlet.filters.strip.StripFilter.processJavaScript(StripFilter.java:499)
      2. com.liferay.portal.servlet.filters.strip.StripFilter.strip(StripFilter.java:672)
      3. com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:397)
      3 frames
    4. Liferay Portal Service
      BaseFilter.processFilter
      1. com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
      2. com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
      3. com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
      4. com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
      4 frames