java.lang.IndexOutOfBoundsException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • *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.
    via by Bejond Shao,
  • Weblogic tips - Wiki | Liferay
    via by Unknown author,
  • 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.
    via by Juan G,
    • 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)
    No Bugmate found.