java.lang.IndexOutOfBoundsException: Index: 2, Size: 2

Apereo Issues | Olivier Le Borgne | 6 years ago
  1. 0

    Hello, my name is Olivier Le Borgne, I'm developer at the university of Nantes, France. I've installed Uportal here, and little by little I'm integrating new portlets. I'm very interested in integrating the portlet you developped, "Web Proxy Portlet" which could replace "IFrame" type portlets by me. I'm currently testing it but I'm getting a problem with clipping, I'm not sure I'm using it the right way ... :-) I'm using uPortal 3.1.2, so I had to enter my preferences in the following webProxy.channel file : ===================================================================== <channel-definition script="classpath://org/jasig/portal/io/import-channel_v3-1.crn"> <title>WebProxy Portlet</title> <name>WebProxy Portlet</name> <fname>webproxy-porlet</fname> <desc>WebProxy Portlet</desc> <type>Portlet</type> <class>org.jasig.portal.channels.portlet.CSpringPortletAdaptor</class> <timeout>60000</timeout> <hasedit>Y</hasedit> <hashelp>N</hashelp> <hasabout>N</hasabout> <secure>N</secure> <locale>en_US</locale> <categories> <category>Applications</category> </categories> <groups> <group>Tout le monde</group> </groups> <parameters> <parameter> <name>portletApplicationId</name> <value>/WebProxyPortlet</value> <description/> <ovrd>N</ovrd> </parameter> <parameter> <name>portletName</name> <value>WebProxyPortlet</value> <description/> <ovrd>N</ovrd> </parameter> </parameters> <portletPreferences> <portletPreference> <name>edu.wisc.my.webproxy.webproxy.general.config.sBaseUrl</name> <values><value>http://localhost:8080/testWebProxy.html</value></values> </portletPreference> <portletPreference> <name>edu.wisc.my.webproxy.webproxy.httpclient.httpTimeout</name> <values><value>5</value></values> </portletPreference> <portletPreference> <name>edu.wisc.my.webproxy.webproxy.httpclient.authEnable</name> <values><value>false</value></values> </portletPreference> <portletPreference> <name>edu.wisc.my.webproxy.webproxy.httpclient.sAuthType</name> <values><value>CAS</value></values> </portletPreference> <portletPreference> <name>edu.wisc.my.webproxy.webproxy.clipping.sClippingDisable</name> <values><value>true</value></values> </portletPreference> <portletPreference> <name>edu.wisc.my.webproxy.webproxy.clipping.sXPath</name> <values><value>/html/body/h1</value></values> </portletPreference> </portletPreferences> </channel-definition> =============================================================================== For testing I tried to clip the traditional 404 html error page : =============================================================================== <html> <head> <title>Apache Tomcat/6.0.28 - Rapport d'erreur</title> <style><!----> </style> </head> <body> <h1>Etat HTTP 404 - /testWebProxy.html</h1> <HR size="1" noshade="noshade"> <p><b>type</b> Rapport d'état</p> <p><b>message</b> <u>/testWebProxy.html</u></p> <p><b>description</b> <u>La ressource demandée (/testWebProxy.html) n'est pas disponible.</u></p> <HR size="1" noshade="noshade"> <h3>Apache Tomcat/6.0.28</h3> </body> </html> ================================================================================ If I only want to keep the title <h1>, I use the following preference : <portletPreference> <name>edu.wisc.my.webproxy.webproxy.clipping.sXPath</name> <values><value>/html/body/h1</value></values> </portletPreference> but I'm getting an error message : java.lang.IndexOutOfBoundsException: Index: 2, Size: 2 at java.util.LinkedList.entry(LinkedList.java:365) at java.util.LinkedList.get(LinkedList.java:315) at edu.wisc.my.webproxy.beans.filtering.ClippingFilter.endElement(ClippingFilter.java:234) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) at org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:329) at org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:2999) at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:1991) at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:895) at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) at edu.wisc.my.webproxy.beans.filtering.ChainingSaxFilter.parse(ChainingSaxFilter.java:127) at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) at edu.wisc.my.webproxy.beans.filtering.ChainingSaxFilter.parse(ChainingSaxFilter.java:127) at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) at edu.wisc.my.webproxy.beans.filtering.ChainingSaxFilter.parse(ChainingSaxFilter.java:127) at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) at edu.wisc.my.webproxy.beans.filtering.ChainingSaxFilter.parse(ChainingSaxFilter.java:127) at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) at edu.wisc.my.webproxy.beans.filtering.ChainingSaxFilter.parse(ChainingSaxFilter.java:127) at edu.wisc.my.webproxy.portlet.WebProxyPortlet.renderContent(WebProxyPortlet.java:579) at edu.wisc.my.webproxy.portlet.WebProxyPortlet.doDispatch(WebProxyPortlet.java:179) at edu.wisc.my.webproxy.portlet.WebProxyPortlet.render(WebProxyPortlet.java:148) at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:208) at org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:139) Could you telle me if I'm doing something wrong, tanks in advance, best regards, Olivier le Borgne

    Apereo Issues | 6 years ago | Olivier Le Borgne
    java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
  2. 0

    Hello, my name is Olivier Le Borgne, I'm developer at the university of Nantes, France. I've installed Uportal here, and little by little I'm integrating new portlets. I'm very interested in integrating the portlet you developped, "Web Proxy Portlet" which could replace "IFrame" type portlets by me. I'm currently testing it but I'm getting a problem with clipping, I'm not sure I'm using it the right way ... :-) I'm using uPortal 3.1.2, so I had to enter my preferences in the following webProxy.channel file : ===================================================================== <channel-definition script="classpath://org/jasig/portal/io/import-channel_v3-1.crn"> <title>WebProxy Portlet</title> <name>WebProxy Portlet</name> <fname>webproxy-porlet</fname> <desc>WebProxy Portlet</desc> <type>Portlet</type> <class>org.jasig.portal.channels.portlet.CSpringPortletAdaptor</class> <timeout>60000</timeout> <hasedit>Y</hasedit> <hashelp>N</hashelp> <hasabout>N</hasabout> <secure>N</secure> <locale>en_US</locale> <categories> <category>Applications</category> </categories> <groups> <group>Tout le monde</group> </groups> <parameters> <parameter> <name>portletApplicationId</name> <value>/WebProxyPortlet</value> <description/> <ovrd>N</ovrd> </parameter> <parameter> <name>portletName</name> <value>WebProxyPortlet</value> <description/> <ovrd>N</ovrd> </parameter> </parameters> <portletPreferences> <portletPreference> <name>edu.wisc.my.webproxy.webproxy.general.config.sBaseUrl</name> <values><value>http://localhost:8080/testWebProxy.html</value></values> </portletPreference> <portletPreference> <name>edu.wisc.my.webproxy.webproxy.httpclient.httpTimeout</name> <values><value>5</value></values> </portletPreference> <portletPreference> <name>edu.wisc.my.webproxy.webproxy.httpclient.authEnable</name> <values><value>false</value></values> </portletPreference> <portletPreference> <name>edu.wisc.my.webproxy.webproxy.httpclient.sAuthType</name> <values><value>CAS</value></values> </portletPreference> <portletPreference> <name>edu.wisc.my.webproxy.webproxy.clipping.sClippingDisable</name> <values><value>true</value></values> </portletPreference> <portletPreference> <name>edu.wisc.my.webproxy.webproxy.clipping.sXPath</name> <values><value>/html/body/h1</value></values> </portletPreference> </portletPreferences> </channel-definition> =============================================================================== For testing I tried to clip the traditional 404 html error page : =============================================================================== <html> <head> <title>Apache Tomcat/6.0.28 - Rapport d'erreur</title> <style><!----> </style> </head> <body> <h1>Etat HTTP 404 - /testWebProxy.html</h1> <HR size="1" noshade="noshade"> <p><b>type</b> Rapport d'état</p> <p><b>message</b> <u>/testWebProxy.html</u></p> <p><b>description</b> <u>La ressource demandée (/testWebProxy.html) n'est pas disponible.</u></p> <HR size="1" noshade="noshade"> <h3>Apache Tomcat/6.0.28</h3> </body> </html> ================================================================================ If I only want to keep the title <h1>, I use the following preference : <portletPreference> <name>edu.wisc.my.webproxy.webproxy.clipping.sXPath</name> <values><value>/html/body/h1</value></values> </portletPreference> but I'm getting an error message : java.lang.IndexOutOfBoundsException: Index: 2, Size: 2 at java.util.LinkedList.entry(LinkedList.java:365) at java.util.LinkedList.get(LinkedList.java:315) at edu.wisc.my.webproxy.beans.filtering.ClippingFilter.endElement(ClippingFilter.java:234) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) at org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:329) at org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:2999) at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:1991) at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:895) at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) at edu.wisc.my.webproxy.beans.filtering.ChainingSaxFilter.parse(ChainingSaxFilter.java:127) at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) at edu.wisc.my.webproxy.beans.filtering.ChainingSaxFilter.parse(ChainingSaxFilter.java:127) at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) at edu.wisc.my.webproxy.beans.filtering.ChainingSaxFilter.parse(ChainingSaxFilter.java:127) at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) at edu.wisc.my.webproxy.beans.filtering.ChainingSaxFilter.parse(ChainingSaxFilter.java:127) at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) at edu.wisc.my.webproxy.beans.filtering.ChainingSaxFilter.parse(ChainingSaxFilter.java:127) at edu.wisc.my.webproxy.portlet.WebProxyPortlet.renderContent(WebProxyPortlet.java:579) at edu.wisc.my.webproxy.portlet.WebProxyPortlet.doDispatch(WebProxyPortlet.java:179) at edu.wisc.my.webproxy.portlet.WebProxyPortlet.render(WebProxyPortlet.java:148) at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:208) at org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:139) Could you telle me if I'm doing something wrong, tanks in advance, best regards, Olivier le Borgne

    Apereo Issues | 6 years ago | Olivier Le Borgne
    java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
  3. 0

    Concurrency problems in JTable

    Stack Overflow | 6 years ago | Chris Dennett
    java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    IndexOutOfBoundsException while puting panel between button and checkbox

    Netbeans Bugzilla | 1 decade ago | jungi
    java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
  6. 0

    Compiling the following: {code:title=IOOBE.groovy|borderStyle=solid} import groovy.transform.TypeChecked import java.nio.file.Files import java.nio.file.Paths @TypeChecked class IOOBE { def ioobe() { Files.write(Paths.get('foo.bar'), { ['foo', 'bar'].iterator() }); } } {code} (closure is used to automatically coerce Iterator to Iterable), produces the following exception during compilation: {code} Error:Groovyc: java.lang.IndexOutOfBoundsException: Index: 2, Size: 2 at java.util.LinkedList.checkElementIndex(LinkedList.java:555) at java.util.LinkedList.get(LinkedList.java:476) at org.codehaus.groovy.ast.expr.TupleExpression.getExpression(TupleExpression.java:89) at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.inferSAMType(StaticTypeCheckingVisitor.java:2342) at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.inferClosureParameterTypes(StaticTypeCheckingVisitor.java:2318) at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallArguments(StaticTypeCheckingVisitor.java:2282) at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:2970) at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:66) at org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionStatement(CodeVisitorSupport.java:71) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitExpressionStatement(ClassCodeVisitorSupport.java:196) at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:42) at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:37) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:166) at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:71) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:104) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:115) at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitConstructorOrMethod(StaticTypeCheckingVisitor.java:1774) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:126) at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.startMethodInference(StaticTypeCheckingVisitor.java:2107) at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethod(StaticTypeCheckingVisitor.java:2066) at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1086) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:53) at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitClass(StaticTypeCheckingVisitor.java:249) at org.codehaus.groovy.transform.StaticTypesTransformation.visit(StaticTypesTransformation.java:66) at org.codehaus.groovy.transform.ASTTransformationVisitor.visitClass(ASTTransformationVisitor.java:134) at org.codehaus.groovy.transform.ASTTransformationVisitor$2.call(ASTTransformationVisitor.java:178) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1055) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:591) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546) at org.jetbrains.groovy.compiler.rt.GroovyCompilerWrapper.compile(GroovyCompilerWrapper.java:62) at org.jetbrains.groovy.compiler.rt.DependentGroovycRunner.runGroovyc(DependentGroovycRunner.java:115) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.jetbrains.groovy.compiler.rt.GroovycRunner.intMain2(GroovycRunner.java:134) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.jetbrains.jps.incremental.groovy.InProcessGroovyc.runGroovycInThisProcess(InProcessGroovyc.java:156) at org.jetbrains.jps.incremental.groovy.InProcessGroovyc.access$000(InProcessGroovyc.java:51) at org.jetbrains.jps.incremental.groovy.InProcessGroovyc$1.call(InProcessGroovyc.java:85) at org.jetbrains.jps.incremental.groovy.InProcessGroovyc$1.call(InProcessGroovyc.java:82) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {code}

    Apache's JIRA Issue Tracker | 9 months ago | Gregory Moltchadski
    java.lang.IndexOutOfBoundsException: Index: 2, Size: 2

  1. tyson925 4 times, last 6 months ago
