1个优秀元素未产生结果元素就完成了内部流程 [英] Inner flow was completed without producing result elements for 1 outstanding elements

查看:54
本文介绍了1个优秀元素未产生结果元素就完成了内部流程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个有效的播放框架应用程序.我试图在应用程序上启用数据库进化支持.我通过添加以下设置更改了 application.conf 文件

I had a working play framework application. I tried to enable Database evolution support on the application. I changed the application.conf file by adding following settings

db.default.driver=org.postgresql.Driver
db.default.url="jdbc:postgresql://localhost:5432/scaladb"
db.default.username=scalauser
db.default.password=******
db.default.poolInitialSize=1
db.default.poolMaxSize=5
db.default.ConnectionTimeoutMillis=1000
play.evolutions.autoApply=true

数据库存在,我可以使用像 sql -U scalauser -d scaladb

The database exists and I can connect to it using command like sql -U scalauser -d scaladb

我在 AppLoader 类中添加了以下几行以设置数据库并运行迁移

I added the following lines to my AppLoader class to setup the database and run migrations

val onStart = {
  applicationEvolutions
  DBs.setupAll()
}

applicationLifecycle.addStopHook{() => 
  DBs.closeAll()
  Future.successful(Unit)
}

但是现在当我通过 set run 运行我的应用程序时,我收到了这个神秘的错误消息,实际上没有任何意义.我什至不确定这是框架试图告诉我的

but now when I run my application by set run I get this mysterious error message which actually means nothing. I'm not even sure that is the framework trying to tell me

akka.http.impl.util.One2OneBidiFlow$OutputTruncationException: Inner flow was completed without producing result elements for 1 outstanding elements
at akka.http.impl.util.One2OneBidiFlow$OutputTruncationException$.apply(One2OneBidiFlow.scala:22)
at akka.http.impl.util.One2OneBidiFlow$OutputTruncationException$.apply(One2OneBidiFlow.scala:22)
at akka.http.impl.util.One2OneBidiFlow$One2OneBidi$$anon$1$$anon$4.onUpstreamFinish(One2OneBidiFlow.scala:97)
at akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:504)
at akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:378)
at akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:588)
at akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphInterpreter.scala:472)
at akka.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:563)
at akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:

推荐答案

好的.我想到了.问题是配置文件格式错误.线条

OK. I figured it out. the problem is that the config file is malformed. The lines

db.default.driver=org.postgresql.Driver
db.default.username=scalauser
db.default.password=******

应该写成

db.default.driver="org.postgresql.Driver"
db.default.username="scalauser"
db.default.password="password"

但有趣的是,与其说应用程序 conf 文件丢失了 ",播放框架抛出了一个非常神秘的错误消息.

But it's funny that rather than say that the application conf file has missing " play framework throws a very cryptic error message.

这篇关于1个优秀元素未产生结果元素就完成了内部流程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