How do I deploy Scala PlayFramework Project to IBM Bluemix

+2 votes

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 pushed 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 was wondering if there are some better ways to package Play project to a war package.

Can I deploy Scala based PlayFramework project to IBM Bluemix. What are the possible steps I can take to confirm whether this ERROR caused by my codes or caused by the play2-war-plugin? Anyone know how to resolve all the query.

Thanks.

Apr 4, 2018 in DevOps on Cloud by Atul
• 10,240 points
114 views

3 answers to this question.

0 votes

First of all, you don't have the need to package your Play Framework application in a war file if you want to deploy it to Bluemix.

Just 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 find Java buildpack documentation for Play Framework here:

https://github.com/cloudfoundry/java-buildpack/blob/master/docs/example-play_framework.md

I hope that this will resolve your query.

answered Apr 4, 2018 by shubham
• 6,890 points
0 votes

Follow these steps:

  1. Use a play template to create a Scala play application.
  2. Implement the REST interface using a Play controller.
  3. Deploy the application on IBM Bluemix.
  4. Access the REST interface using a browser.
answered Oct 18, 2018 by Hannah
• 14,070 points
0 votes

It seems that they are more than one application deployed in the container.
One application is the play app, using async IO, and the other app is using blocking IO.

answered Oct 18, 2018 by lina
• 8,110 points

Related Questions In DevOps on Cloud

0 votes
1 answer
0 votes
1 answer

how to safely deploy npm install without it causing inconsistencies?

The recent versions on npm generates a ...READ MORE

answered Apr 11, 2018 in DevOps on Cloud by DareDev
• 6,810 points
63 views
0 votes
2 answers
0 votes
1 answer

How to deploy compiled elements Azure Web App with Appveyor?

Add the following BeforeBuild target to Web ...READ MORE

answered Jul 12, 2018 in DevOps on Cloud by Kalgi
• 2,620 points
33 views
+5 votes
7 answers

Docker swarm vs kubernetes

Swarm is easy handling while kn8 is ...READ MORE

answered Aug 27, 2018 in Docker by Mahesh Ajmeria
1,003 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
152 views
0 votes
1 answer
0 votes
1 answer

How to manage Application version for VM's in Azure Autoscaling group

First of all, You have to launch ...READ MORE

answered Apr 23, 2018 in DevOps on Cloud by shubham
• 6,890 points
65 views