Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inner flow was completed without producing result elements for 1 outstanding elements

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

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

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)
}

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:
like image 405
Knows Not Much Avatar asked Oct 27 '19 20:10

Knows Not Much


1 Answers

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=******

Should be written as

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

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

like image 69
Knows Not Much Avatar answered Oct 20 '22 01:10

Knows Not Much