您在日誌中看到「應用程序未運行」,因爲您在應用程序休眠時查看了日誌。如果你喚醒你的應用程序,例如只是對http://playconfig.pareeje.cloudbees.net/發出新的請求,你會看到你的日誌告訴你一些不同的東西。事實上,你應該看到這樣的事情:
Caused by: java.sql.SQLException: No suitable driver found for jdbc:jdbc:mysql://***********.compute-1.amazonaws.com/playconferance
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:363)
at com.jolbox.bonecp.BoneCP.<init>(BoneCP.java:416)
at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:120)
at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:245)
... 22 more
所以,我認爲,這意味着你有一個問題,在您的應用程序。我們有一個play2應用程序示例,可以幫助您進行設置。請參閱here。
在application.conf文件,你應該有這樣的事情:
# Database configuration
# ~~~~~
# You can declare as many datasources as you want.
# By convention, the default datasource is named `default`
#
# db.default.driver=org.h2.Driver
# db.default.url="jdbc:h2:mem:play"
# db.default.user=sa
# db.default.password=
db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:"${DATABASE_URL_DB}
db.default.user=${DATABASE_USERNAME_DB}
db.default.password=${DATABASE_PASSWORD_DB}
db.default.maxConnectionsPerPartition=10
db.default.partitionCount=2
你應該遵循的步驟是一齣戲2應用程序非常簡單。
- 下載並安裝CoudBees SDK
創建一個空白應用
$蜜蜂的應用程序:創建-t play2 -a APPNAME
創建數據庫
$蜜蜂分貝:創建dbName
將應用程序綁定到數據庫SE
$蜜蜂應用:結合-a APPNAME -db DBNAME -as MYDB
將應用程序部署
$蜜蜂的應用程序:部署-a APPNAME -t play2 PATH_TO_WAR_FILE。拉鍊
應用程序配置:
# Database configuration
# ~~~~~
# You can declare as many datasources as you want.
# By convention, the default datasource is named `default`
#
# db.default.driver=org.h2.Driver
# db.default.url="jdbc:h2:mem:play"
# db.default.user=sa
# db.default.password=
db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:"${DATABASE_URL_DB}
db.default.user=${DATABASE_USERNAME_DB}
db.default.password=${DATABASE_PASSWORD_DB}
db.default.maxConnectionsPerPartition=10
db.default.partitionCount=2