質問編集履歴
6
内容調整
test
CHANGED
File without changes
|
test
CHANGED
@@ -237,3 +237,111 @@
|
|
237
237
|
at play.api.db.DefaultDatabase.getConnection(Databases.scala:142)
|
238
238
|
|
239
239
|
```
|
240
|
+
|
241
|
+
●application.conf(2018.01.21)
|
242
|
+
|
243
|
+
```
|
244
|
+
|
245
|
+
akka {
|
246
|
+
|
247
|
+
}
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
play.crypto.secret = "changeme"
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
play.modules {
|
258
|
+
|
259
|
+
enables += "play.api.db.DBModule"
|
260
|
+
|
261
|
+
enables += "play.api.db.HikariCPModule"
|
262
|
+
|
263
|
+
}
|
264
|
+
|
265
|
+
fixedConnectionPool=2
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
play.i18n {
|
270
|
+
|
271
|
+
langs = [ "en" ]
|
272
|
+
|
273
|
+
}
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
play.evolutions {
|
278
|
+
|
279
|
+
db.default.enabled = false
|
280
|
+
|
281
|
+
}
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
play.db {
|
286
|
+
|
287
|
+
prototype {
|
288
|
+
|
289
|
+
# Sets a fixed JDBC connection pool size of 50
|
290
|
+
|
291
|
+
#hikaricp.minimumIdle = 50
|
292
|
+
|
293
|
+
#hikaricp.maximumPoolSize = 50
|
294
|
+
|
295
|
+
}
|
296
|
+
|
297
|
+
}
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
db {
|
302
|
+
|
303
|
+
default.driver=com.mysql.jdbc.Driver
|
304
|
+
|
305
|
+
default.username=root
|
306
|
+
|
307
|
+
default.password="nfgwe4706"
|
308
|
+
|
309
|
+
default.jdbcUrl="jdbc:mysql://localhost:3306/sample_db"
|
310
|
+
|
311
|
+
}
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
db.default.hikaricp.driverClassName=com.mysql.cp.jdbc.Driver
|
316
|
+
|
317
|
+
db.default.hikaricp.username=root
|
318
|
+
|
319
|
+
db.default.hikaricp.password="nfgwe4706"
|
320
|
+
|
321
|
+
db.default.hikaricp.jdbcUrl="jdbc:mysql://localhost:3306/sample_db"
|
322
|
+
|
323
|
+
db.default.hikaricp.minimumIdle=${fixedConnectionPool}
|
324
|
+
|
325
|
+
db.default.hikaricp.maximumPoolSize=${fixedConnectionPool}
|
326
|
+
|
327
|
+
ebean.default=["model.*"]
|
328
|
+
|
329
|
+
"assets.cache./public/stylesheets/bootstrap.min.css"="max-age=3600"
|
330
|
+
|
331
|
+
database.dispatcher{
|
332
|
+
|
333
|
+
type=Dispatcher
|
334
|
+
|
335
|
+
executor="thread-pool-executor"
|
336
|
+
|
337
|
+
throughput=1
|
338
|
+
|
339
|
+
thread-pool-executor{
|
340
|
+
|
341
|
+
fixed-pool-size = ${fixedConnectionPool}
|
342
|
+
|
343
|
+
}
|
344
|
+
|
345
|
+
}
|
346
|
+
|
347
|
+
```
|
5
内容調整
test
CHANGED
File without changes
|
test
CHANGED
@@ -165,3 +165,75 @@
|
|
165
165
|
at play.api.db.DefaultDatabase.getConnection(Databases.scala:142)
|
166
166
|
|
167
167
|
```
|
168
|
+
|
169
|
+
●エラー内容2
|
170
|
+
|
171
|
+
```
|
172
|
+
|
173
|
+
play.api.Configuration$$anon$1: Configuration error[Cannot connect to database [default]]
|
174
|
+
|
175
|
+
at play.api.Configuration$.configError(Configuration.scala:154)
|
176
|
+
|
177
|
+
at play.api.Configuration.reportError(Configuration.scala:806)
|
178
|
+
|
179
|
+
at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:48)
|
180
|
+
|
181
|
+
at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:42)
|
182
|
+
|
183
|
+
at scala.collection.immutable.List.foreach(List.scala:381)
|
184
|
+
|
185
|
+
at play.api.db.DefaultDBApi.connect(DefaultDBApi.scala:42)
|
186
|
+
|
187
|
+
at play.api.db.DBApiProvider.get$lzycompute(DBModule.scala:72)
|
188
|
+
|
189
|
+
at play.api.db.DBApiProvider.get(DBModule.scala:62)
|
190
|
+
|
191
|
+
at play.api.db.DBApiProvider.get(DBModule.scala:58)
|
192
|
+
|
193
|
+
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
|
194
|
+
|
195
|
+
Caused by: play.api.Configuration$$anon$1: Configuration error[jdbcUrl is required with driverClassName.]
|
196
|
+
|
197
|
+
at play.api.Configuration$.configError(Configuration.scala:154)
|
198
|
+
|
199
|
+
at play.api.PlayConfig.reportError(Configuration.scala:996)
|
200
|
+
|
201
|
+
at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:70)
|
202
|
+
|
203
|
+
at play.api.db.PooledDatabase.createDataSource(Databases.scala:199)
|
204
|
+
|
205
|
+
at play.api.db.DefaultDatabase.dataSource$lzycompute(Databases.scala:123)
|
206
|
+
|
207
|
+
at play.api.db.DefaultDatabase.dataSource(Databases.scala:121)
|
208
|
+
|
209
|
+
at play.api.db.DefaultDatabase.getConnection(Databases.scala:142)
|
210
|
+
|
211
|
+
at play.api.db.DefaultDatabase.getConnection(Databases.scala:138)
|
212
|
+
|
213
|
+
at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:44)
|
214
|
+
|
215
|
+
at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:42)
|
216
|
+
|
217
|
+
Caused by: java.lang.IllegalArgumentException: jdbcUrl is required with driverClassName.
|
218
|
+
|
219
|
+
at com.zaxxer.hikari.HikariConfig.validate(HikariConfig.java:893)
|
220
|
+
|
221
|
+
at play.api.db.HikariCPConfig.toHikariConfig(HikariCPModule.scala:141)
|
222
|
+
|
223
|
+
at play.api.db.HikariCPConnectionPool$$anonfun$1.apply(HikariCPModule.scala:57)
|
224
|
+
|
225
|
+
at play.api.db.HikariCPConnectionPool$$anonfun$1.apply(HikariCPModule.scala:54)
|
226
|
+
|
227
|
+
at scala.util.Try$.apply(Try.scala:192)
|
228
|
+
|
229
|
+
at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:54)
|
230
|
+
|
231
|
+
at play.api.db.PooledDatabase.createDataSource(Databases.scala:199)
|
232
|
+
|
233
|
+
at play.api.db.DefaultDatabase.dataSource$lzycompute(Databases.scala:123)
|
234
|
+
|
235
|
+
at play.api.db.DefaultDatabase.dataSource(Databases.scala:121)
|
236
|
+
|
237
|
+
at play.api.db.DefaultDatabase.getConnection(Databases.scala:142)
|
238
|
+
|
239
|
+
```
|
4
内容調整
test
CHANGED
File without changes
|
test
CHANGED
@@ -25,6 +25,14 @@
|
|
25
25
|
で記入したが駄目。
|
26
26
|
|
27
27
|
|
28
|
+
|
29
|
+
●$activator libraryDependencies
|
30
|
+
|
31
|
+
```
|
32
|
+
|
33
|
+
[info] List(org.scala-lang:scala-library:2.11.7, com.typesafe.play:play-enhancer:1.1.0, com.typesafe.play:twirl-api:1.1.1, com.typesafe.play:play-ebean:3.0.2, com.typesafe.play:play-server:2.5.10, com.typesafe.play:play-test:2.5.10:test, com.typesafe.play:play-omnidoc:2.5.10:docs, com.typesafe.play:play-java:2.5.10, com.typesafe.play:play-netty-server:2.5.10, com.typesafe.play:play-logback:2.5.10, com.typesafe.play:play-java-jdbc:2.5.10, com.typesafe.play:play-cache:2.5.10, com.typesafe.play:play-java-ws:2.5.10, mysql:mysql-connector-java:5.1.36, mysql:mysql-connector-java:5.1.36)
|
34
|
+
|
35
|
+
```
|
28
36
|
|
29
37
|
●build.sbt
|
30
38
|
|
3
内容調整
test
CHANGED
File without changes
|
test
CHANGED
@@ -15,6 +15,14 @@
|
|
15
15
|
宜しくお願い致します。
|
16
16
|
|
17
17
|
本当に困ってます。助けて下さい。
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
試したこと
|
22
|
+
|
23
|
+
default.driverClassName = com.mysql.jdbc.Driver
|
24
|
+
|
25
|
+
で記入したが駄目。
|
18
26
|
|
19
27
|
|
20
28
|
|
2
内容調整
test
CHANGED
File without changes
|
test
CHANGED
@@ -42,17 +42,21 @@
|
|
42
42
|
|
43
43
|
play.db{
|
44
44
|
|
45
|
-
|
45
|
+
(中略)
|
46
46
|
|
47
47
|
config="db"
|
48
48
|
|
49
49
|
default="default"
|
50
50
|
|
51
|
-
|
51
|
+
(中略)
|
52
52
|
|
53
53
|
}
|
54
54
|
|
55
|
+
|
56
|
+
|
55
57
|
db{
|
58
|
+
|
59
|
+
(中略)
|
56
60
|
|
57
61
|
default.driver = com.mysql.jdbc.Driver
|
58
62
|
|
@@ -67,6 +71,8 @@
|
|
67
71
|
default.port = "3306"
|
68
72
|
|
69
73
|
default.jdbcUrl = "jdbc:mysql://localhost/sample_db"
|
74
|
+
|
75
|
+
(中略)
|
70
76
|
|
71
77
|
}
|
72
78
|
|
1
内容調整
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,7 +28,9 @@
|
|
28
28
|
|
29
29
|
cache,
|
30
30
|
|
31
|
+
javaWs,
|
32
|
+
|
31
|
-
|
33
|
+
"mysql" % "mysql-connector-java" % "5.1.36"
|
32
34
|
|
33
35
|
)
|
34
36
|
|