1

gradle で次のコマンドを実行しようとしたところ、次のエラーが発生しました。

    c:\gsoc\mifosx\mifosng-provider>gradle migrateTenantListDB -PdbName=mifosplatfor
m-tenants
Listening for transport dt_socket at address: 8005
:migrateTenantListDB FAILED

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\gsoc\mifosx\mifosng-provider\build.gradle' line: 357

* What went wrong:
Execution failed for task ':flywayMigrate'.
> Unable to obtain Jdbc connection from DataSource

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

BUILD FAILED

Total time: 13.843 secs

スクリプトファイルはここにあり、行番号は. of error は 357 と表示されますが、なぜエラーが表示されるのかわかりません。それはmysqlサーバーの誤った構成に関するものですか?ここで私を助けてください:スクリプト:

task migrateTenantListDB<<{
    description="Migrates a Tenant List DB. Optionally can pass dbName. Defaults to 'mifosplatform-tenants' (Example: -PdbName=someDBname)"

    def filePath = "filesystem:$projectDir" + System.properties['file.separator'] + '..' + System.properties['file.separator'] + 'mifosng-db' + System.properties['file.separator'] + 'migrations/list_db'
    def tenantsDbName = 'mifosplatform-tenants';
    if (rootProject.hasProperty("dbName")) {
        tenantsDbName = rootProject.getProperty("dbName")
    }

    flyway.url= "jdbc:mysql://localhost:3306/$tenantsDbName"
    flyway.locations= [filePath]

    flywayMigrate.execute()
}
4

1 に答える 1

0

このプロジェクトの gradle スクリプトには、mysql にハードコードされた mysql パスワードがあります。このコマンドを試す前に、ローカルホストのパスワードを mysql に設定し、接続を確認する必要があります。

于 2013-04-24T21:43:34.403 に答える