質問編集履歴

5

修正

2023/04/25 16:58

投稿

student
student

スコア58

test CHANGED
File without changes
test CHANGED
@@ -100,7 +100,7 @@
100
100
  ### 補足情報(FW/ツールのバージョンなど)
101
101
  開発ツール:Eclipse
102
102
  Javaバージョン:11
103
- データベース:postgres
103
+ データベース:postgres12
104
104
 
105
105
  書籍と自身の環境のバージョンでいうと、私は2022年版のEclipseを使用しています。
106
106
  参考書のEclipseのバージョンと違うかもしれません。

4

修正

2023/04/25 16:56

投稿

student
student

スコア58

test CHANGED
File without changes
test CHANGED
@@ -1,8 +1,7 @@
1
1
  ### 実現したいこと
2
2
  参考書の「spring framework超入門」というのを参考にクイズをデータベースに登録する
3
3
  ようにコードを書いたのですが、JavaファイルをSpring Boot アプリケーションをクリックして実行したのですが、エラーが表示されました。
4
- エラーの内容は恐らく、デバッグを有効にして欲しいという事だと思ったのですが、
4
+ エラーの内容は恐らく、デバッグを有効にして欲しいという事とJDBC関連だと思ったのですが、その対処方法は未だに分かっていません。
5
- その対処方法が分かりません。
6
5
 
7
6
 
8
7
  ### 発生している問題・エラーメッセージ

3

エラーの追記

2023/04/25 16:55

投稿

student
student

スコア58

test CHANGED
File without changes
test CHANGED
@@ -14,7 +14,22 @@
14
14
  ```
15
15
  ApplicationContextの起動にエラーが発生しました。条件評価レポートを表示するには、「デバッグ」を有効にしてアプリケーションを再実行します。
16
16
  ```
17
+ ### 新しく発覚したエラー
18
+ ```
19
+ Error creating bean with name 'quizRepository': Unsatisfied dependency expressed through method 'setDialect' parameter 0: Error creating bean with name 'jdbcDialect' defined in class path resource [org/springframework/boot/autoconfigure/data/jdbc/JdbcRepositoriesAutoConfiguration$SpringBootJdbcConfiguration.class]: Failed to instantiate [org.springframework.data.relational.core.dialect.Dialect]: Factory method 'jdbcDialect' threw exception with message: Failed to obtain JDBC Connection
20
+ ```
17
21
 
22
+ ```
23
+ Error creating bean with name 'jdbcDialect' defined in class path resource [org/springframework/boot/autoconfigure/data/jdbc/JdbcRepositoriesAutoConfiguration$SpringBootJdbcConfiguration.class]: Failed to instantiate [org.springframework.data.relational.core.dialect.Dialect]: Factory method 'jdbcDialect' threw exception with message: Failed to obtain JDBC Connection
24
+ ```
25
+
26
+ ```
27
+ Failed to instantiate [org.springframework.data.relational.core.dialect.Dialect]: Factory method 'jdbcDialect' threw exception with message: Failed to obtain JDBC Connection
28
+ ```
29
+
30
+ ```
31
+ Failed to obtain JDBC Connection
32
+ ```
18
33
  ### 実行したJavaファイル
19
34
 
20
35
  ```QuizApplication.java

2

データベースに接続する記述

2023/04/25 06:36

投稿

student
student

スコア58

test CHANGED
File without changes
test CHANGED
@@ -73,6 +73,13 @@
73
73
  }
74
74
  ```
75
75
 
76
+ ```application.properties
77
+ spring.datasource.driver-class-name=org.postgresql.Driver
78
+ spring.datasource.url=jdbc:postgresql://localhost:5432/quizdb
79
+ springdatasource.username=postgres
80
+ spring.datasource.password=postgres
81
+ ```
82
+
76
83
  ### 試したこと
77
84
  デバッグ実行をしてから再度、実行を行ったのですが同様のエラーが表示されました。
78
85
 

1

指摘された箇所の修正をしました

2023/04/25 06:09

投稿

student
student

スコア58

test CHANGED
File without changes
test CHANGED
@@ -1,7 +1,7 @@
1
1
  ### 実現したいこと
2
2
  参考書の「spring framework超入門」というのを参考にクイズをデータベースに登録する
3
3
  ようにコードを書いたのですが、JavaファイルをSpring Boot アプリケーションをクリックして実行したのですが、エラーが表示されました。
4
- エラーの内容は恐らく、デバッを有効にして欲しいという事だと思ったのですが、
4
+ エラーの内容は恐らく、デバッを有効にして欲しいという事だと思ったのですが、
5
5
  その対処方法が分かりません。
6
6
 
7
7
 
@@ -74,10 +74,13 @@
74
74
  ```
75
75
 
76
76
  ### 試したこと
77
- 調べいるのですが、こと言っ対処法がまだ見つかっていません
77
+ デバッグ実行をしから再度、実行を行ったのですが同様のエラーが表示さました。
78
78
 
79
79
  ### 補足情報(FW/ツールのバージョンなど)
80
80
  開発ツール:Eclipse
81
81
  Javaバージョン:11
82
82
  データベース:postgres
83
83
 
84
+ 書籍と自身の環境のバージョンでいうと、私は2022年版のEclipseを使用しています。
85
+ 参考書のEclipseのバージョンと違うかもしれません。
86
+