2016-11-09 13 views
1

バックエンドにParse DBを使用していますが、Login、SaveInBackground、FindInBackGroundなどのメソッドを使用しましたが、ほとんどの関数が動作しています。同じSaveInBackground(と){...}他の方法)これは私がインターネットを介してサーフィン、いくつかの解決策が解析で行うことを見つけるエラーは

private void xxdatat(final ParseObject receiverObject) { 
    ParseObject obj = new ParseObject(Constants.XXX); 
    obj.put("SENDER_ID", objdata);   //parse object type 
    obj.put("RECIEIVER_ID", Robjdata);  //parse object type 
    obj.put("REQUEST_TYPE", stingdata);  //String type 
    obj.saveInBackground(new SaveCallback() { 
     @Override 
     public void done(ParseException e) { 
      if (e==null) { 
       DialogUtil.showDialog(mContext, "working"); 
      } else { 
       DialogUtil.showDialog(mContext,"Not working"); 

      } 
     } 
    }); 

を発生した方法である

に取り組んでいます構成ファイル。

Parse.initialize(new Parse.Configuration.Builder(this) 
      .applicationId(APP_ID) 
      .clientKey(CLIENT_KEY) 
      .addNetworkInterceptor(new ParseLogInterceptor()) 
      .server("https://parse.xxxyyyzzz.com/parse/") 
      .build()); 

リンクは「/」

ようにすることによって完成されるJSONObjectに解析からのデータを変換し、例外もJSONExceptionいる間エラーが発生し観察しました。

この問題を解決するにはどうすればよいですか?前もって感謝します。

com.parse.ParseRequest$ParseRequestException: bad json response 
    at com.parse.ParseRequest.newTemporaryException(ParseRequest.java:290) 
    at com.parse.ParseRESTCommand.onResponseAsync(ParseRESTCommand.java:308) 
    at com.parse.ParseRequest$3.then(ParseRequest.java:137) 
    at com.parse.ParseRequest$3.then(ParseRequest.java:133) 
    at bolts.Task$15.run(Task.java:917) 
    at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) 
    at bolts.Task.completeAfterTask(Task.java:908) 
    at bolts.Task.continueWithTask(Task.java:715) 
    at bolts.Task.continueWithTask(Task.java:726) 
    at bolts.Task$13.then(Task.java:818) 
    at bolts.Task$13.then(Task.java:806) 
    at bolts.Task$15.run(Task.java:917) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
    at java.lang.Thread.run(Thread.java:818) 
    Caused by: org.json.JSONException: Value <html> of type java.lang.String cannot be converted to JSONObject 
    at org.json.JSON.typeMismatch(JSON.java:111) 
    at org.json.JSONObject.<init>(JSONObject.java:160) 
    at org.json.JSONObject.<init>(JSONObject.java:173) 
    at com.parse.ParseRESTCommand.onResponseAsync(ParseRESTCommand.java:298) 
    at com.parse.ParseRequest$3.then(ParseRequest.java:137) 
    at com.parse.ParseRequest$3.then(ParseRequest.java:133) 
    at bolts.Task$15.run(Task.java:917) 
    at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) 
    at bolts.Task.completeAfterTask(Task.java:908) 
    at bolts.Task.continueWithTask(Task.java:715) 
    at bolts.Task.continueWithTask(Task.java:726) 
    at bolts.Task$13.then(Task.java:818) 
    at bolts.Task$13.then(Task.java:806) 
    at bolts.Task$15.run(Task.java:917) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
    at java.lang.Thread.run(Thread.java:818) 
+0

JSONが有効な形式ではないことを意味します。 – sasikumar

+0

jsonのURLが有効かどうかを確認しますか? http://jsonlint.com/ – sasikumar

+0

JSONの解析は、解析SDKによって行われます。私のコード部分はありません。最初はうまく動作します。数日後、私はしません。 – livemaker

答えて

0

最後に、構造と名前が同じで新しいテーブルをdbに作成することで、この問題を解決しました。

問題なく動作します。

関連する問題