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
1,260 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
• 7,340 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
• 18,520 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,220 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,890 points
1,005 views
0 votes
2 answers
+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
3,996 views
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,065 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 24, 2018 in DevOps on Cloud by shubham
• 7,340 points
1,204 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP