Reputation: 767
I've build a RESTFul Service with Play 2.4 Scala2.11, now I want to deploy this to IBM Bluemix.
play2-war-plugin was used to package the project to a war package since Bluemix use Liberty as container.
But when I push the war package to Bluemix, I got error logs:
[ERROR ] SRVE0918E: The attempted blocking write is not allowed because the non-blocking I/O has already been started by the application registering the WriteListener [play.core.server.servlet31.Play2Servlet31RequestHandler$ResultWriteListener@d2487ee8].
I want to knwo:
Upvotes: 0
Views: 421
Reputation: 123
Just for people (like me) coming to this page now. Alex de Silva's answer works great but needs some update:
play
or activator
use sbt
The sbt dist
or sbt stage
command are described here. If you use play
it won't work at all & in the case of activator
--which is outdated--it will fail with some "can't find dependency" errors. Make sure you have latest version of sbt
installed.sbt-native-packager
plugin set up properly in your sbt build.Upvotes: 2
Reputation: 4590
You don't need to package your Play Framework application in a war file in order to deploy it to Bluemix.
Simply build your application using play dist
or activator dist
and then use the java_buildpack
to deploy it. For example:
$ cf push play-application -p target/universal/play-application-1.0-SNAPSHOT.zip -b java_buildpack
You can see Java buildpack documentation for Play Framework here:
https://github.com/cloudfoundry/java-buildpack/blob/master/docs/example-play_framework.md
Upvotes: 2