早教吧作业答案频道 -->其他-->
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...的网友还看了以下:
复合增长率的109%什么意思 2020-05-13 …
元素周期表的104至109怎么念?同题!还有为什么110111112114没有符号为什么还要放在周 2020-06-09 …
英语翻译typeExceptionreportmessagedescriptionTheserve 2020-06-14 …
廊这个字怎么读?廊,这个字怎么读?可以读作lang也可以读作kuo到底这个字怎么读呢?在什么时候读 2020-06-20 …
java反射Cannotsetjava.lang.Stringfieldssh.fts.agen2 2020-07-17 …
HTTPStatus500-怎么解决?typeExceptionreportmessagedesc 2020-07-17 …
英语翻译typeExceptionreportmessagedescriptionTheserve 2020-07-26 …
java.lang.IllegalArgumentException:Yearconstructo 2020-07-27 …
Can'tfinddependentlibraries怎么解决Exceptioninthread" 2020-08-04 …
java.lang.NoClassDefFoundError:setCausedby:java.l 2020-08-04 …