HTTP Status 500 - java.lang.IndexOutOfBoundsException: Index: 0, Size: 0


type Exception report

message java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)
	org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433)
	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	cn.yngt.unils.CheckLoginFilter.doFilter(CheckLoginFilter.java:51)
	cn.yngt.unils.EncodingFilter.doFilter(EncodingFilter.java:22)

root cause

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	java.util.ArrayList.rangeCheck(Unknown Source)
	java.util.ArrayList.get(Unknown Source)
	cn.yngt.daoImpl.NewsImpl.getById(NewsImpl.java:136)
	cn.yngt.serviceImpl.NewsServiceImpl.getById(NewsServiceImpl.java:82)
	cn.yngt.action.PageAction.execute(PageAction.java:346)
	org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	cn.yngt.unils.CheckLoginFilter.doFilter(CheckLoginFilter.java:51)
	cn.yngt.unils.EncodingFilter.doFilter(EncodingFilter.java:22)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.53 logs.


Apache Tomcat/7.0.53