早教吧作业答案频道 -->其他-->
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...的网友还看了以下:
关于J.TESTE-F的记述题部分,以及J.TEST的单项最低得分标准1:这么说吧,如果标准答案是 2020-04-06 …
开发环境:Struts1.x+Hibernate3.x+SpringTomcat5.5页面报错(表 2020-05-17 …
在java中,下面选项中关于java.lang.Object类的说法错误的是()在java中,下面 2020-05-24 …
JAVA练习题求解下列语句序列执行后,k的值是.inti=10,j=18,k=30;switch( 2020-06-14 …
英语翻译typeExceptionreportmessagedescriptionTheserve 2020-06-14 …
java发送邮件时遇到异常:java.lang.SecurityException:Accesst 2020-06-15 …
HTTPStatus500-怎么解决?typeExceptionreportmessagedesc 2020-07-17 …
“不禁”一词中“禁”该读“jīn(一声)”还是“jǐn”?错了,“jǐn”应该是四声 2020-07-24 …
英语翻译typeExceptionreportmessagedescriptionTheserve 2020-07-26 …
java.lang.IllegalArgumentException:Yearconstructo 2020-07-27 …