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

Coderanch | David Starr | 4 years ago
  1. 0

    Exception

    Coderanch | 4 years ago | David Starr
    java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
  2. 0

    Exception

    Coderanch | 4 years ago | David Starr
    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

    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
  6. 0

    IndexOutOfBoundsException while puting panel between button and checkbox

    Netbeans Bugzilla | 1 decade ago | jungi
    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.checkElementIndex()
  2. Java RT
    LinkedList.get
    1. java.util.LinkedList.checkElementIndex(LinkedList.java:553)
    2. java.util.LinkedList.get(LinkedList.java:474)
    2 frames
  3. p364ioobe
    IOOBETest.main
    1. p364ioobe.IOOBE.forceIndexOutOfBoundsException(IOOBE.java:14)
    2. p364ioobe.IOOBETest.main(IOOBETest.java:7)
    2 frames