質問編集履歴
2
説明の詳細の追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
pStmt.setString(3,tex.getText());
|
10
10
|
```
|
11
11
|
このようなコンソールのエラーを見て、この上のsetDateのjava.slq.Dateのキャストに問題があると思うのですが、どうすれば解決するでしょうか?
|
12
|
-
どうぞよろしくお願いします。
|
12
|
+
どうぞよろしくお願いします。(java.sql.Date)は、コンパイルエラーだったため、選択しました。
|
13
13
|
```java
|
14
14
|
java.lang.ClassCastException: java.util.Date cannot be cast to java.sql.Date
|
15
15
|
at dao.MutterDAO.comment(MutterDAO.java:33)
|
1
コードの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -17,4 +17,21 @@
|
|
17
17
|
at servlet.Comment.doPost(Comment.java:67)
|
18
18
|
at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
|
19
19
|
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
|
20
|
+
```
|
21
|
+
```java
|
22
|
+
HTTP Status 500 - java.util.Date cannot be cast to java.sql.Date
|
23
|
+
|
24
|
+
type Exception report
|
25
|
+
|
26
|
+
message java.util.Date cannot be cast to java.sql.Date
|
27
|
+
|
28
|
+
description The server encountered an internal error that prevented it from fulfilling this request.
|
29
|
+
|
30
|
+
exception
|
31
|
+
|
32
|
+
java.lang.ClassCastException: java.util.Date cannot be cast to java.sql.Date
|
33
|
+
dao.MutterDAO.comment(MutterDAO.java:33)
|
34
|
+
model.PostCommentLogic.execute(PostCommentLogic.java:10)
|
35
|
+
servlet.Comment.doPost(Comment.java:67)
|
36
|
+
javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
|
20
37
|
```
|