On Thu, Aug 7, 2014 at 12:27 AM, Bishan Buddhika <tvbis...@gmail.com> wrote:

>  I'm getting below error from my google app engine program. But when i run
> this program on my PC, it's working without any errors. Below error is
> getting when uploaded to google app engine and run from there.
>
>> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException:
>> Expected BEGIN_OBJECT but was STRING at line 1
>
>
> http://stackoverflow.com/questions/25157962/expected-begin-object-but-was-string-at-line-1-column-1
>


Hi Bishan,

A few things:

1. Please post the entire stack trace including line numbers, not just the
exception message.

2. Your code is directly opening up a stream to the data URL, without
checking to see if the input is valid. Can you modify your code to show the
status code being returned by the feed server (it should be 200) and print
out into logging the text received from the server? Here's example code to
show the status code returned: http://stackoverflow.com/a/6467904

3. When you say "*when i run this program on my PC, it's working without
any errors*" are you running the code within the development app server or
another server? Are you pulling the data feed from the feed server or using
test JSON text? If you are pulling the data from the feed server, is the
JSON you posted a representative sample of the JSON you expect to receive?
If not, please describe the JSON you do expect to receive (sample JSON is
OK too).

-----------------
-Vinny P
Technology & Media Consultant
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Reply via email to