playframework / playframework/play-ebean

Build production failing if I have application.properties configuration

Open
#212 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
111
Forks
67
Avg merge
1d 11h
Merged PRs (30d)
19

Description

I don't have this issue with another plugin: https://github.com/payintech/play-ebean and it is working fine, except that plugin got an issue (https://github.com/payintech/play-ebean/issues/15) that making me try this one and this not working as well with different kind of issues.

I got the following application.properties inside conf folder:

#https://github.com/ebean-orm/ebean/blob/master/CONFIGURATION.md
ebean.default.databasePlatformName=sqlserver17
ebean.default.idType=IDENTITY
ebean.default.allQuotedIdentifiers=true

When I try to do production build I get the following issue:

[info] Done compiling.
[error] java.lang.RuntimeException: com.typesafe.config.ConfigException$WrongType: application.properties @ file:/app/conf/application.properties: default has type OBJECT rather than LIST
[error] 	at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:163)
[error] 	at com.typesafe.config.impl.SimpleConfig.findOrNull(SimpleConfig.java:174)
[error] 	at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:188)
[error] 	at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:193)
[error] 	at com.typesafe.config.impl.SimpleConfig.getList(SimpleConfig.java:262)
[error] 	at com.typesafe.config.impl.SimpleConfig.getHomogeneousUnwrappedList(SimpleConfig.java:348)
[error] 	at com.typesafe.config.impl.SimpleConfig.getStringList(SimpleConfig.java:406)
[error] 	at play.db.ebean.EbeanParsedConfig.lambda$parseFromConfig$0(EbeanParsedConfig.java:58)
[error] 	at java.base/java.util.Map.forEach(Map.java:661)
[error] 	at play.db.ebean.EbeanParsedConfig.parseFromConfig(EbeanParsedConfig.java:52)
[error] 	at play.db.ebean.ModelsConfigLoader.apply(ModelsConfigLoader.java:29)
[error] 	at play.db.ebean.ModelsConfigLoader.apply(ModelsConfigLoader.java:22)
[error] 	at play.ebean.sbt.PlayEbean$.$anonfun$configuredEbeanModels$4(PlayEbean.scala:149)
[error] 	at play.ebean.sbt.PlayEbean$.withClassLoader$1(PlayEbean.scala:126)
[error] 	at play.ebean.sbt.PlayEbean$.$anonfun$configuredEbeanModels$1(PlayEbean.scala:146)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] 	at sbt.std.Transform$$anon$4.work(Transform.scala:67)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:281)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)
[error] 	at sbt.Execute.work(Execute.scala:290)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:281)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] 	at java.base/java.lang.Thread.run(Thread.java:834)
[error] (Compile / playEbeanModels) com.typesafe.config.ConfigException$WrongType: application.properties @ file:/app/conf/application.properties: default has type OBJECT rather than LIST
[error] Total time: 43 s, completed Feb 17, 2021, 10:09:04 AM
The command '/bin/sh -c sbt clean update compile dist' returned a non-zero code: 1

What exactly this problem, it is not saying what exactly the broken config key that expecting LIST!

I'm using version 6.0.0:

// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.7")
addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "6.0.0")

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the stack-trace entry points EbeanParsedConfig.java at line 58, ModelsConfigLoader.java, and PlayEbean.scala. Reproduce the failure with sbt clean update compile dist using the application.properties shown. Done means identifying which configuration key is read as a list and making the production build complete successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, scala
Domain
build-system, database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.