首页 文章

com.typesafe.config.ConfigException $ Missing:找不到键'play'的配置设置

提问于
浏览
6

我在一个sbt项目中工作,我正在使用库play-ws .
但我的应用程序不播放框架 .

所以,当我运行mi Job时,我有这个错误:

com.typesafe.config.ConfigException $ Missing:找不到键'play'的配置设置com.typesafe.config.ConfigException $ Missing:找不到com.typesafe.config.impl.SimpleConfig中键'play'的配置设置 . com.typesafe.com的com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:145)的com.typesafe com.types上的com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:159)的findKey(SimpleConfig.java:124) .config.impl.SimpleConfig.find(SimpleConfig.java:164)at com.typesafe.config.impl.SimpleConfig.getObject(SimpleConfig.java:218)at com.typesafe.config.impl.SimpleConfig.getConfig(SimpleConfig.java) :224)at com.typesafe.config.impl.SimpleConfig.getConfig(SimpleConfig.java:33)at play.core.Invoker $$ anon $ 1.play $ core $ Invoker $$ anon $$ loadActorConfig(Invoker.scala:35) )在play.core.Invoker $$ anon $ 1 $$ anonfun $ 3.apply(Invoker.scala:23)at play.core.Invoker $$ anon $ 1 $$ anonfun $ 3.apply(Invoker.scala:21)at scala . play.getOrElse(Option.scala:120)at play.core.Invoker $$ anon $ 1.create(Invoker.scala:21)at at play.core.ClosableLazy.get(ClosableLazy.scala:51)at play.core.Invoker $ .system(Invoker.scala:40)at play.core.Invoker $ .executionContext(Invoker.scala:41)at play.api play.api.libs.concurrent.Execution $ Implicits $ .defaultContext(Execution.scala:12)at play.api.libs.ws.ning.NingWSRequest .libs.concurrent.Execution $ .defaultContext(Execution.scala:15) $$ anon $ 2.onBodyPartReceived(NingWS.scala:322)在com.ning的com.ning.http.client.providers.netty.NettyAsyncHttpProvider.updateBodyAndInterrupt(NettyAsyncHttpProvider.java:1568)中找不到关键字“play”的配置设置 . http.client.providers.netty.NettyAsyncHttpProvider.access $ 2900(NettyAsyncHttpProvider.java:161)com.ning.http.client.providers.netty.NettyAsyncHttpProvider $ HttpProtocol.handle(NettyAsyncHttpProvider.java:2233)at com.ning.http .client.providers.netty.NettyAsyncHttpProvider.messageReceived(NettyAsyncHttpProvider.java:1227)org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChunkedWriteHandler.java:142)a在org.jboss.netty.handler的org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:459)的org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) .codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:536)org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435)org.jboss.netty.handler.codec.http .httpClientCodec.handleUpstream(HttpClientCodec.java:92)org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)at at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)位于org.jboss的org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) . netm.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)位于org.jboss.netty.channel的org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) . socket.nio.Ni oWorker.run(NioWorker.java:178)java.lang上的java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:615) .Thread.run(Thread.java:724)

(我使用sby程序集制作jar并在spark job-server中执行作业)我不在我的工作中使用文件配置(application.conf,reference.conf等) .

请帮我 .

1 回答

  • 9

    我不知道造成这个问题的原因 .

    以下修正了它:

    val parsedConfig = ConfigFactory.parseFile(new File("src/main/resources/application.conf"))
    
    val conf = ConfigFactory.load(parsedConfig)
    

相关问题