Getting Started with Play Framework on Heroku

UPDATE: This tutorial is for Play 1.x (an old version). Check out my Play 2 Tutorial if you want to get started with the latest stuff.

Last week Heroku announced that you can now run Java apps on Heroku. Today Heroku announced that you can also easily run Play Framework apps on Heroku! Here’s a quick guide to getting started with Play! on Heroku:

  1. Install the heroku command line client on Linux, Mac, or Windows.
  2. Install git and setup your SSH key
  3. Install Play! version 1.2.3
  4. Login to Heroku from the command line:

    heroku auth:login
  5. Create a new Play! app:
    play new play_hello_world
    cd play_hello_world
  6. Run the app locally to test it:
    play run --%production
  7. Create a git repo, add the files, and commit:
    git init
    git add app conf lib public test
    git commit -m init
  8. Create a new app on Heroku:
    heroku create -s cedar
  9. Push the app to Heroku:
    git push heroku master
  10. Open the app in your browser:
    heroku open

That’s it! If you want to learn more about Heroku, check out the Heroku for Java Workbook and the Heroku Dev Center. And if you are at Dreamforce 2011 then check out Felipe Oliveira’s session on “Introducing Play! Framework: Painless Java and Scala Web Applications” on Wednesday at 3:30pm.

Let me know what you think and if you have any questions.

