Created
November 30, 2012 18:12
-
-
Save eric-wood/4177478 to your computer and use it in GitHub Desktop.
GraffitiClient errors -- downloading public sketches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11-30 11:48:58.671: W/System.err(672): org.codehaus.jackson.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') | |
11-30 11:48:58.671: W/System.err(672): at [Source: org.apache.http.conn.EofSensorInputStream@46009b68; line: 1, column: 2] | |
11-30 11:48:58.694: W/System.err(672): at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1432) | |
11-30 11:48:58.694: W/System.err(672): at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:385) | |
11-30 11:48:58.701: W/System.err(672): at org.codehaus.jackson.impl.JsonParserMinimalBase._reportUnexpectedChar(JsonParserMinimalBase.java:306) | |
11-30 11:48:58.701: W/System.err(672): at org.codehaus.jackson.impl.Utf8StreamParser._handleUnexpectedValue(Utf8StreamParser.java:2084) | |
11-30 11:48:58.701: W/System.err(672): at org.codehaus.jackson.impl.Utf8StreamParser._nextTokenNotInObject(Utf8StreamParser.java:600) | |
11-30 11:48:58.701: W/System.err(672): at org.codehaus.jackson.impl.Utf8StreamParser.nextToken(Utf8StreamParser.java:486) | |
11-30 11:48:58.701: W/System.err(672): at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2761) | |
11-30 11:48:58.711: W/System.err(672): at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2709) | |
11-30 11:48:58.711: W/System.err(672): at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1900) | |
11-30 11:48:58.711: W/System.err(672): at srl.distributed.client.Client.sendRequest(Client.java:220) | |
11-30 11:48:58.711: W/System.err(672): at srl.distributed.client.Client.sendRequest(Client.java:164) | |
11-30 11:48:58.711: W/System.err(672): at srl.graffiti.client.nio.GraffitiClient$6.doInBackground(GraffitiClient.java:268) | |
11-30 11:48:58.711: W/System.err(672): at srl.graffiti.client.nio.GraffitiClient$6.doInBackground(GraffitiClient.java:1) | |
11-30 11:48:58.711: W/System.err(672): at android.os.AsyncTask$2.call(AsyncTask.java:185) | |
11-30 11:48:58.711: W/System.err(672): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) | |
11-30 11:48:58.711: W/System.err(672): at java.util.concurrent.FutureTask.run(FutureTask.java:137) | |
11-30 11:48:58.711: W/System.err(672): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068) | |
11-30 11:48:58.711: W/System.err(672): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561) | |
11-30 11:48:58.711: W/System.err(672): at java.lang.Thread.run(Thread.java:1096) | |
11-30 11:48:58.731: W/dalvikvm(672): threadid=9: thread exiting with uncaught exception (group=0x4001d800) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HomeActivity extends Activity { | |
// snip... | |
// Experimental: download public sketches | |
public void getSketches() { | |
try { | |
final class completionCallback implements Callback<Collection<PositionedSketch>> { | |
Activity a; | |
public completionCallback(Activity object) { | |
a = object; | |
} | |
public void onCallback(Collection<PositionedSketch> data) { | |
if(data != null) { | |
// do something with data | |
} | |
else { | |
// bitch about it | |
} | |
// TODO: hide progressbar | |
} | |
} | |
// TODO: show progressbar | |
GraffitiCom.getPublicPositionedSketches(new completionCallback(this)); | |
} catch(Exception e) { | |
e.printStackTrace(); | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment