Questions tagged [gcloud-java]

gcloud-java is a Google Cloud Platform client library for Java applications.

Google Cloud Client Library for Java - an idiomatic, intuitive, and natural way for Java developers to integrate with Google Cloud Platform services, like Cloud Datastore and Cloud Storage.

35 questions
10
votes
3 answers

How to fix error: A project ID is required for this service but could not be determined

I'm trying to insert data to Google Datastore from AppEngine and I'm getting an error: java.lang.IllegalArgumentException: A project ID is required for this service but could not be determined from the builder or the environment. Please set a…
9
votes
1 answer

Play server refuses to start with google-cloud dependency

I am trying to use google cloud data store in my play scala service (Play v2.5.7), because of which I am adding the google-cloud dependency in my build.sbt "com.google.cloud" % "google-cloud" % "0.4.0", The server starts up fine without the…
7
votes
2 answers

Google Dialogflow: The Application Default Credentials are not available

Hi I've an issue with Java SDK library for Google Cloud. I need to query Dialogflow V2 API and I'm using this SDK (https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master) I've followed the instructions in order to set…
HK15
  • 737
  • 1
  • 14
  • 32
6
votes
1 answer

GQL disallowed literal error, google datastore

I am trying to use GQL to get some data back from the datastore. When I do a SELECT * FROM Kind request, it works and I get data back. However when I try: SELECT * FROM kind where num < 1234 I get a disallowed literal error. I even tried to do it…
A Ba
  • 275
  • 2
  • 10
4
votes
2 answers

SSH Connection to GCLoud Instance from Java

There is 'gcloud compute ssh' command that allows to connect to Google Cloud instance and execute commands in console. How can I do that via Java GCloud API?
4
votes
2 answers

Spring Boot with Google Cloud Datastore API fails to run

I am trying to configure Google Cloud Datastore API with Spring Boot in order to deploy it on Compute Engine. When I try to run the Spring Boot project locally, I keep on getting the following error org.apache.catalina.core.ContainerBase : A child…
3
votes
1 answer

Gcloud PubSub Java implementation - java.util.concurrent.RejectedExecutionException

I use the sample snippet from GCloud documentation to receive msg as a subscriber. My pubsub gcloud jar version is 0.19.0-alpha The problem is that I can receive the msg with attribute map but I keep having this exception: 2017-07-12 16:52:25,219…
Mikey
  • 380
  • 4
  • 15
2
votes
0 answers

Unable to make JDBC Connection to jdbc:google:mysql

I started learning about the google cloud platform and I have been able to create a project and an instance and then I created a db using a mysql dump file. Now, I have this application which was created using hibernate and it works when the db is…
2
votes
2 answers

gcloud-java pubsub API : how to set "Return Immediately" flag

Using gcloud-java pubsub API 0.2.6 - how can I set "Return Immediately" flag to TRUE with the subscription pull?
2
votes
1 answer

How to use cursors for navigating to previous pages using GQL and the new gcloud-java API?

I'm using the new gcloud-java API (https://github.com/GoogleCloudPlatform/gcloud-java/tree/master/gcloud-java-datastore/src/main/java/com/google/cloud/datastore) for working with the Cloud Datastore. My specific question is on using GQL for…
Sai Pullabhotla
  • 2,207
  • 17
  • 17
1
vote
3 answers

Datastore query with IN operator

The new flexible environment datastore interface does not seem to support IN operation when running a query. I hope that I'm wrong, and if so, how can one use an IN operator in the new Java interface of Datastore?
Ohad Navon
  • 1,693
  • 1
  • 14
  • 19
1
vote
2 answers

How to override method in uber jar?

I am trying to use this code with Google Cloud Datastore: Query query = Query.entityQueryBuilder() .kind("Task") .filter(PropertyFilter.hasAncestor( datastore.newKeyFactory().kind("TaskList").newKey("default"))) …
1
vote
1 answer

Is com.google.cloud.datastore.Datastore thread safe?

Is com.google.cloud.datastore.Datastore thread safe? More specifically, can one instance of Datastore be shared by multiple threads and can they all concurrently read from/write to the Cloud Datastore? In other words, if I'm building a Web…
Sai Pullabhotla
  • 2,207
  • 17
  • 17
1
vote
1 answer

GCE how to add external IP to existing instance at boot

I'm using Gcloud-java to manage some VM instances. The code to create a new instance is clear and is the following: Address externalIp = compute.getAddress(addressId); InstanceId instanceId = InstanceId.of("us-central1-a",…
1
vote
1 answer

How to add a list property to an entity using gcloud Java client?

I can set a property to a new entity: Entity.Builder builder = Entity.builder(actKey); builder.set("name", someName); I can see a method to add a list as a property: List> aliases = new ArrayList<>(); builder.set("aliases",…
1
2 3