0
votes

I am developing a Google App Engine project in Java, using Google Cloud Tools in Eclipse. I added a Maven dependency to my project for using the App Engine Datastore. I run code that both writes to the datastore and reads back from it.

When I browse to the local admin console at localhost:8080/_ah/admin, there is no data to view. And from what I've read, there should be a local datastore file in my project's /WEB-INF/appengine-generated directory. But that directory never gets created, and obviously neither does the file.

Is there somewhere within my project's properties that define where that file is being created? And is there any reason the admin console is not seeing the data wrote to the datastore?

1

1 Answers

1
votes

Cloud Tools for Eclipse supports running multiple Development App Servers, including having the same App Engine service running in each. So we can't use the source directory for deployment as the different instances will interfere.

Instead each instance of your service is copied into a deployment area found in <workspace>/.metadata/.plugins/org.eclipse.wst.server.core/tmp<X>/<service-name>. We should do better to expose that location.

When you first interact with the Def App Server's Datastore emulator, you should see some messages to the console identifying the location of the datastore files.

Nov 29, 2018 12:25:38 PM com.google.appengine.api.datastore.dev.LocalDatastoreService init
INFO: Local Datastore initialized: 
    Type: High Replication
    Storage: /Users/bsd/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/test-imageservice-3079/WEB-INF/appengine-generated/local_db.bin
Nov 29, 2018 12:25:38 PM com.google.appengine.api.datastore.dev.LocalDatastoreService load
INFO: The backing store, /Users/bsd/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/test-imageservice-3079/WEB-INF/appengine-generated/local_db.bin, does not exist. It will be created.
Nov 29, 2018 12:26:08 PM com.google.appengine.api.datastore.dev.LocalDatastoreService$11 run
INFO: Time to persist datastore: 8 ms

You can also tell the Development App Server by editing the server launch configuration and adding --generated_dir command-line argument like the following:

enter image description here