1

This is my first run at getting app engine working so maybe I just missed a step somewhere but I am trying to insert stuff into the app engine database like this

Builder endpointBuilder = new Manufacturerendpoint.Builder(AndroidHttp.newCompatibleTransport(),new JacksonFactory()
    , new HttpRequestInitializer() {
        public void initialize(HttpRequest httpRequest) { }
    });

    Manufacturerendpoint manufacturer = CloudEndpointUtils.updateBuilder(endpointBuilder).build();



    String[] manufacturers = this.getResources().getStringArray(R.array.manufacturers);
    ContentValues v = new ContentValues();
    ContentValues val = new ContentValues();
    for(int i = 0; i < manufacturers.length; i++){
        Manufacturer manu = new Manufacturer();
        manu.setManufacturerName(manufacturers[i]);
        manu.setManufacturerID(i);
        try{
            Manufacturer result = manufacturer.insertManufacturer(manu).execute();
            Log.d("TAG", "TAG");
        }catch(Exception e){
            e.printStackTrace();
        }

When I run this on the local server through the emulator it works fine but when I uploaded the code to app engine I get a response error

12-01 12:06:16.019: W/System.err(2589): com.google.api.client.googleapis.json.GoogleJsonResponseException: 404 Not Found
12-01 12:06:16.019: W/System.err(2589): Not Found
12-01 12:06:16.029: W/System.err(2589):     at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:114)
12-01 12:06:16.029: W/System.err(2589):     at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)
12-01 12:06:16.029: W/System.err(2589):     at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:417)
12-01 12:06:16.039: W/System.err(2589):     at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:328)
12-01 12:06:16.039: W/System.err(2589):     at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:449)
12-01 12:06:16.039: W/System.err(2589):     at com.tyczj.bowling.Bowlers.tables(Bowlers.java:716)
12-01 12:06:16.039: W/System.err(2589):     at com.tyczj.bowling.Bowlers.run(Bowlers.java:859)
12-01 12:06:16.039: W/System.err(2589):     at java.lang.Thread.run(Thread.java:856)
12-01 12:24:21.989: W/System.err(2589): javax.net.ssl.SSLException: Read error: ssl=0x670d1160: I/O error during system call, Connection reset by peer
12-01 12:24:22.029: W/System.err(2589):     at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_read(Native Method)
12-01 12:24:22.029: W/System.err(2589):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:664)
12-01 12:24:22.039: W/System.err(2589):     at libcore.io.Streams.readSingleByte(Streams.java:41)
12-01 12:24:22.039: W/System.err(2589):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:648)
12-01 12:24:22.039: W/System.err(2589):     at libcore.io.Streams.readAsciiLine(Streams.java:201)
12-01 12:24:22.049: W/System.err(2589):     at libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:573)
12-01 12:24:22.049: W/System.err(2589):     at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:821)
12-01 12:24:22.049: W/System.err(2589):     at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:283)
12-01 12:24:22.059: W/System.err(2589):     at libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:495)
12-01 12:24:22.059: W/System.err(2589):     at libcore.net.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:134)
12-01 12:24:22.059: W/System.err(2589):     at com.google.api.client.http.javanet.NetHttpResponse.<init>(NetHttpResponse.java:37)
12-01 12:24:22.059: W/System.err(2589):     at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:101)
12-01 12:24:22.059: W/System.err(2589):     at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:980)
12-01 12:24:22.069: W/System.err(2589):     at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:399)
12-01 12:24:22.069: W/System.err(2589):     at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:328)
12-01 12:24:22.069: W/System.err(2589):     at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:449)
12-01 12:24:22.069: W/System.err(2589):     at com.tyczj.bowling.Bowlers.tables(Bowlers.java:716)
12-01 12:24:22.069: W/System.err(2589):     at com.tyczj.bowling.Bowlers.run(Bowlers.java:859)
12-01 12:24:22.079: W/System.err(2589):     at java.lang.Thread.run(Thread.java:856)

was there something else I was suppose to do? I was using this example as reference

tyczj
  • 71,600
  • 54
  • 194
  • 296

1 Answers1

0

While Google Cloud Endpoints is in the trusted tester phase, you will need to have your application whitelisted before you can deploy it. To be whitelisted, you must apply to the trusted tester program and be accepted. Currently, we've slowed the rate of acceptance, so you may not be accepted, or may be accepted after a long delay.

Local development, as you've seen, should work fine.

Dan Holevoet
  • 9,183
  • 1
  • 33
  • 49
  • In the mean time is there any other solution that app engine offers where I can store my apps data in the mean time? All I need to do for right now is have all the users pull from a central database a list of items when they start the app each time and update the local database accordingly. Or is `cloud endpoints` the only option right now? – tyczj Dec 03 '12 at 19:38
  • You can replicate most of the functionality of Endpoints by writing it yourself, but it requires significantly more effort. I'd recommend waiting for Endpoints' release. – Dan Holevoet Dec 03 '12 at 19:42