根据下面的示例,我尝试从配置中获取列表:
然而,我得到了以下异常:
Exception in thread "main" com.typesafe.config.ConfigException$WrongType: application.properties @ file:/xxx/application.properties: configYYY has type STRING rather than LIST
at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:159)
我需要在我的typesafe配置中包含一些属性文件,比如
include ${user.HOME}"/.app/db-test.conf"
但是,解析器会抱怨:
com.typesafe.config.ConfigException$Parse: dev/application.conf: 47: include keyword is not followed by a quoted string, but by: '${'user.HOME'}'
com.typesafe.config.ConfigException$Parse: dev/ap
我正在从typesafe配置中设置一个光滑的数据库对象,如下所示:
import com.typesafe.config.Config
class DatabaseService(configKey: String, config: Config) {
val driver = slick.driver.MySQLDriver
import driver.api._
val db = Database.forConfig(configKey, config)
}
config对象告诉Slick使用HikariCP,如下所示:
db {
numThreads = 5
con
我正在为我的Play/Scala/Akka应用程序手动构建类路径,这样我就可以在CI管道的不同阶段使用ScalaTest运行程序来测试我的应用程序,而不需要重新编译。但是,我得到以下错误:
java.lang.NullPointerException:
at com.typesafe.config.impl.Parseable$ParseableResources.rawParseValue(Parseable.java:509)
at com.typesafe.config.impl.Parseable$ParseableResources.rawParseValue(Parseab
我一直试图使用type parse配置来解析来自web服务的数组结构JSON响应,并得到了一个异常,即config在文件根目录中有类型列表而不是对象:
com.typesafe.config.ConfigException$WrongType: Reader: 1: has type LIST rather than object at file root
at com.typesafe.config.impl.Parseable.forceParsedToObject(Parseable.java:136)
at com.typesafe.config.impl.Parseable.par
我正在尝试运行Scala Play应用程序,并得到了以下例外:
Caused by: com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'memo'
at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:152) ~[config-1.3.1.jar:na]
at com.typesafe.config.impl.SimpleConfig.findOrNull(Simpl
我正在为使用SimpleConfig的Scala应用程序构建一个本地映像。
当我运行本机映像时,会收到以下错误消息:
> ./myapp
Exception in thread "main" com.typesafe.config.ConfigException$Missing: system properties: No configuration setting found for key 'eqwalizer'
at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfi
我有一个使用Maven构建的Java应用程序的可运行jar文件。
当我尝试运行jar文件的java -jar myApp.jar`时,我得到以下异常:-
Exception in thread "main" com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'controller'
at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:15
我正在使用sbt组装插件来构建我的play应用程序的二进制发行版。但每次我想要启动appp时,我都会得到以下错误
com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'play.application'
at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:152)
at com.typesafe.config.impl.SimpleConfig.findK
我无法处理我的Play 2.6应用的测试配置。我有一个规范,签名如下:
class ChannelsComponentSpec extends PlaySpec with ServicesSpec with GuiceOneAppPerSuite {
val environment = app.environment.asJava
val servicesModule: ServicesModule = app.injector.instanceOf[ServicesModule]
我的测试因缺少基本替换而中止:
[info] com.typesafe.config.Config
我想在我的磨坊项目中运行evicted。
使用SBT,可以在sbt-console中完成它,使用:
sbt>evicted
这将返回版本冲突警告列表:
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn] * com.typesafe:ssl-config-core_2.13:0.3.8 is selected over 0.4.0
[warn] +- com.typesafe.play:play-ws-sta
我通常使用Pyspark,但我必须处理用Scala编写的星火流作业。我是运行火花-提交的EMR直接,它的工作,但运行相同的通过气流抛出以下错误。我甚至不想从哪里开始调试这个问题。任何想法都将不胜感激。
org.apache.spark.SparkException: Exception thrown in awaitResult:
at org.apache.spark.util.ThreadUtils$.awaitResult(ThreadUtils.scala:226)
at org.apache.spark.deploy.yarn.ApplicationMaster.r
在application.conf ( Play 2.0.4,SBT0.11.3)中,我可以使用以下替换:
app {
major = 0
minor = 1
revision = 62
date = 0127
version = ${app.major}.${app.minor}.${app.revision}.${app.date}
}
升级到2.1.0和SBT0.12.2并使用此进行Build.scala,
val conf = ConfigFactory.parseFile(new File("conf/application.conf"))
我做p
我在我的一个项目中使用了scala、spray和akka。在Intellij中,它运行得很好。当我构建项目并试图在命令行中运行它时,我得到了以下错误。
Caused by: com.typesafe.config.ConfigException$Missing: No configuration setting
found for key 'akka'
at com.typesafe.config.impl.SimpleConfig.findKey(SimpleConfig.java:124)
at com.typesafe.config.im
我的play-akka应用程序遇到了一些问题,我正在尝试使用Kamon.io进行监控。我在告诉我没有使用kamon.start()时遇到了问题,在运行时自动启动序列(“-dkamon.auto- := =true”)中找到了绕过javaOptions的方法后,我现在发现我的application.conf文件出现了一个资源未找到错误。
当我不运行aspectjweaver时,kamon抛出一个不同的错误,但我的应用程序可以工作。这是我得到的错误,如果有人能帮上忙的话,这会对我有很大的帮助!谢谢你们!
[info] Running Play application with Aspectj W
我正在开发一个使用Akka和Akka-http的简单服务器。
当我在IntelliJ中运行应用程序时,我总是在标准输出中得到以下错误信息:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
我在build.grad
我正在使用ficus和类型安全配置来管理配置。
我想在这个项目中使用Intellij的scala工作表,但当我尝试以下代码时:
import what.ever.ApplicationSetting
ApplicationSetting.aws.accessKey
然而,我得到了以下错误:
java.lang.ExceptionInInitializerError
at some.thing.A$A11$A$A11.get$$instance$$res0(testRes.sc:3)
at #worksheet#.#worksheet#(testRes.sc:11)
Cause
我正在尝试运行一个akka流应用程序,但我得到了一个例外:
No configuration setting found for key 'akka.stream'
相关的代码片段是:
ConfigFactory.load()
implicit val system = ActorSystem("svc")
implicit val mat = ActorMaterializer()
我尝试这两个命令行:
java -jar ./myService.jar -Dconfig.resource=/opt/myservice/conf/application.con