This entry was posted in Heroku, Play Framework. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.
  • http://sebastien-arbogast.com Sebastien Arbogast

    When I run heroku auth:login on my Mac, I get the following error:

    /usr/local/heroku/lib/heroku/client.rb:2:in `require': no such file to load — rest_client (LoadError)
    from /usr/local/heroku/lib/heroku/client.rb:2
    from /usr/local/heroku/lib/heroku.rb:6:in `require’
    from /usr/local/heroku/lib/heroku.rb:6
    from /usr/bin/heroku:19:in `require’
    from /usr/bin/heroku:19

    Any idea what that means?

    • http://www.jamesward.com James Ward

      Yeah. Looks like there is a problem with the heroku toolbelt client on Mac. As Jeff said, try to install the heroku client via the gem. Let me know if that works.

    • julien

      Any issues during the heroku install? If so, you might try re-installing the gem and if you have issues, install XCode and development tools and repeat, should be fine.

      • http://sebastien-arbogast.com Sebastien Arbogast

        It worked once I installed the heroku gem. It should be added to all the docs on heroku

    • http://www.jamesward.com James Ward

      BTW: One of the engineers let me know that they have now fixed this issue.

  • http://blog.jeffdouglas.com Jeff Douglas

    I think you need to install the heroku gem:

    gem install heroku

  • http://sebastien-arbogast.com Sebastien Arbogast

    And Play! framework is nice but how about Grails? Since I saw Rails guys using Heroku, Grails on Heroku has been a fantasy of mine. Is there something special required to make it work?

    • http://www.jamesward.com James Ward

      Any Java will run on Heroku. So Grails will certainly work. But I haven’t looked into how to do it yet. Right now you need a pom.xml file to tell Heroku that the app is Java. But from there everything is up to you.

  • Tom Borthwick

    When I run the heroku toolbelt client on Windows 7, I get this error:

    C:\dev\Heroku\\ruby\\bin\\ruby.exe: No such file or directory — C:/dev/Heroku/heroku (LoadError)

    where I installed Heroku into c:\dev. Is there a prerequisite I need to install first?

    • http://www.jamesward.com James Ward

      I’m not sure why you are getting an error. Maybe the PATH setting for Ruby is incorrect. Can you check that?

      • Tom Borthwick

        The toolbelt installer put the Heroku dir on my PATH, but nothing for ruby. I tried running setrbvars.bat in the ruby\bin folder and that added the ruby\bin folder to my PATH, but I get the same result.

        • http://www.jamesward.com James Ward

          Looks like we’ve reproduced this issue. Can you file a support ticket:
          http://support.heroku.com/

          Thanks.

    • http://www.jamesward.com James Ward

      This has been fixed. Can you try to download the toolbelt again and reinstall?

      • Tom Borthwick

        Now I get an error:

        The network path was not found.

        I don’t see any logs that might be useful.

        • http://www.jamesward.com James Ward

          That is when you run the heroku command?

          • Tom Borthwick

            Yes, I was running the heroku command, but I just tried it in a new window and the heroku command worked fine. I must have been using an old window that didn’t get some environment variables set by the toolbelt installer. Oops! Thanks for your help.

          • http://www.jamesward.com James Ward

            Awesome! I’m glad it worked!

      • http://storycatcher.info/AsAperture Aernout

        I have the same problem… Any advice on how to solve this?

        • http://www.jamesward.com James Ward

          So, Tom’s solution above didn’t solve it for you?

  • http://flurdy.com Ivar Abrahamsen

    Getting a port errors when following these steps to deploy the hello world to heroku.
    Also it seems to deploy in DEV mode?

    2011-09-08T21:37:12+00:00 heroku[web.1]: Starting process with command `play run –http.port=25117`
    2011-09-08T21:37:12+00:00 app[web.1]: Listening for transport dt_socket at address: 8000
    2011-09-08T21:37:12+00:00 app[web.1]: 21:37:12,834 INFO ~ Starting /app
    2011-09-08T21:37:12+00:00 app[web.1]: 21:37:12,877 WARN ~ You’re running Play! in DEV mode
    2011-09-08T21:37:12+00:00 heroku[web.1]: Error R11 (Bad bind) -> Process bound to port 8000, should be 25117 (see environment variable PORT)
    2011-09-08T21:37:12+00:00 heroku[web.1]: Stopping process with SIGKILL
    2011-09-08T21:37:13+00:00 heroku[web.1]: Process exited

    Presume it is an environment setting Im missing?

    • http://flurdy.com Ivar Abrahamsen

      Creating a Procfile and adding: “web: play run –http.port=$PORT $PLAY_OPTS” fixed the problem.

      • http://www.jamesward.com James Ward

        Hi Ivar,

        Thanks for giving it a try! It should have done all of that automatically for you. Are you using Play version 1.2.3?

        -James

        • http://flurdy.com Ivar Abrahamsen

          Using Play 1.2.3. Ran the same steps today, and it worked as expected. No need for a Procfile.

          —–> No Procfile found. Will use process:
          play run –http.port=$PORT $PLAY_OPTS

          Must have been connected to different play dyno version perhaps. Anyway, it works! :)

      • PaquitoSoft

        Hi there!

        I have the same R11 Error and I already have the Profile created.
        Does anyone have any idea?

        Thanks.

        • http://www.jamesward.com James Ward

          Try again. Looks like you might have done this right when there was a service disruption:
          https://status.heroku.com/

  • http://www.heyabbott.net Wayne

    Excellent article, James! I usually do everything in Ubuntu but I even got this to work on my company-issued Windoze laptop using the instructions here. Nice to know there is a cool framework alternative to Rails for us Java guys. Thanks.

    • http://www.jamesward.com James Ward

      Nice! Let me know if there is anything else I can help with.

  • Prathamesh mone

    On windows 7 machine I am trying to deploy a heroku cedar Scala application. In the article on heroku website it talks about foreman to run the app. But when I type it in command prompt I am getting error that its not installed.

    How to install foreman on windows machine.?

    • http://www.jamesward.com James Ward

      Did you install the Heroku Toolbelt? I believe it comes with foreman. But if not, it’s not a big deal since foreman isn’t required for anything. It just makes local testing a bit easier.

  • ErinM

    I’m trying to use Heroku to create a Facebook app– I installed the toolbelt but am running into lots of problems using Terminal and with Heroku in general. Is there a way to uninstall Heroku from Terminal so I can start over?

    • http://www.jamesward.com James Ward

      I think you can just drag the app from your application folder to the trash. But I’m not totally sure since I don’t use a Mac.

  • Marina Boulding, UK

    I have happily been playing Scrabble excluding US and Can with a neighbour, and suddenly for the last week I cant get in anymore, either from my facebook page or any other way: I get the message:

    Heroku / No such app
    There is no app configured at that hostname. Perhaps the app owner has renamed it or you mistyped the URL

    I am not particularly computer savvy, I was just really enjoying my Scrabble matches and want to be able to do it again – any help you can give me?

    Marina

    • http://www.jamesward.com James Ward

      Sorry Marina. You’ll have to contact the app author about that. Make sure you have the latest version installed.

  • yassinovic

    Hi James,

    I can’t create a new Play app, when when i run the command “play new
    play_hello_world” i get an error message : /usr/bin/env: python: No
    such file or directory

    can you please help me

    thanks

    • http://www.jamesward.com James Ward

      You need to have Python installed on your system for Play 1.

      • yassinovic

        Thakns James, do i need to install Python on heroku ?

        • http://www.jamesward.com James Ward

          Nope. It’s already there.

  • sarfaraz

    after running heroku in cmd.exe its disappear

    • http://www.jamesward.com James Ward

      That is odd. Can you file a support request with Heroku?

  • Amol Chavan

    I have deployed my play app on heroku. It uses heroku DB.

    I followed steps mentioned in http://www.playframework.com/documentation/2.2.x/ProductionHeroku .

    After deployment I am getting

    Application Error.

    Following is the log:

    2013-09-16T12:49:16+00:00 heroku[slug-compiler]: Slug compilation finished
    2013-09-16T12:49:25.869478+00:00 heroku[web.1]: Starting process with command `b
    in/MyfirstDemoPlay -Dhttp.port=${PORT} ${JAVA_OPTS} -DapplyEvolutions.default=tr
    ue -Ddb.default.driver=org.postgresql.Driver -Ddb.default.url=${DATABASE_URL}`
    2013-09-16T12:49:26.925988+00:00 app[web.1]: bash: bin/MyfirstDemoPlay: No such
    file or directory
    2013-09-16T12:49:29.702060+00:00 heroku[web.1]: Process exited with status 127
    2013-09-16T12:49:29.717538+00:00 heroku[web.1]: State changed from starting to crashed
    2013-09-16T12:49:54.629536+00:00 heroku[router]: at=error code=H10 desc=”App cra
    shed” method=GET path=/ host=frozen-garden-3696.herokuapp.com fwd=”116.74.208.34
    ” dyno= connect= service= status=503 bytes=
    2013-09-16T12:49:55.048234+00:00 heroku[router]: at=error code=H10 desc=”App cra
    shed” method=GET path=/favicon.ico host=frozen-garden-3696.herokuapp.com fwd=”11
    6.74.208.34″ dyno= connect= service= status=503 bytes=
    2013-09-16T12:56:31.919766+00:00 heroku[router]: at=error code=H10 desc=”App cra
    shed” method=GET path=/ host=frozen-garden-3696.herokuapp.com fwd=”116.74.208.34
    ” dyno= connect= service= status=503 bytes=
    2013-09-16T12:56:32.350463+00:00 heroku[router]: at=error code=H10 desc=”App cra
    shed” method=GET path=/favicon.ico host=frozen-garden-3696.herokuapp.com fwd=”11
    6.74.208.34″ dyno= connect= service= status=503 bytes=
    2013-09-16T12:56:43.256188+00:00 heroku[router]: at=error code=H10 desc=”App cra
    shed” method=GET path=/ host=frozen-garden-3696.herokuapp.com fwd=”116.74.208.34
    ” dyno= connect= service= status=503 bytes=

    can you please tell me what is wrong with this?

    • http://www.jamesward.com James Ward

      What does your `Procfile` look like?

      • Amol Chavan

        I first tried with : web: bin/myapp -Dhttp.port=${PORT} ${JAVA_OPTS} -DapplyEvolutions.default=true -Ddb.default.driver=org.postgresql.Driver -Ddb.default.url=${DATABASE_URL}

        And then: web: target/start -Dhttp.port=${PORT} -DapplyEvolutions.default=true -Ddb.default.url=${DATABASE_URL} -Ddb.default.driver=org.postgresql.Driver

        no success in both the case.

        • http://www.jamesward.com James Ward

          If you do a “play stage” then you can generate locally the files that are on Heroku. Then you can verify your Procfile command locally.

          • Amol Chavan

            Pls guide verify your Procfile command locally.

            Thanks

          • Amol Chavan

            I did “stage” then “start” but when i called localhost:9000 from browser following error shown in play console:

            Error occurred during initialization of VM
            java.lang.ExceptionInInitializerError
            at java.lang.Runtime.loadLibrary0(Unknown Source)
            at java.lang.System.loadLibrary(Unknown Source)
            at java.lang.System.initializeSystemClass(Unknown Source)
            Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range:0
            at java.lang.String.charAt(Unknown Source)
            at java.io.Win32FileSystem.(Unknown Source)
            at java.io.WinNTFileSystem.(Unknown Source)
            at java.io.FileSystem.getFileSystem(Native Method)
            at java.io.File.(Unknown Source)
            at java.lang.Runtime.loadLibrary0(Unknown Source)
            at java.lang.System.loadLibrary(Unknown Source)
            at java.lang.System.initializeSystemClass(Unknown Source)

          • http://www.jamesward.com James Ward

            What version of Play?

          • Amol Chavan

            Play 2.1.3

          • http://www.jamesward.com James Ward

            The start script doesn’t work on Windows. :(

            So it seems that the following Procfile should work:
            web: target/start -Dhttp.port=${PORT} -DapplyEvolutions.default=true -Ddb.default.url=${DATABASE_URL} -Ddb.default.driver=org.postgresql.Driver

            Maybe it would help to check out the instructions here: https://github.com/jamesward/play2torial/blob/master/JAVA.md And see if there is a step you missed.

          • Amol Chavan

            Hi,
            The issue was with 1.sql file. I was using mysql on my machine and the generated sql file was for mysql not for postgresql.

            Thanks for your help.

          • http://www.jamesward.com James Ward

            You should use the same database on both systems.

  • ImadEddine

    Hi James

    I use Play v 2.2.3 and Java 1.7

    I specified there in :

    system.properties
    dependencies.yml

    in log :

    —–> Play! app detected
    —–> Installing OpenJDK 1.7…done
    —–> Installing Play! 2.2.3…..
    —–> Error installing Play! framework or unsupported Play! framework version specified. Please review Dev Center for a list of supported versions.
    ! Push rejected, failed to compile Play! app
    To git@heroku.com:whispering-brushlands-2197.git
    ! [remote rejected] master -> master (pre-receive hook declined)
    error: failed to push some refs to ‘git@heroku.com:whispering-brushlands-2197.git’

    I am tired … help

    • http://www.jamesward.com James Ward

      You are mixing Play 1 & 2 things. dependencies.yml is for Play 1. It shouldn’t exist for Play 2.

      • ImadEddine

        so .. i must be delete the file …. but heroku install 1.2.7 version by default

        • http://www.jamesward.com James Ward

          Heroku detects the buildpack to use based on the files in the git repo. So yes, delete the file, commit, and push again.

          • ImadEddine

            I run this : heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-play

            then i run : git push heroku master

            this msg log :

            Installing OpenJDK 1.7…done
            —–> WARNING: Play! version not specified in dependencies.yml. Default version: 1.2.7 being used….
            —–> Installing Play! 1.2.7…..
            —–> done

            Building Play! application at directory ./

            Resolving dependencies: .play/play dependencies ./ –forProd –forceCopy –silent -Duser.home=/tmp/build_4d4e54fe-501c-470d-8c9d-4c08bb85f533 2>&1

            ~ !! /tmp/build_4d4e54fe-501c-470d-8c9d-4c08bb85f533/conf/dependencies.yml does not exist

            ! Failed to build Play! application

            ! Cleared Play! framework from cache

            ! Push rejected, failed to compile Play! app

          • http://www.jamesward.com James Ward

            That is the wrong buildpack for Play 2. Here is the Play 2 one: https://github.com/heroku/heroku-buildpack-scala

          • ImadEddine

            I think it worked but in log :

            —–> Fetching custom git buildpack… done
            ! Push rejected, no Cedar-supported app detected

            what doesmean ?

          • http://www.jamesward.com James Ward

            That means your git repo is missing the files used to detect that your app is a Play 2 app. Make sure you have project/build.properties project/plugins.sbt & build.sbt in your git repo.

          • ImadEddine

            Thank-you for your response … I re-try : git push heroku master

            —–> Fetching custom git buildpack… done
            —–> Play! app detected
            —–> Installing OpenJDK 1.7…done
            —–> WARNING: Play! version not specified in dependencies.yml. Default version: 1.2.7 being used….
            —–> Installing Play! 1.2.7…..
            —–> done
            —–> Installing ivysettings.xml….. done
            —–> Building Play! application…

            ~ _ _

            ~ _ __ | | __ _ _ _| |

            ~ | ‘_ | |/ _’ | || |_|

            ~ | __/|_|____|__ (_)

            ~ |_| |__/

            ~
            ~ play! 1.2.7, http://www.playframework.org
            ~
            1.2.7
            Building Play! application at directory ./

            Resolving dependencies: .play/play dependencies ./ –forProd –forceCopy –silent -Duser.home=/tmp/build_ec9784ad-6069-4d36-8af3-8be824d7dfce 2>&1

            ~ !! /tmp/build_ec9784ad-6069-4d36-8af3-8be824d7dfce/conf/dependencies.yml does not exist

            ! Failed to build Play! application
            ! Cleared Play! framework from cache
            ! Push rejected, failed to compile Play! app
            To git@heroku.com:polar-retreat-5625.git
            ! [remote rejected] master -> master (pre-receive hook declined)
            error: failed to push some refs to ‘git@heroku.com:polar-retreat-5625.git’

            In My Root app :

            $ ls
            app build.sbt conf git-subtree id_rsa.pub id_rsa.pub.pub lib logs project public README system.properties target test

          • http://www.jamesward.com James Ward

            Looks like your Procfile has the wrong path in it. You can run the “stage” task locally (via the activator or play command) and then look in the target/universal/stage/bin dir to see what the start script is named.

          • ImadEddine

            it will be like this :
            Starting process with command `target/universal/stage/bin/my-retraite (name of my application)

            but a quick question …

            I use : org.h2.Driver as default database

            i have some evolution sql to run like this :
            # — !Up
            …..
            # — !Downs
            ….

            I have also Entity named : “User”

            is There an option on heroku to run-it without converting manually to postgres-script

          • http://www.jamesward.com James Ward

            What is used is determined by your settings. Usually H2 isn’t used in production since the datastore is non-durable and doesn’t work across multiple nodes.

          • ImadEddine

            I mean:

            for not re-write sql & changing database … i want to use evolutions/default/1.sql

            for example in my logs :

            [error] o.h.t.h.SchemaUpdate – HHH000388: Unsuccessful: create table User (id bigint not null, active boolean, availableTokens integer, dateOfBirth timestamp, description varchar(255), firstName varchar(255), identifiant varchar(255), lastName varchar(255), mail varchar(255), password varchar(255), phoneCampany varchar(255), phoneDirect varchar(255), phoneMobile varchar(255), provider varchar(255), civility_code varchar(255), company_id bigint, role_code varchar(255), primary key (id))

            2014-09-01T14:44:44.919624+00:00 app[web.1]: [error] o.h.t.h.SchemaUpdate – ERROR: syntax error at or near “User”

            2014-09-01T14:44:44.919626+00:00 app[web.1]: Position: 98

            2014-09-01T14:44:44.735354+00:00 app[web.1]: [error] o.h.t.h.SchemaUpdate – ERROR: syntax error at or near “User”

            2014-09-01T14:44:44.735357+00:00 app[web.1]: Position: 14

            2014-09-01T14:44:44.919484+00:00 app[web.1]: [error] o.h.t.h.SchemaUpdate – HHH000388: Unsuccessful: alter table Insured add constraint FK_t7nwyu7sk8kglrny57n41pkmp foreign key (user_id) references User

          • http://www.jamesward.com James Ward

            It looks like your config is pointed at Postgres which doesn’t allow tables named `User`. You can configure the table name to be something different.

          • ImadEddine

            Thank you very very much .. you give me a great help

          • ImadEddine

            so i must change my local data base to H2 ??

          • http://www.jamesward.com James Ward

            If you want to use Postgres on Heroku then that is recommended.

          • ImadEddine

            Thank-you very much james … I think that’s OK about deployment

            i run : heroku logs

            if there are problems ?? (implicit)

            2014-09-01T14:44:37.186972+00:00 heroku[web.1]: Starting process with command `target/universal/stage/bin/my-retraite -Dhttp.port=27476 -DapplyEvolutions.default=true -Ddb.default.driver=org.postgresql.Driver -Ddb.default.url=postgres://kyynbbcvqdbsca:zq1l7lNAh_LS1ub84qDxaBsrtf@ec2-54-225-101-124.compute-1.amazonaws.com:5432/d7a13707h9ra0o`

            2014-09-01T14:44:37.685392+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Djava.rmi.server.useCodebaseOnly=true

            2014-09-01T14:44:38.060456+00:00 app[web.1]: Play server process ID is 2

            2014-09-01T14:44:38.491918+00:00 app[web.1]: 14:44:38,185 |-INFO in ch.qos.logback.classic.LoggerContext[default] – Could NOT find resource [logback.groovy]

            2014-09-01T14:44:38.491923+00:00 app[web.1]: 14:44:38,185 |-INFO in ch.qos.logback.classic.LoggerContext[default] – Could NOT find resource [logback-test.xml]

            2014-09-01T14:44:38.491926+00:00 app[web.1]: 14:44:38,186 |-INFO in ch.qos.logback.classic.LoggerContext[default] – Found resource [logback.xml] at [jar:file:/app/target/universal/stage/lib/my-retraite.my-retraite-1.0-SNAPSHOT.jar!/logback.xml]

            2014-09-01T14:44:38.491928+00:00 app[web.1]: 14:44:38,187 |-WARN in ch.qos.logback.classic.LoggerContext[default] – Resource [logback.xml] occurs multiple times on the classpath.

            2014-09-01T14:44:38.491929+00:00 app[web.1]: 14:44:38,187 |-WARN in ch.qos.logback.classic.LoggerContext[default] – Resource [logback.xml] occurs at [jar:file:/app/target/universal/stage/lib/com.typesafe.play.play_2.10-2.2.3.jar!/logback.xml]

            2014-09-01T14:44:38.491931+00:00 app[web.1]: 14:44:38,187 |-WARN in ch.qos.logback.classic.LoggerContext[default] – Resource [logback.xml] occurs at [jar:file:/app/target/universal/stage/lib/my-retraite.my-retraite-1.0-SNAPSH

            OT.jar!/logback.xml]

            2014-09-01T14:44:38.491933+00:00 app[web.1]: 14:44:38,209 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@3c18b340 – URL [jar:file:/app/target/universal/stage/lib/my-retraite.my-retraite-1.0-SNAPSHOT.jar!/logback.xml] is not of type file

            2014-09-01T14:44:38.491934+00:00 app[web.1]: 14:44:38,367 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction – debug attribute not set

            2014-09-01T14:44:38.491936+00:00 app[web.1]: 14:44:38,369 |-INFO in ch.qos.logback.core.joran.action.AppenderAction – About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]

            2014-09-01T14:44:38.491937+00:00 app[web.1]: 14:44:38,378 |-INFO in ch.qos.logback.core.joran.action.AppenderAction – Naming appender as [STDOUT]

            2014-09-01T14:44:38.491939+00:00 app[web.1]: 14:44:38,408 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA – Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property

            2014-09-01T14:44:38.491940+00:00 app[web.1]: 14:44:38,486 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction – Setting level of ROOT logger to DEBUG

            2014-09-01T14:44:38.491941+00:00 app[web.1]: 14:44:38,487 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction – Attaching appender named [STDOUT] to Logger[ROOT]

            2014-09-01T14:44:38.491957+00:00 app[web.1]: 14:44:38,487 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction – End of configuration.

            2014-09-01T14:44:38.491959+00:00 app[web.1]: 14:44:38,489 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@79a04d92 – Registering current configuration as safe fallback point

            2014-09-01T14:44:38.491965+00:00 app[web.1]:

            2014-09-01T14:44:39.541538+00:00 app[web.1]: [info] play – datasource [postgres://kyynbbcvqdbsca:zq1l7lNAh_LS1ub84qDxaBsrtf@ec2-54-225-101-124.compute-1.amazonaws.com:5432/d7a13707h9ra0o] bound to JNDI as DefaultDS

            2014-09-01T14:44:39.784673+00:00 app[web.1]: [info] play – database [default] connected at jdbc:postgresql://ec2-54-225-101-124.compute-1.amazonaws.com:5432/d7a13707h9ra0o

            2014-09-01T14:44:44.735188+00:00 app[web.1]: [error] o.h.t.h.SchemaUpdate – HHH000388: Unsuccessful: create table User (id bigint not null, active boolean, availableTokens integer, dateOfBirth timestamp, description varchar(255), firstName varchar(255), identifiant varchar(255), lastName varchar(255), mail varchar(255), password varchar(255), phoneCampany varchar(255), phoneDirect varchar(255), phoneMobile varchar(255), provider varchar(255), civility_code varchar(255), company_id bigint, role_code varchar(255), primary key (id))

            2014-09-01T14:44:44.919624+00:00 app[web.1]: [error] o.h.t.h.SchemaUpdate – ERROR: syntax error at or near “User”

            2014-09-01T14:44:44.919626+00:00 app[web.1]: Position: 98

            2014-09-01T14:44:44.735354+00:00 app[web.1]: [error] o.h.t.h.SchemaUpdate – ERROR: syntax error at or near “User”

            2014-09-01T14:44:44.735357+00:00 app[web.1]: Position: 14

            2014-09-01T14:44:44.919484+00:00 app[web.1]: [error] o.h.t.h.SchemaUpdate – HHH000388: Unsuccessful: alter table Insured add constraint FK_t7nwyu7sk8kglrny57n41pkmp foreign key (user_id) references User

            2014-09-01T14:44:45.016718+00:00 app[web.1]: [error] o.h.t.h.SchemaUpdate – HHH000388: Unsuccessful: alter table User add constraint FK_7ek00pkat74ouxb736anasf9e foreign key (company_id) references Company

            2014-09-01T14:44:45.002467+00:00 app[web.1]: [error] o.h.t.h.SchemaUpdate – ERROR: syntax error at or near “User”

            2014-09-01T14:44:45.002469+00:00 app[web.1]: Position: 13

            2014-09-01T14:44:45.034164+00:00 app[web.1]: [error] o.h.t.h.SchemaUpdate – ERROR: syntax error at or near “User”

            2014-09-01T14:44:45.034166+00:00 app[web.1]: Position: 13

            2014-09-01T14:44:45.002313+00:00 app[web.1]: [error] o.h.t.h.SchemaUpdate – HHH000388: Unsuccessful: alter table User add constraint FK_odh3bgeql0h76l69f4retv9t7 foreign key (civility_code) references Civility

            2014-09-01T14:44:45.016837+00:00 app[web.1]: Position: 13

            2014-09-01T14:44:45.034007+00:00 app[web.1]: [error] o.h.t.h.SchemaUpdate – HHH000388: Unsuccessful: alter table User add constraint FK_c7ls4b4cynm7td31u59sci0n3 foreign key (role_code) references Role

            2014-09-01T14:44:45.016835+00:00 app[web.1]: [error] o.h.t.h.SchemaUpdate – ERROR: syntax error at or near “User”

            2014-09-01T14:44:45.357673+00:00 app[web.1]: at play.api.db.evolutions.EvolutionsPlugin.withLock(Evolutions.scala:507)

            2014-09-01T14:44:45.357944+00:00 app[web.1]: at scala.collection.immutable.List.foreach(List.scala:318)

            2014-09-01T14:44:45.358199+00:00 app[web.1]: at play.core.StaticApplication.(ApplicationProvider.scala:52)

            2014-09-01T14:44:45.358280+00:00 app[web.1]: at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:279)

            2014-09-01T14:44:45.358395+00:00 app[web.1]: at play.core.server.NettyServer$.main(NettyServer.scala:274)

            2014-09-01T14:44:45.356899+00:00 app[web.1]: Oops, cannot start the server.

            2014-09-01T14:44:45.354352+00:00 app[web.1]: [error] play – ERROR: relation “address” already exists [ERROR:0, SQLSTATE:42P07]

            2014-09-01T14:44:45.357554+00:00 app[web.1]: at play.api.db.evolutions.Evolutions$.checkEvolutionsState(Evolutions.scala:193)

            2014-09-01T14:44:45.357429+00:00 app[web.1]: @6jcpppp5f: Database ‘default’ is in an inconsistent state!

            2014-09-01T14:44:45.357594+00:00 app[web.1]: at play.api.db.evolutions.Evolutions$.applyScript(Evolutions.scala:277)

            2014-09-01T14:44:45.357634+00:00 app[web.1]: at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1$$anonfun$apply$1.apply$mcV$sp(Evolutions.scala:472)

            2014-09-01T14:44:45.357751+00:00 app[web.1]: at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1.apply(Evolutions.scala:459)

            2014-09-01T14:44:45.357790+00:00 app[web.1]: at scala.collection.immutable.List.foreach(List.scala:318)

            2014-09-01T14:44:45.357867+00:00 app[web.1]: at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)

            2014-09-01T14:44:45.357712+00:00 app[web.1]: at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1.apply(Evolutions.scala:461)

            2014-09-01T14:44:45.357828+00:00 app[web.1]: at play.api.db.evolutions.EvolutionsPlugin.onStart(Evolutions.scala:459)

            2014-09-01T14:44:45.357905+00:00 app[web.1]: at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)

            2014-09-01T14:44:45.358011+00:00 app[web.1]: at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:88)

            2014-09-01T14:44:45.358049+00:00 app[web.1]: at play.api.Play$$anonfun$start$1.apply(Play.scala:88)

            2014-09-01T14:44:45.358240+00:00 app[web.1]: at play.core.server.NettyServer$.createServer(NettyServer.scala:243)

            2014-09-01T14:44:45.358087+00:00 app[web.1]: at play.api.Play$$anonfun$start$1.apply(Play.scala:88)

            2014-09-01T14:44:45.358164+00:00 app[web.1]: at play.api.Play$.start(Play.scala:87)

            2014-09-01T14:44:45.358319+00:00 app[web.1]: at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:274)

            2014-09-01T14:44:45.358357+00:00 app[web.1]: at scala.Option.map(Option.scala:145)

            2014-09-01T14:44:45.358126+00:00 app[web.1]: at play.utils.Threads$.withContextClassLoader(Threads.scala:18)

            2014-09-01T14:44:45.358433+00:00 app[web.1]: at play.core.server.NettyServer.main(NettyServer.scala)

            2014-09-01T14:44:46.043834+00:00 heroku[web.1]: State changed from starting to crashed

            2014-09-01T14:44:46.044455+00:00 heroku[web.1]: State changed from crashed to starting

            2014-09-01T14:44:46.046845+00:00 heroku[web.1]: Process exited with status 255



  • View James Ward's profile on LinkedIn