6 unregistered visitors
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

    Index: 2, Size: 2

    at java.util.LinkedList.entry()
  2. Java RT
    LinkedList.get
    1. java.util.LinkedList.entry(LinkedList.java:365)
    2. java.util.LinkedList.get(LinkedList.java:315)
    2 frames
  3. edu.wisc.my
    ClippingFilter.endElement
    1. edu.wisc.my.webproxy.beans.filtering.ClippingFilter.endElement(ClippingFilter.java:234)
    1 frame
  4. Xerces2-j
    AbstractSAXParser.endElement
    1. org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    1 frame
  5. Maven
    HTMLConfiguration.parse
    1. org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206)
    2. org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:329)
    3. org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:2999)
    4. org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:1991)
    5. org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:895)
    6. org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499)
    7. org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452)
    7 frames
  6. Xerces2-j
    AbstractSAXParser.parse
    1. org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    2. org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    2 frames
  7. Java RT
    XMLFilterImpl.parse
    1. org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
    1 frame
  8. edu.wisc.my
    ChainingSaxFilter.parse
    1. edu.wisc.my.webproxy.beans.filtering.ChainingSaxFilter.parse(ChainingSaxFilter.java:127)
    1 frame
  9. Java RT
    XMLFilterImpl.parse
    1. org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
    1 frame
  10. edu.wisc.my
    ChainingSaxFilter.parse
    1. edu.wisc.my.webproxy.beans.filtering.ChainingSaxFilter.parse(ChainingSaxFilter.java:127)
    1 frame
  11. Java RT
    XMLFilterImpl.parse
    1. org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
    1 frame
  12. edu.wisc.my
    ChainingSaxFilter.parse
    1. edu.wisc.my.webproxy.beans.filtering.ChainingSaxFilter.parse(ChainingSaxFilter.java:127)
    1 frame
  13. Java RT
    XMLFilterImpl.parse
    1. org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
    1 frame
  14. edu.wisc.my
    ChainingSaxFilter.parse
    1. edu.wisc.my.webproxy.beans.filtering.ChainingSaxFilter.parse(ChainingSaxFilter.java:127)
    1 frame
  15. Java RT
    XMLFilterImpl.parse
    1. org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
    1 frame
  16. edu.wisc.my
    WebProxyPortlet.render
    1. edu.wisc.my.webproxy.beans.filtering.ChainingSaxFilter.parse(ChainingSaxFilter.java:127)
    2. edu.wisc.my.webproxy.portlet.WebProxyPortlet.renderContent(WebProxyPortlet.java:579)
    3. edu.wisc.my.webproxy.portlet.WebProxyPortlet.doDispatch(WebProxyPortlet.java:179)
    4. edu.wisc.my.webproxy.portlet.WebProxyPortlet.render(WebProxyPortlet.java:148)
    4 frames
  17. Pluto Portlet Container
    PortletServlet.doGet
    1. org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:208)
    2. org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:139)
    2 frames