質問編集履歴

1

エラーメッセージの編集

2021/10/12 09:05

投稿

retantaro
retantaro

スコア15

test CHANGED
File without changes
test CHANGED
@@ -16,7 +16,95 @@
16
16
 
17
17
  ```
18
18
 
19
- PrefectureResult.jspの <p><%= preList.getName() %></p>の部分で例外発生と出てしまいます。
19
+ PrefectureData preList = (PrefectureData) request.getAttribute("preList");
20
+
21
+
22
+
23
+ List<PrefectureData> preList = (List<PrefectureData>) request.getAttribute("preList");
24
+
25
+ に修正した結果が以下のエラーです。
26
+
27
+
28
+
29
+
30
+
31
+ タイプ 例外報告
32
+
33
+
34
+
35
+ メッセージ java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
36
+
37
+
38
+
39
+ 説明 サーバーは予期しない条件に遭遇しました。それはリクエストの実行を妨げます。
40
+
41
+
42
+
43
+ 例外
44
+
45
+
46
+
47
+ org.apache.jasper.JasperException: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
48
+
49
+ org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:582)
50
+
51
+ org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:498)
52
+
53
+ org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:383)
54
+
55
+ org.apache.jasper.servlet.JspServlet.service(JspServlet.java:331)
56
+
57
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
58
+
59
+ org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
60
+
61
+ servlet.PrefectureSrv.doPost(PrefectureSrv.java:73)
62
+
63
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:681)
64
+
65
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
66
+
67
+ org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
68
+
69
+ 根本原因
70
+
71
+
72
+
73
+ java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
74
+
75
+ java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
76
+
77
+ java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
78
+
79
+ java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
80
+
81
+ java.base/java.util.Objects.checkIndex(Objects.java:372)
82
+
83
+ java.base/java.util.ArrayList.get(ArrayList.java:458)
84
+
85
+ org.apache.jsp.WEB_002dINF.jsp.PrefectureResult_jsp._jspService(PrefectureResult_jsp.java:136)
86
+
87
+ org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
88
+
89
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
90
+
91
+ org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:465)
92
+
93
+ org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:383)
94
+
95
+ org.apache.jasper.servlet.JspServlet.service(JspServlet.java:331)
96
+
97
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
98
+
99
+ org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
100
+
101
+ servlet.PrefectureSrv.doPost(PrefectureSrv.java:73)
102
+
103
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:681)
104
+
105
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
106
+
107
+ org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
20
108
 
21
109
  ```
22
110