2017-06-14 13 views
0

Google CloudPlatformで提供されているサンプルブックシェルフアプリを実行しようとすると、PERMISSION_DENIEDエラーが発生します。 https://cloud.google.com/java/getting-started/using-forms本棚のサンプルアプリケーションをローカルで実行しているときにデータストアのアクセス権が拒否されました

それは、次のコマンドを実行すると言う:

MVN -Plocalクリーン桟橋:-展開して実行-DprojectID = [YOUR-PROJECT-ID]

私は取得していますエラーは次のとおりです。

[WARNING] Failed startup of context [email protected]{/,file:///Users/markfriesen/Documents/workspace/getting-started-java/bookshelf/2-structured-data/target/bookshelf-2-1.0-SNAPSHOT/,UNAVAILABLE}{/Users/markfriesen/Documents/workspace/getting-started-java/bookshelf/2-structured-data/target/bookshelf-2-1.0-SNAPSHOT} 
com.google.cloud.datastore.DatastoreException: Missing or insufficient permissions. 
    at com.google.cloud.datastore.spi.v1.HttpDatastoreRpc.translate(HttpDatastoreRpc.java:128) 
... 
Caused by: com.google.datastore.v1.client.DatastoreException: Missing or insufficient permissions., code=PERMISSION_DENIED 
    at com.google.datastore.v1.client.RemoteRpc.makeException(RemoteRpc.java:126) 
    at com.google.datastore.v1.client.RemoteRpc.makeException(RemoteRpc.java:169) 

I am able to launch the datastore emulator using the command: 
    gcloud beta emulators datastore start --project=[YOUR-PROJECT-ID] 

私が実行しています: MacOSのシエラ Javaのバージョンを:1.8.0_112

誰もがアイデアを得ましたか。エラーメッセージから

おかげ

答えて

0

は、コードが本当のGCDではなく、エミュレータに接続しているという事実であることを表示され、プロジェクトのために有効にデータストアのAPIを持っていません。 GCDにログインしてDatastore APIを有効にして、もう一度試してみることをおすすめします。

関連する問題