Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/311.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
com.google.cloud.datastore.DatastoreException:未经验证。对象化java_Java_Google App Engine_Google Cloud Platform_Google Cloud Datastore_Objectify - Fatal编程技术网

com.google.cloud.datastore.DatastoreException:未经验证。对象化java

com.google.cloud.datastore.DatastoreException:未经验证。对象化java,java,google-app-engine,google-cloud-platform,google-cloud-datastore,objectify,Java,Google App Engine,Google Cloud Platform,Google Cloud Datastore,Objectify,我已经设置了objectify v6,当我试图保存一个实体时,我得到了这个异常 com.google.cloud.datastore.DatastoreException:未经验证 原因: com.google.datastore.v1.client.DatastoreException:Unauthenticated.,code=Unauthenticated 注意:我只是试图在本地主机上保存此实体 以下是我使用objectify保存实体的代码: Subscriber subs

我已经设置了objectify v6,当我试图保存一个实体时,我得到了这个异常

com.google.cloud.datastore.DatastoreException:未经验证

原因: com.google.datastore.v1.client.DatastoreException:Unauthenticated.,code=Unauthenticated

注意:我只是试图在本地主机上保存此实体

以下是我使用objectify保存实体的代码:

        Subscriber subscriber = new Subscriber(phone);
        ofy().save().entity(subscriber).now();

您的请求没有有效的身份验证凭据。谢谢你的回答。它很好地解决了我的问题。