I am trying to connect to a remote mySQL database which is hosted on my own system means the localhost. I am pasting the code for the whole class here so please see if there is a bug in it. The problem that I am facing is mentioned below the class code.
Code for the class goes here:
public class Login extends Activity implements OnClickListener {
private EditText user, pass;
private Button mSubmit, mRegister;
// Progress Dialog
private ProgressDialog pDialog;
// JSON parser class
JSONParser jsonParser = new JSONParser();
private static final String LOGIN_URL="http://127.0.0.1:8080/webservice/login.php";
private static final String TAG_SUCCESS = "success";
private static final String TAG_MESSAGE = "message";
#Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.login);
// setup input fields
user = (EditText) findViewById(R.id.username);
pass = (EditText) findViewById(R.id.password);
// setup buttons
mSubmit = (Button) findViewById(R.id.login);
mRegister = (Button) findViewById(R.id.register);
// register listeners
mSubmit.setOnClickListener(this);
mRegister.setOnClickListener(this);
}
#Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
case R.id.login:
new AttemptLogin().execute();
break;
case R.id.register:
Intent i = new Intent(this, Register.class);
startActivity(i);
break;
default:
break;
}
}
class AttemptLogin extends AsyncTask<String, String, String> {
#Override
protected void onPreExecute() {
super.onPreExecute();
pDialog = new ProgressDialog(Login.this);
pDialog.setMessage("Attempting login...");
pDialog.setIndeterminate(false);
pDialog.setCancelable(true);
pDialog.show();
}
#Override
protected String doInBackground(String... args) {
// TODO Auto-generated method stub
// Check for success tag
int success;
String username = user.getText().toString();
String password = pass.getText().toString();
try {
// Building Parameters
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("username", username));
params.add(new BasicNameValuePair("password", password));
Log.d("request!", "starting");
// getting product details by making HTTP request
JSONObject json = jsonParser.makeHttpRequest(LOGIN_URL, "POST",
params);
// check your log for json response
Log.d("Login attempt", "login attempt");
// json success tag
success = json.getInt(TAG_SUCCESS);
if (success == 1) {
Log.d("Login Successful!", json.toString());
// save user data
SharedPreferences sp = PreferenceManager
.getDefaultSharedPreferences(Login.this);
Editor edit = sp.edit();
edit.putString("username", username);
edit.commit();
Intent i = new Intent(Login.this, ReadComments.class);
finish();
startActivity(i);
return json.getString(TAG_MESSAGE);
} else {
Log.d("Login Failure!", json.getString(TAG_MESSAGE));
return json.getString(TAG_MESSAGE);
}
} catch (JSONException e) {
e.printStackTrace();
}
return null;
}
protected void onPostExecute(String file_url) {
// dismiss the dialog once product deleted
pDialog.dismiss();
if (file_url != null) {
Toast.makeText(Login.this, file_url, Toast.LENGTH_LONG).show();
}
}
}
}
The application crashes after showing the "Attempting log in" dialog with the message "Database is closed". I am including the information from catlog here so give it a look if it helps.
06-17 03:19:18.309: D/dalvikvm(2019): GC_FOR_ALLOC freed 161K, 8% free 2971K/3224K, paused 35ms, total 49ms
06-17 03:19:18.429: D/request!(2019): starting
06-17 03:19:18.459: I/Choreographer(2019): Skipped 36 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.609: I/Choreographer(2019): Skipped 129 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.669: I/Choreographer(2019): Skipped 43 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.739: I/Choreographer(380): Skipped 61 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.819: I/Choreographer(380): Skipped 37 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.909: I/Choreographer(2019): Skipped 164 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.929: I/Choreographer(380): Skipped 36 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.939: I/Choreographer(2019): Skipped 33 frames! The application may be doing too much work on its main thread.
06-17 03:19:19.039: I/Choreographer(2019): Skipped 30 frames! The application may be doing too much work on its main thread.
06-17 03:19:19.299: I/Choreographer(2019): Skipped 32 frames! The application may be doing too much work on its main thread.
06-17 03:19:19.399: I/Choreographer(2019): Skipped 56 frames! The application may be doing too much work on its main thread.
06-17 03:19:20.819: I/Choreographer(2019): Skipped 42 frames! The application may be doing too much work on its main thread.
06-17 03:19:20.889: I/Choreographer(2019): Skipped 32 frames! The application may be doing too much work on its main thread.
06-17 03:19:21.749: I/Choreographer(2019): Skipped 37 frames! The application may be doing too much work on its main thread.
06-17 03:19:21.879: I/Choreographer(2019): Skipped 48 frames! The application may be doing too much work on its main thread.
06-17 03:19:22.449: I/Choreographer(2019): Skipped 52 frames! The application may be doing too much work on its main thread.
06-17 03:19:22.749: W/System.err(2019): org.apache.http.conn.HttpHostConnectException: Connection to http://127.0.0.1:8080 refused
06-17 03:19:22.779: I/Choreographer(2019): Skipped 55 frames! The application may be doing too much work on its main thread.
06-17 03:19:22.989: W/System.err(2019): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:183)
06-17 03:19:22.989: W/System.err(2019): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
06-17 03:19:22.989: W/System.err(2019): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
06-17 03:19:23.029: I/Choreographer(2019): Skipped 43 frames! The application may be doing too much work on its main thread.
06-17 03:19:23.279: W/System.err(2019): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
06-17 03:19:23.279: W/System.err(2019): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
06-17 03:19:23.279: W/System.err(2019): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
06-17 03:19:23.279: W/System.err(2019): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
06-17 03:19:23.289: W/System.err(2019): at com.example.mysqltest.JSONParser.makeHttpRequest(JSONParser.java:110)
06-17 03:19:23.289: W/System.err(2019): at com.example.mysqltest.Login$AttemptLogin.doInBackground(Login.java:121)
06-17 03:19:23.289: W/System.err(2019): at com.example.mysqltest.Login$AttemptLogin.doInBackground(Login.java:1)
06-17 03:19:23.289: W/System.err(2019): at android.os.AsyncTask$2.call(AsyncTask.java:288)
06-17 03:19:23.289: W/System.err(2019): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-17 03:19:23.289: W/System.err(2019): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
06-17 03:19:23.289: W/System.err(2019): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
06-17 03:19:23.289: W/System.err(2019): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
06-17 03:19:23.289: W/System.err(2019): at java.lang.Thread.run(Thread.java:841)
06-17 03:19:23.319: I/Choreographer(2019): Skipped 42 frames! The application may be doing too much work on its main thread.
06-17 03:19:23.739: W/System.err(2019): Caused by: java.net.ConnectException: failed to connect to /127.0.0.1 (port 8080): connect failed: ECONNREFUSED (Connection refused)
06-17 03:19:23.739: W/System.err(2019): at libcore.io.IoBridge.connect(IoBridge.java:114)
06-17 03:19:23.739: W/System.err(2019): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
06-17 03:19:23.759: W/System.err(2019): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)
06-17 03:19:23.769: W/System.err(2019): at java.net.Socket.connect(Socket.java:843)
06-17 03:19:23.769: W/System.err(2019): at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119)
06-17 03:19:23.769: W/System.err(2019): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:144)
06-17 03:19:23.769: W/System.err(2019): ... 15 more
06-17 03:19:23.769: W/System.err(2019): Caused by: libcore.io.ErrnoException: connect failed: ECONNREFUSED (Connection refused)
06-17 03:19:23.829: I/Choreographer(2019): Skipped 84 frames! The application may be doing too much work on its main thread.
06-17 03:19:23.839: W/System.err(2019): at libcore.io.Posix.connect(Native Method)
06-17 03:19:23.839: W/System.err(2019): at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:85)
06-17 03:19:23.849: W/System.err(2019): at libcore.io.IoBridge.connectErrno(IoBridge.java:127)
06-17 03:19:23.849: W/System.err(2019): at libcore.io.IoBridge.connect(IoBridge.java:112)
06-17 03:19:23.849: W/System.err(2019): ... 20 more
06-17 03:19:23.849: E/Buffer Error(2019): Error converting result java.lang.NullPointerException: lock == null
06-17 03:19:23.879: I/Choreographer(2019): Skipped 49 frames! The application may be doing too much work on its main thread.
06-17 03:19:24.439: I/Choreographer(2019): Skipped 31 frames! The application may be doing too much work on its main thread.
06-17 03:19:24.499: I/Choreographer(2019): Skipped 34 frames! The application may be doing too much work on its main thread.
06-17 03:19:24.569: E/JSON Parser(2019): Error parsing data org.json.JSONException: End of input at character 0 of
06-17 03:19:24.569: D/Login attempt(2019): login attempt
06-17 03:19:25.019: W/dalvikvm(2019): threadid=11: thread exiting with uncaught exception (group=0xb4a8aba8)
06-17 03:19:25.199: E/AndroidRuntime(2019): FATAL EXCEPTION: AsyncTask #1
06-17 03:19:25.199: E/AndroidRuntime(2019): Process: com.example.mysqltest, PID: 2019
06-17 03:19:25.199: E/AndroidRuntime(2019): java.lang.RuntimeException: An error occured while executing doInBackground()
06-17 03:19:25.199: E/AndroidRuntime(2019): at android.os.AsyncTask$3.done(AsyncTask.java:300)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.util.concurrent.FutureTask.run(FutureTask.java:242)
06-17 03:19:25.199: E/AndroidRuntime(2019): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.lang.Thread.run(Thread.java:841)
06-17 03:19:25.199: E/AndroidRuntime(2019): Caused by: java.lang.NullPointerException
06-17 03:19:25.199: E/AndroidRuntime(2019): at com.example.mysqltest.Login$AttemptLogin.doInBackground(Login.java:128)
06-17 03:19:25.199: E/AndroidRuntime(2019): at com.example.mysqltest.Login$AttemptLogin.doInBackground(Login.java:1)
06-17 03:19:25.199: E/AndroidRuntime(2019): at android.os.AsyncTask$2.call(AsyncTask.java:288)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-17 03:19:25.199: E/AndroidRuntime(2019): ... 4 more
06-17 03:19:25.229: I/Choreographer(2019): Skipped 35 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.279: W/ActivityManager(380): Force finishing activity com.example.mysqltest/.Login
06-17 03:19:25.309: D/gralloc(51): Registering a buffer in the process that created it. This may cause memory ordering problems.
06-17 03:19:25.309: E/libEGL(51): called unimplemented OpenGL ES API
06-17 03:19:25.309: E/libEGL(51): called unimplemented OpenGL ES API
06-17 03:19:25.319: E/libEGL(51): called unimplemented OpenGL ES API
06-17 03:19:25.319: E/libEGL(51): called unimplemented OpenGL ES API
06-17 03:19:25.319: E/SurfaceFlinger(51): glCheckFramebufferStatusOES error 886920962
06-17 03:19:25.319: E/SurfaceFlinger(51): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
06-17 03:19:25.319: E/libEGL(51): called unimplemented OpenGL ES API
06-17 03:19:25.319: E/libEGL(51): called unimplemented OpenGL ES API
06-17 03:19:25.329: I/Choreographer(2019): Skipped 91 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.359: W/WindowManager(380): Screenshot failure taking screenshot for (123x221) to layer 21015
06-17 03:19:25.589: I/Choreographer(380): Skipped 92 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.599: I/Choreographer(2019): Skipped 203 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.669: I/Choreographer(2019): Skipped 65 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.719: I/Choreographer(380): Skipped 115 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.779: I/Choreographer(2019): Skipped 92 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.839: I/Choreographer(542): Skipped 288 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.869: I/Choreographer(380): Skipped 35 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.939: I/Choreographer(380): Skipped 45 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.939: I/Choreographer(2019): Skipped 41 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.069: I/Choreographer(380): Skipped 124 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.119: I/Choreographer(380): Skipped 41 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.129: I/Choreographer(2019): Skipped 35 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.169: I/Choreographer(2019): Skipped 30 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.259: I/Choreographer(380): Skipped 35 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.269: I/Choreographer(2019): Skipped 89 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.309: I/Choreographer(380): Skipped 35 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.319: I/Choreographer(2019): Skipped 46 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.369: I/Choreographer(380): Skipped 46 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.379: I/Choreographer(2019): Skipped 54 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.469: I/Choreographer(2019): Skipped 80 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.499: I/Choreographer(380): Skipped 115 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.589: I/Choreographer(2019): Skipped 116 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.619: I/Choreographer(380): Skipped 80 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.689: I/Choreographer(380): Skipped 37 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.849: I/Choreographer(380): Skipped 77 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.939: I/Choreographer(380): Skipped 43 frames! The application may be doing too much work on its main thread.
06-17 03:19:27.009: I/Choreographer(380): Skipped 41 frames! The application may be doing too much work on its main thread.
06-17 03:19:27.169: I/Choreographer(380): Skipped 36 frames! The application may be doing too much work on its main thread.
06-17 03:19:27.349: E/WindowManager(2019): android.view.WindowLeaked: Activity com.example.mysqltest.Login has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{b4d95578 V.E..... R.....ID 0,0-228,72} that was originally added here
06-17 03:19:27.349: E/WindowManager(2019): at android.view.ViewRootImpl.<init>(ViewRootImpl.java:348)
06-17 03:19:27.349: E/WindowManager(2019): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:248)
06-17 03:19:27.349: E/WindowManager(2019): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
06-17 03:19:27.349: E/WindowManager(2019): at android.app.Dialog.show(Dialog.java:286)
06-17 03:19:27.349: E/WindowManager(2019): at com.example.mysqltest.Login$AttemptLogin.onPreExecute(Login.java:103)
06-17 03:19:27.349: E/WindowManager(2019): at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:587)
06-17 03:19:27.349: E/WindowManager(2019): at android.os.AsyncTask.execute(AsyncTask.java:535)
06-17 03:19:27.349: E/WindowManager(2019): at com.example.mysqltest.Login.onClick(Login.java:82)
06-17 03:19:27.349: E/WindowManager(2019): at android.view.View.performClick(View.java:4438)
06-17 03:19:27.349: E/WindowManager(2019): at android.view.View$PerformClick.run(View.java:18422)
06-17 03:19:27.349: E/WindowManager(2019): at android.os.Handler.handleCallback(Handler.java:733)
06-17 03:19:27.349: E/WindowManager(2019): at android.os.Handler.dispatchMessage(Handler.java:95)
06-17 03:19:27.349: E/WindowManager(2019): at android.os.Looper.loop(Looper.java:136)
06-17 03:19:27.349: E/WindowManager(2019): at android.app.ActivityThread.main(ActivityThread.java:5017)
06-17 03:19:27.349: E/WindowManager(2019): at java.lang.reflect.Method.invokeNative(Native Method)
06-17 03:19:27.349: E/WindowManager(2019): at java.lang.reflect.Method.invoke(Method.java:515)
06-17 03:19:27.349: E/WindowManager(2019): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
06-17 03:19:27.349: E/WindowManager(2019): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
06-17 03:19:27.349: E/WindowManager(2019): at dalvik.system.NativeStart.main(Native Method)
06-17 03:19:27.359: I/Choreographer(2019): Skipped 273 frames! The application may be doing too much work on its main thread.
06-17 03:19:27.449: I/Choreographer(2019): Skipped 85 frames! The application may be doing too much work on its main thread.
06-17 03:20:10.919: D/LightsService(380): Excessive delay setting light: 89ms
Please note that the about catlog information is after I press the login button.
Please, check mysql-service is running or not.
If no then service is stop, then check space available at harddisk.
If space is not availbale then try to increase free space or increase
hard disk space, then restart mysql service.
Related
I am working on a project which integrated
com.facebook.login.widget.LoginButton
.I put it in a fragment and worked fine in past weeks. But suddenly, from yesterday, it's not working. I mean, I could not add this fragment just because the facebook loginbutton is there. I promise that I haven't change either the XML file or the code or logic.
I doubt if it's because the APP_ID expired or something, so I added another app in the facebook developer console, and changed all the configurations. However, it doesn't help.
I've attached the exception stack here:
06-17 11:14:46.056: E/AndroidRuntime(20800): java.lang.NullPointerException: Argument 'context' cannot be null
06-17 11:14:46.056: E/AndroidRuntime(20800): at com.facebook.internal.Validate.notNull(Validate.java:76)
06-17 11:14:46.056: E/AndroidRuntime(20800): at com.facebook.internal.Utility.getMetadataApplicationId(Utility.java:594)
06-17 11:14:46.056: E/AndroidRuntime(20800): at com.facebook.appevents.AppEventsLogger.<init>(AppEventsLogger.java:757)
06-17 11:14:46.056: E/AndroidRuntime(20800): at com.facebook.appevents.AppEventsLogger.<init>(AppEventsLogger.java:732)
06-17 11:14:46.056: E/AndroidRuntime(20800): at com.facebook.appevents.AppEventsLogger.newLogger(AppEventsLogger.java:400)
06-17 11:14:46.056: E/AndroidRuntime(20800): at com.facebook.FacebookButtonBase.logButtonCreated(FacebookButtonBase.java:225)
06-17 11:14:46.056: E/AndroidRuntime(20800): at com.facebook.FacebookButtonBase.onAttachedToWindow(FacebookButtonBase.java:136)
06-17 11:14:46.056: E/AndroidRuntime(20800): at com.facebook.login.widget.LoginButton.onAttachedToWindow(LoginButton.java:452)
06-17 11:14:46.056: E/AndroidRuntime(20800): at android.view.View.dispatchAttachedToWindow(View.java:14514)
06-17 11:14:46.056: E/AndroidRuntime(20800): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2843)
06-17 11:14:46.056: E/AndroidRuntime(20800): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2843)
06-17 11:14:46.056: E/AndroidRuntime(20800): at android.view.ViewGroup.addViewInner(ViewGroup.java:4348)
06-17 11:14:46.056: E/AndroidRuntime(20800): at android.view.ViewGroup.addView(ViewGroup.java:4145)
06-17 11:14:46.056: E/AndroidRuntime(20800): at android.view.ViewGroup.addView(ViewGroup.java:4086)
06-17 11:14:46.056: E/AndroidRuntime(20800): at android.view.ViewGroup.addView(ViewGroup.java:4059)
Expecting some hints. Appreciate ahead.
BTW, I followed the Quick Start to configure, and it WAS working well.
I am using IBM MobileFirst 7.0 for creating a hybrid app. We recently deployed the .wlapp file for android without changing the previous app version. On successful deployment, when I run the app, I get the the following alert message -
"Newer web resources are available. Would you like to download them now?(file size is 86KB)"
On clicking the update button, the unpacking progress bar appears and fills up. But at the end of it I get the message- "Update failed. Direct update failure."
I have tried updating the app on mobile internet and WiFi but the issue still persists.Previously the direct update feature was working fine.
Logcat logs:
06-17 18:44:14.099: D/dalvikvm(17948): GC_FOR_ALLOC freed 485K, 62% free 4275K/11180K, paused 14ms, total 18ms
06-17 18:44:14.109: D/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): WLDirectUpdateDownloader.downloadZipFile in WLDirectUpdateDownloader.java:143 :: 7772 bytes are already available.
06-17 18:44:14.149: D/dalvikvm(17948): GC_FOR_ALLOC freed 553K, 63% free 4218K/11180K, paused 10ms, total 10ms
06-17 18:44:14.149: W/HardwareRenderer(17948): Attempting to initialize hardware acceleration outside of the main thread, aborting
06-17 18:44:14.159: W/PluginManager(17948): THREAD WARNING: exec() call to WLDirectUpdatePlugin.showProgressDialog blocked the main thread for 95ms. Plugin should use CordovaInterface.getThreadPool().
06-17 18:44:14.219: I/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): WLDirectUpdateDownloader.validateZipFileIntegrity in WLDirectUpdateDownloader.java:113 :: Direct update authenticity public key not provided, direct update authenticity check disabled
06-17 18:44:14.229: D/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): WLDirectUpdateDownloader.extractZipFile in WLDirectUpdateDownloader.java:265 :: Start copy files to local storage from updated zip file...
06-17 18:44:14.229: D/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): WLDirectUpdateDownloader.extractZipFile in WLDirectUpdateDownloader.java:266 :: Size of zip file is 7772
06-17 18:44:14.459: D/dalvikvm(17948): GC_FOR_ALLOC freed 443K, 62% free 4280K/11180K, paused 15ms, total 15ms
06-17 18:44:14.459: D/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): WLDirectUpdateDownloader.handleDeltaUpdate in WLDirectUpdateDownloader.java:392 :: Differential Direct Update - delta package detected
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): WLDirectUpdateDownloader.handleDeltaUpdate in WLDirectUpdateDownloader.java:410 :: Can't copy web resources:
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): java.io.FileNotFoundException: www/default/index.html~
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at android.content.res.AssetManager.openAsset(Native Method)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at android.content.res.AssetManager.open(AssetManager.java:316)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at android.content.res.AssetManager.open(AssetManager.java:290)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at com.worklight.androidgap.directupdate.WLDirectUpdateDownloader.copyListFromAssets(WLDirectUpdateDownloader.java:472)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at com.worklight.androidgap.directupdate.WLDirectUpdateDownloader.handleDeltaUpdate(WLDirectUpdateDownloader.java:406)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at com.worklight.androidgap.directupdate.WLDirectUpdateDownloader.extractZipFile(WLDirectUpdateDownloader.java:352)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at com.worklight.androidgap.directupdate.WLDirectUpdateDownloader.startDirectUpdate(WLDirectUpdateDownloader.java:96)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at com.worklight.androidgap.directupdate.WLDirectUpdateDownloader.doInBackground(WLDirectUpdateDownloader.java:83)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at com.worklight.androidgap.directupdate.WLDirectUpdateDownloader.doInBackground(WLDirectUpdateDownloader.java:49)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at android.os.AsyncTask$2.call(AsyncTask.java:288)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at java.lang.Thread.run(Thread.java:841)
06-17 18:44:15.499: W/PluginManager(17948): THREAD WARNING: exec() call to WLDirectUpdatePlugin.hideProgressDialog blocked the main thread for 1007ms. Plugin should use CordovaInterface.getThreadPool().
The recommendation is to update to the latest available patch level (iFix) from IBM Fix Central, and re-build the application (make sure to first up the version in the descriptor.xml and release a new version to the app stores, to account for changes in the native resources of the application).
I am trying to make a simple renderer with OpenGL2.0, made up only of a main activity, surface view, and renderer file. Whenever I run it on an avd, the screen turns black and says the program has encountered a problem. Here is the logcat
08-04 03:55:59.722: D/libEGL(6287): Emulator without GPU support detected. Fallback to software renderer.
08-04 03:55:59.821: I/Choreographer(6287): Skipped 292 frames! The application may be doing too much work on its main thread.
08-04 03:56:00.042: D/libEGL(6287): loaded /system/lib/egl/libGLES_android.so
08-04 03:56:00.801: D/gralloc_goldfish(6287): Emulator without GPU emulation detected.
08-04 03:56:00.835: W/dalvikvm(6287): threadid=11: thread exiting with uncaught exception (group=0x40a71930)
08-04 03:56:00.881: E/AndroidRuntime(6287): FATAL EXCEPTION: GLThread 102
08-04 03:56:00.881: E/AndroidRuntime(6287): java.lang.IllegalArgumentException: No configs match configSpec
08-04 03:56:00.881: E/AndroidRuntime(6287): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:863)
08-04 03:56:00.881: E/AndroidRuntime(6287): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1024)
08-04 03:56:00.881: E/AndroidRuntime(6287): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1401)
08-04 03:56:00.881: E/AndroidRuntime(6287): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
08-04 03:56:02.155: I/Choreographer(6287): Skipped 121 frames! The application may be doing too much work on its main thread.
08-04 03:56:07.941: I/Process(6287): Sending signal. PID: 6287 SIG: 9
Can the problem be recognized from this or should I provide code as well?
I have been trying to run the example named buttonclicker2000:
I set up everything and it works on a real device.
But on the emulator 4.2.2 when trying to sign in i get an unknown error.
here is the logcat
Can anyone help me out here?
07-17 20:40:41.293: E/SurfaceFlinger(37): ro.sf.lcd_density must be defined as a build property
07-17 20:40:50.233: E/SurfaceFlinger(37): ro.sf.lcd_density must be defined as a build property
07-17 20:40:51.743: E/SurfaceFlinger(37): ro.sf.lcd_density must be defined as a build property
07-17 20:40:51.873: E/SurfaceFlinger(37): ro.sf.lcd_density must be defined as a build property
07-17 20:41:03.104: E/Volley(748): [91] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/me
07-17 20:41:03.294: I/Choreographer(1780): Skipped 38 frames! The application may be doing too much work on its main thread.
07-17 20:41:03.384: I/Choreographer(1348): Skipped 54 frames! The application may be doing too much work on its main thread.
07-17 20:41:03.554: E/Volley(748): [91] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/me
07-17 20:41:03.614: E/SignInIntentService(748): Access Not Configured
07-17 20:41:03.614: E/SignInIntentService(748): aol
07-17 20:41:03.614: E/SignInIntentService(748): at ajy.a(SourceFile:108)
07-17 20:41:03.614: E/SignInIntentService(748): at abm.a(SourceFile:213)
07-17 20:41:03.614: E/SignInIntentService(748): at abm.a(SourceFile:194)
07-17 20:41:03.614: E/SignInIntentService(748): at aav.a(SourceFile:486)
07-17 20:41:03.614: E/SignInIntentService(748): at aqu.a(SourceFile:221)
07-17 20:41:03.614: E/SignInIntentService(748): at com.google.android.gms.games.service.GamesSignInIntentService.onHandleIntent(SourceFile:343)
07-17 20:41:03.614: E/SignInIntentService(748): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
07-17 20:41:03.614: E/SignInIntentService(748): at android.os.Handler.dispatchMessage(Handler.java:99)
07-17 20:41:03.614: E/SignInIntentService(748): at android.os.Looper.loop(Looper.java:137)
07-17 20:41:03.614: E/SignInIntentService(748): at android.os.HandlerThread.run(HandlerThread.java:60)
07-17 20:41:04.594: I/Choreographer(580): Skipped 76 frames! The application may be doing too much work on its main thread.
07-17 20:41:05.063: D/ButtonClicker2000(1780): Sign-in failed.
07-17 20:41:05.083: I/Choreographer(1780): Skipped 189 frames! The application may be doing too much work on its main thread.
07-17 20:41:05.443: E/SurfaceFlinger(37): ro.sf.lcd_density must be defined as a build property
07-17 20:41:05.613: I/Choreographer(1780): Skipped 127 frames! The application may be doing too much work on its main thread.
07-17 20:41:06.853: D/dalvikvm(1348): GC_EXPLICIT freed 83K, 36% free 2605K/4040K, paused 5ms+8ms, total 701ms
07-17 20:41:06.863: E/StrictMode(1348): class com.google.android.gms.games.ui.signin.SignInActivity; instances=2; limit=1
07-17 20:41:06.863: E/StrictMode(1348): android.os.StrictMode$InstanceCountViolation: class com.google.android.gms.games.ui.signin.SignInActivity; instances=2; limit=1
07-17 20:41:06.863: E/StrictMode(1348): at android.os.StrictMode.setClassInstanceLimit(StrictMode.java:1)
EDIT
Full logcat, signout from all other devices from everywhere
07-17 22:01:00.997: I/ActivityManager(296): START u0 {cmp=com.google.android.gms/.games.ui.signin.SignInActivity (has extras)} from pid -1
07-17 22:01:01.007: W/WindowManager(296): Failure taking screenshot for (246x410) to layer 21010
07-17 22:01:01.187: E/SurfaceFlinger(37): ro.sf.lcd_density must be defined as a build property
07-17 22:01:01.367: I/Choreographer(1266): Skipped 86 frames! The application may be doing too much work on its main thread.
07-17 22:01:01.737: I/Choreographer(1283): Skipped 45 frames! The application may be doing too much work on its main thread.
07-17 22:01:01.937: E/SurfaceFlinger(37): ro.sf.lcd_density must be defined as a build property
07-17 22:01:01.948: I/Choreographer(296): Skipped 78 frames! The application may be doing too much work on its main thread.
07-17 22:01:02.007: I/Choreographer(296): Skipped 41 frames! The application may be doing too much work on its main thread.
07-17 22:01:02.018: I/Choreographer(1283): Skipped 44 frames! The application may be doing too much work on its main thread.
07-17 22:01:02.547: I/Choreographer(296): Skipped 44 frames! The application may be doing too much work on its main thread.
07-17 22:01:02.557: I/ActivityManager(296): Displayed com.google.android.gms/.games.ui.signin.SignInActivity: +1s313ms
07-17 22:01:02.627: I/Choreographer(1283): Skipped 95 frames! The application may be doing too much work on its main thread.
07-17 22:01:02.687: I/Choreographer(1266): Skipped 44 frames! The application may be doing too much work on its main thread.
07-17 22:01:03.237: I/Choreographer(1283): Skipped 65 frames! The application may be doing too much work on its main thread.
07-17 22:01:03.287: I/Choreographer(1266): Skipped 67 frames! The application may be doing too much work on its main thread.
07-17 22:01:03.627: I/Choreographer(1266): Skipped 87 frames! The application may be doing too much work on its main thread.
07-17 22:01:03.817: I/Choreographer(1266): Skipped 48 frames! The application may be doing too much work on its main thread.
07-17 22:01:04.057: I/Choreographer(1266): Skipped 37 frames! The application may be doing too much work on its main thread.
07-17 22:01:04.107: I/Choreographer(1283): Skipped 51 frames! The application may be doing too much work on its main thread.
07-17 22:01:04.237: I/Choreographer(1266): Skipped 41 frames! The application may be doing too much work on its main thread.
07-17 22:01:04.267: I/Choreographer(1283): Skipped 40 frames! The application may be doing too much work on its main thread.
07-17 22:01:04.417: I/Choreographer(1266): Skipped 47 frames! The application may be doing too much work on its main thread.
07-17 22:01:04.507: I/Choreographer(1283): Skipped 41 frames! The application may be doing too much work on its main thread.
07-17 22:01:04.597: I/Choreographer(1266): Skipped 43 frames! The application may be doing too much work on its main thread.
07-17 22:01:04.727: I/Choreographer(1283): Skipped 55 frames! The application may be doing too much work on its main thread.
07-17 22:01:04.867: I/Choreographer(1283): Skipped 35 frames! The application may be doing too much work on its main thread.
07-17 22:01:05.058: I/Choreographer(1283): Skipped 38 frames! The application may be doing too much work on its main thread.
07-17 22:01:05.197: I/Choreographer(1283): Skipped 35 frames! The application may be doing too much work on its main thread.
07-17 22:01:05.217: I/Choreographer(1266): Skipped 34 frames! The application may be doing too much work on its main thread.
07-17 22:01:05.377: I/Choreographer(1283): Skipped 49 frames! The application may be doing too much work on its main thread.
07-17 22:01:05.547: I/Choreographer(1283): Skipped 40 frames! The application may be doing too much work on its main thread.
07-17 22:01:05.697: D/dalvikvm(296): GC_CONCURRENT freed 683K, 56% free 5765K/13000K, paused 59ms+182ms, total 1675ms
07-17 22:01:05.717: I/Choreographer(1283): Skipped 44 frames! The application may be doing too much work on its main thread.
07-17 22:01:05.807: I/Choreographer(1266): Skipped 30 frames! The application may be doing too much work on its main thread.
07-17 22:01:05.877: I/Choreographer(1283): Skipped 40 frames! The application may be doing too much work on its main thread.
07-17 22:01:05.947: I/Choreographer(1266): Skipped 32 frames! The application may be doing too much work on its main thread.
07-17 22:01:06.017: I/Choreographer(1283): Skipped 35 frames! The application may be doing too much work on its main thread.
07-17 22:01:06.087: I/Choreographer(1266): Skipped 33 frames! The application may be doing too much work on its main thread.
07-17 22:01:06.177: I/Choreographer(1283): Skipped 40 frames! The application may be doing too much work on its main thread.
07-17 22:01:06.317: I/Choreographer(1283): Skipped 36 frames! The application may be doing too much work on its main thread.
07-17 22:01:07.048: I/Choreographer(1283): Skipped 35 frames! The application may be doing too much work on its main thread.
07-17 22:01:07.307: I/Choreographer(1283): Skipped 39 frames! The application may be doing too much work on its main thread.
07-17 22:01:07.397: I/Choreographer(1266): Skipped 32 frames! The application may be doing too much work on its main thread.
07-17 22:01:07.527: I/Choreographer(1283): Skipped 53 frames! The application may be doing too much work on its main thread.
07-17 22:01:07.547: I/Choreographer(1266): Skipped 32 frames! The application may be doing too much work on its main thread.
07-17 22:01:07.697: I/Choreographer(1266): Skipped 42 frames! The application may be doing too much work on its main thread.
07-17 22:01:07.728: I/Choreographer(1283): Skipped 51 frames! The application may be doing too much work on its main thread.
07-17 22:01:07.837: I/Choreographer(1266): Skipped 40 frames! The application may be doing too much work on its main thread.
07-17 22:01:07.877: D/dalvikvm(716): GC_CONCURRENT freed 333K, 12% free 3432K/3892K, paused 8ms+145ms, total 589ms
07-17 22:01:07.948: I/Choreographer(1283): Skipped 55 frames! The application may be doing too much work on its main thread.
07-17 22:01:07.987: I/Choreographer(1266): Skipped 37 frames! The application may be doing too much work on its main thread.
07-17 22:01:08.118: I/Choreographer(1283): Skipped 43 frames! The application may be doing too much work on its main thread.
07-17 22:01:08.327: I/Choreographer(1283): Skipped 53 frames! The application may be doing too much work on its main thread.
07-17 22:01:08.627: I/Choreographer(1266): Skipped 41 frames! The application may be doing too much work on its main thread.
07-17 22:01:08.698: I/Choreographer(1283): Skipped 39 frames! The application may be doing too much work on its main thread.
07-17 22:01:08.847: I/Choreographer(1266): Skipped 55 frames! The application may be doing too much work on its main thread.
07-17 22:01:08.987: I/Choreographer(1266): Skipped 38 frames! The application may be doing too much work on its main thread.
07-17 22:01:09.127: I/Choreographer(1266): Skipped 45 frames! The application may be doing too much work on its main thread.
07-17 22:01:09.237: I/Choreographer(1283): Skipped 49 frames! The application may be doing too much work on its main thread.
07-17 22:01:09.297: I/Choreographer(1266): Skipped 38 frames! The application may be doing too much work on its main thread.
07-17 22:01:09.397: I/Choreographer(1283): Skipped 41 frames! The application may be doing too much work on its main thread.
07-17 22:01:09.427: E/Volley(716): [76] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/me
07-17 22:01:09.447: I/Choreographer(1266): Skipped 32 frames! The application may be doing too much work on its main thread.
07-17 22:01:09.537: I/Choreographer(1283): Skipped 36 frames! The application may be doing too much work on its main thread.
07-17 22:01:09.687: E/Volley(716): [76] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/me
07-17 22:01:09.777: E/SignInIntentService(716): Access Not Configured
07-17 22:01:09.777: E/SignInIntentService(716): aol
07-17 22:01:09.777: E/SignInIntentService(716): at ajy.a(SourceFile:108)
07-17 22:01:09.777: E/SignInIntentService(716): at abm.a(SourceFile:213)
07-17 22:01:09.777: E/SignInIntentService(716): at abm.a(SourceFile:194)
07-17 22:01:09.777: E/SignInIntentService(716): at aav.a(SourceFile:486)
07-17 22:01:09.777: E/SignInIntentService(716): at aqu.a(SourceFile:221)
07-17 22:01:09.777: E/SignInIntentService(716): at com.google.android.gms.games.service.GamesSignInIntentService.onHandleIntent(SourceFile:343)
07-17 22:01:09.777: E/SignInIntentService(716): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
07-17 22:01:09.777: E/SignInIntentService(716): at android.os.Handler.dispatchMessage(Handler.java:99)
07-17 22:01:09.777: E/SignInIntentService(716): at android.os.Looper.loop(Looper.java:137)
07-17 22:01:09.777: E/SignInIntentService(716): at android.os.HandlerThread.run(HandlerThread.java:60)
07-17 22:01:09.917: I/Choreographer(1266): Skipped 44 frames! The application may be doing too much work on its main thread.
07-17 22:01:09.967: I/Choreographer(1283): Skipped 55 frames! The application may be doing too much work on its main thread.
07-17 22:01:10.107: I/Choreographer(1266): Skipped 44 frames! The application may be doing too much work on its main thread.
07-17 22:01:10.187: E/LoadSelfFragment(1283): Unable to sign in - application does not have a registered client ID
07-17 22:01:10.197: W/WindowManager(296): Failure taking screenshot for (246x410) to layer 21020
07-17 22:01:10.227: I/Choreographer(1283): Skipped 65 frames! The application may be doing too much work on its main thread.
07-17 22:01:10.267: I/Choreographer(1266): Skipped 40 frames! The application may be doing too much work on its main thread.
07-17 22:01:10.408: I/Choreographer(1266): Skipped 38 frames! The application may be doing too much work on its main thread.
07-17 22:01:10.537: I/Choreographer(1266): Skipped 39 frames! The application may be doing too much work on its main thread.
07-17 22:01:10.937: I/Choreographer(1283): Skipped 184 frames! The application may be doing too much work on its main thread.
07-17 22:01:10.947: I/Choreographer(689): Skipped 127 frames! The application may be doing too much work on its main thread.
07-17 22:01:11.087: I/Choreographer(1283): Skipped 31 frames! The application may be doing too much work on its main thread.
07-17 22:01:11.497: D/dalvikvm(1266): GC_CONCURRENT freed 425K, 12% free 4125K/4676K, paused 7ms+143ms, total 651ms
07-17 22:01:11.788: D/ButtonClicker2000(1266): Sign-in failed.
07-17 22:01:11.837: I/Choreographer(1266): Skipped 333 frames! The application may be doing too much work on its main thread.
07-17 22:01:12.057: E/SurfaceFlinger(37): ro.sf.lcd_density must be defined as a build property
07-17 22:01:12.197: I/Choreographer(1266): Skipped 79 frames! The application may be doing too much work on its main thread.
07-17 22:01:13.017: D/dalvikvm(1283): GC_EXPLICIT freed 65K, 13% free 2535K/2904K, paused 5ms+154ms, total 442ms
07-17 22:01:13.067: E/StrictMode(1283): class com.google.android.gms.games.ui.signin.SignInActivity; instances=2; limit=1
07-17 22:01:13.067: E/StrictMode(1283): android.os.StrictMode$InstanceCountViolation: class com.google.android.gms.games.ui.signin.SignInActivity; instances=2; limit=1
07-17 22:01:13.067: E/StrictMode(1283): at android.os.StrictMode.setClassInstanceLimit(StrictMode.java:1)
I have encountered this error in the past - I'm just struggling to be absolutely certain what caused it:
class com.google.android.gms.games.ui.signin.SignInActivity; instances=2; limit=1
I am fairly certain that it is because you are already signed on with that account on another device or emulator. I didn't have to do anything significant to fix the problem - sign out from the other device or use a different account. By the way if you do use a different account make sure it is defined as a tester for the game.
Update: I've just seen the full logcat and I see that this message precedes the one we have been focusing on:
Unable to sign in - application does not have a registered client ID
Your app_id must be set to the first 12 bytes of the client id from the developer console. This stuff is all well-documented by Google e.g.:
https://developers.google.com/games/services/console/enabling
https://developers.google.com/live/shows/5936979195723776
If it is working on a real device and not an emulator then please also check that you have set up an emulator that contains the Google APIs.
Update:
You've now posted a different logcat ? Anyway, if you are still getting the client ID message please check that you do not have two different app_id values in your app (e.g. one in strings.xml and one in ids.xml )
I have written GAE cloud endpoint APIs and have successfully deployed them to App Engine. The APIs run successfully locally as well as after deployment on App Engine.
After generating cloud endpoints, i tried to call one of the APIs in my Android client and it throws "GoogleJSONResponseException 404 not found" exception. In the API method, I am using HttpURLConnection and JAXB unmarshaller to call a URL and unmarshall the XML response. The code is as follows:
String uri=<some url>;
URL url = new URL(uri);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Accept", "application/xml");
JAXBContext jc = JAXBContext.newInstance(MyResponse.class);
InputStream xml = connection.getInputStream();
response = (MyResponse) jc.createUnmarshaller().unmarshal(xml);
connection.disconnect();
Why does this not work only when trying to call from the android client using the endpoint client library? Am i doing something wrong?
Note: I called another API in the same android client which just inserts data into the datastore and it works fine
The LogCat console looks as follows:
06-17 11:44:49.081: W/System.err(2035): com.google.api.client.googleapis.json.GoogleJsonResponseException: 404 Not Found
06-17 11:44:49.081: W/System.err(2035): Not Found
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:111)
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:38)
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:314)
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1060)
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:412)
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:345)
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:463)
06-17 11:44:49.081: W/System.err(2035): at com.niru.i_collect.RegistrationActivity$FindAddressTask.doInBackground(RegistrationActivity.java:296)
06-17 11:44:49.081: W/System.err(2035): at com.niru.i_collect.RegistrationActivity$FindAddressTask.doInBackground(RegistrationActivity.java:1)
06-17 11:44:49.081: W/System.err(2035): at android.os.AsyncTask$2.call(AsyncTask.java:287)
06-17 11:44:49.081: W/System.err(2035): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
06-17 11:44:49.081: W/System.err(2035): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
06-17 11:44:49.081: W/System.err(2035): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
06-17 11:44:49.081: W/System.err(2035): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
06-17 11:44:49.081: W/System.err(2035): at java.lang.Thread.run(Thread.java:856)
There is a weird bug in App Engine. It seems that when this happens, you have to go to the App Engine Console -> Main -> Versions.
There you will see a list of versions with a Make Default button below. Select the radio button for the latest version and press the make default button, wait a minute or so, and try your call again.
Note that even if you have only one version that is already set as the default this solution should still work.
You may have to do this again the next time you deploy to app engine.