早教吧作业答案频道 -->其他-->
java.lang.IllegalArgumentException:Yearconstructor:year(109)outsidevalidrange.这个是什么错误javax.servlet.ServletException:java.lang.IllegalArgumentException:Yearconstructor:year(109)outsidevalidrange.org.apache.struts.action.Request
题目详情
java.lang.IllegalArgumentException:Year constructor:year (109) outside valid range.这个是什么错误
javax.servlet.ServletException:java.lang.IllegalArgumentException:Year constructor:year (109) outside valid range.
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)
com.kado.common.CharacterAction.process(CharacterAction.java:42)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.IllegalArgumentException:Year constructor:year (109) outside valid range.
org.jfree.data.time.Year.(Year.java:97)
org.jfree.data.time.Month.(Month.java:135)
org.jfree.data.time.Month.(Month.java:122)
org.jfree.chart.axis.DateAxis.previousStandardDate(DateAxis.java:859)
org.jfree.chart.axis.DateAxis.nextStandardDate(DateAxis.java:935)
org.jfree.chart.axis.DateAxis.calculateLowestVisibleTickValue(DateAxis.java:719)
org.jfree.chart.axis.DateAxis.refreshTicksHorizontal(DateAxis.java:1479)
org.jfree.chart.axis.DateAxis.refreshTicks(DateAxis.java:1447)
org.jfree.chart.axis.ValueAxis.reserveSpace(ValueAxis.java:751)
org.jfree.chart.plot.CategoryPlot.calculateRangeAxisSpace(CategoryPlot.java:2137)
org.jfree.chart.plot.CategoryPlot.calculateAxisSpace(CategoryPlot.java:2157)
org.jfree.chart.plot.CategoryPlot.draw(CategoryPlot.java:2200)
org.jfree.chart.JFreeChart.draw(JFreeChart.java:1058)
org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1244)
org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1223)
org.jfree.chart.ChartUtilities.writeChartAsJPEG(ChartUtilities.java:472)
javax.servlet.ServletException:java.lang.IllegalArgumentException:Year constructor:year (109) outside valid range.
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)
com.kado.common.CharacterAction.process(CharacterAction.java:42)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.IllegalArgumentException:Year constructor:year (109) outside valid range.
org.jfree.data.time.Year.(Year.java:97)
org.jfree.data.time.Month.(Month.java:135)
org.jfree.data.time.Month.(Month.java:122)
org.jfree.chart.axis.DateAxis.previousStandardDate(DateAxis.java:859)
org.jfree.chart.axis.DateAxis.nextStandardDate(DateAxis.java:935)
org.jfree.chart.axis.DateAxis.calculateLowestVisibleTickValue(DateAxis.java:719)
org.jfree.chart.axis.DateAxis.refreshTicksHorizontal(DateAxis.java:1479)
org.jfree.chart.axis.DateAxis.refreshTicks(DateAxis.java:1447)
org.jfree.chart.axis.ValueAxis.reserveSpace(ValueAxis.java:751)
org.jfree.chart.plot.CategoryPlot.calculateRangeAxisSpace(CategoryPlot.java:2137)
org.jfree.chart.plot.CategoryPlot.calculateAxisSpace(CategoryPlot.java:2157)
org.jfree.chart.plot.CategoryPlot.draw(CategoryPlot.java:2200)
org.jfree.chart.JFreeChart.draw(JFreeChart.java:1058)
org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1244)
org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1223)
org.jfree.chart.ChartUtilities.writeChartAsJPEG(ChartUtilities.java:472)
▼优质解答
答案和解析
publicYear(intyear) {
101:if ((year < SerialDate.MINIMUM_YEAR_SUPPORTED)
102:|| (year > SerialDate.MAXIMUM_YEAR_SUPPORTED)) {
103:
104:thrownewIllegalArgumentException(
105:"Year constructor:year (" + year + ") outside valid range.");
106:}
107:this.year = (short) year;
108:peg(Calendar.getInstance());
109:}
以上是jfree的Year类的源代码,很清楚了 你在构造year对象时,传入的值(109)不在范围之内
类org.jfree.date.SerialDate中定义的范围为:
103:/** The lowest year value supported by this date format.*/
104:public static final int MINIMUM_YEAR_SUPPORTED = 1900;
105:
106:/** The highest year value supported by this date format.*/
107:public static final int MAXIMUM_YEAR_SUPPORTED = 9999;
101:if ((year < SerialDate.MINIMUM_YEAR_SUPPORTED)
102:|| (year > SerialDate.MAXIMUM_YEAR_SUPPORTED)) {
103:
104:thrownewIllegalArgumentException(
105:"Year constructor:year (" + year + ") outside valid range.");
106:}
107:this.year = (short) year;
108:peg(Calendar.getInstance());
109:}
以上是jfree的Year类的源代码,很清楚了 你在构造year对象时,传入的值(109)不在范围之内
类org.jfree.date.SerialDate中定义的范围为:
103:/** The lowest year value supported by this date format.*/
104:public static final int MINIMUM_YEAR_SUPPORTED = 1900;
105:
106:/** The highest year value supported by this date format.*/
107:public static final int MAXIMUM_YEAR_SUPPORTED = 9999;
看了 java.lang.Ille...的网友还看了以下:
编号为1,2,3,4,5的5人入座编号也为1,2,3,4,5的5个座位,至多有两人对号入座的不同坐 2020-05-12 …
心理学错觉关于错觉的说法正确的是()A错觉是对客观事物不正确的感觉B错觉产生的原因是由于个人心理的 2020-05-12 …
英语达人请进判断下面的英语句子语法对错1.Let'sgoshopping,shallwe?A.错误 2020-05-13 …
英语达人帮帮忙判断下面的句子的语法对错1.Hefindsitdifficultytogetonwe 2020-05-14 …
餐桌边的一蔬一饭,舌尖上的一饮一啄,来之不易,舌尖上的浪费让人触目惊心,据统计,中国每年浪费的食物 2020-06-26 …
A+B=35,B+C=79,A+C=109问,A,B,C各是多少? 2020-07-17 …
餐桌边的一蔬一饭,舌尖上的一饮一酌,实属来之不易.舌尖上的浪费让人触目惊心,据统计,中国每年浪费食 2020-07-22 …
新亚欧大陆桥东起太平洋西岸中国连云港,西达大西洋东岸荷兰鹿特丹等港口,横贯亚欧两大洲中部地带,总长约 2020-11-12 …
十届人大三次会议温总理在政府工作报告中指出,今年中央财政将安排1090000万元解决下岗工人的再就业 2020-11-21 …
某市是我国优秀旅游城市,吸引了众多的海内外游客,据统计显示,该市全年旅游总收入达128.06亿元,将 2021-02-02 …