java - GAE Datastore - cannot start LocalDevelopmentDatastore programmatically on Windows -


environment:
java api google-api-services-datastore-protobuf v1beta2-rev1-3.0.0.
os: windows 7.

goal:
start local datastore server using method:

public void start(string sdkpath, string dataset, string cmdlineoptions) 

from com.google.api.services.datastore.client.localdevelopmentdatastore.java in order use in unit tests.

steps:
downloaded gcd tool gcd-v1beta2-rev1-3.0.2.zip , put c:\gcd folder
(paths gcd.cmd , gcd.sh `c:\gcd). also, set environment variables:

"datastore_host"="http://localhost:8080" ,   "datastore_dataset"="myapp".   

problem:

localdevelopmentdatastoreexception occurs.
caused by: java.io.ioexception: cannot run program "./gcd.sh" (in directory "c:\gcd"): createprocess error=2, system cannot find file specified.

note tries find ./gcd.sh not gcd.cmd.

java code:

string datasetname = "myapp"; string hostname = "http://localhost:8080";  datastoreoptions options = new datastoreoptions.builder()             .host(hostname)             .dataset(datasetname).build();  localdevelopmentdatastoreoptions localoptions = new localdevelopmentdatastoreoptions.builder()             .addenvvar("datastore_host", hostname)             .addenvvar("datastore_dataset", datasetname).build();  localdevelopmentdatastore datastore = localdevelopmentdatastorefactory.get().create(options, localoptions);  datastore.start("c:\\gcd", datasetname); 

this code based on example localdevelopmentdatastore.java documentation.

please help.

it seems though method programmed gcd.sh, doesn't appear there's in config have helped not fail. suggest open defect report in cloud platform public issue tracker.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -