Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8078491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:48:54+00:00 2026-06-05T15:48:54+00:00

I have two URLs. https://wimp.supremosolutions.com/api/v1/spot/?format=json https://wimp.supremosolutions.com/api/v1/spot/?format=json&latitude=45.200375&longitude=9.992465000000001 If I run the first one through my

  • 0

I have two URLs.

  1. https://wimp.supremosolutions.com/api/v1/spot/?format=json
  2. https://wimp.supremosolutions.com/api/v1/spot/?format=json&latitude=45.200375&longitude=9.992465000000001

If I run the first one through my android activity then the results load into my List with no problem.
But if I run the second URL then I land up getting this error.

05-30 16:20:30.473: ERROR/JSON Parser(1740): Error parsing data org.json.JSONException: Value Invalid of type java.lang.String cannot be converted to JSONObject
05-30 16:20:30.633: ERROR/AndroidRuntime(1740): FATAL EXCEPTION: AsyncTask #1
        java.lang.RuntimeException: An error occured while executing doInBackground()
        at android.os.AsyncTask$3.done(AsyncTask.java:278)
        at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
        at java.util.concurrent.FutureTask.run(FutureTask.java:137)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
        at java.lang.Thread.run(Thread.java:856)
        Caused by: java.lang.NullPointerException
        at com.supremosolutions.wimp.AroundMeParking$LoadInbox.doInBackground(AroundMeParking.java:162)
        at com.supremosolutions.wimp.AroundMeParking$LoadInbox.doInBackground(AroundMeParking.java:138)
        at android.os.AsyncTask$2.call(AsyncTask.java:264)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
        ... 5 more   

I have run both URLs through json validators like http://jsonlint.com/ and both validate.

The code seems to break on the jsonParser.makeHttpRequest:

protected String doInBackground(String... args) {
    // Building Parameters
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    JSONObject json = jsonParser.makeHttpRequest(callableUrl, "GET", params);
    // Check your log cat for JSON response
    Log.d("JSON FOR LOGCAT: ", json.toString());

Sometimes I can see the JSON FOR LOGCAT string in Logcat and it looks like this http://pastebin.com/6CWBAyys (still crashes with that exception though)but sometimes the string doesn’t even make it into logcat.

What is the problem here and how can I fix it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T15:48:55+00:00Added an answer on June 5, 2026 at 3:48 pm

    The jsonParser class that I had appends parameters. I was already adding in the base url + the parameters and so the url being sent was invalid.
    Instead of sending my URL through like this https://wimp.supremosolutions.com/api/v1/spot/?format=json&latitude=45.200375&longitude=9.992465000000001

    I have to send it like https://wimp.supremosolutions.com/api/v1/spot/ but then add NameValuePair parameters to pass into my jsonParser class.

            // Building Parameters
            List<NameValuePair> params = new ArrayList<NameValuePair>();
            params.add(new BasicNameValuePair("format", "json"));
            params.add(new BasicNameValuePair("format", "json"));
            params.add(new BasicNameValuePair("format", "json"));
            JSONObject json = jsonParser.makeHttpRequest(URL, "GET", params);
    

    As Ken Y-N and Alex mentioned this error is caused by an invalid url. If you get this DOUBLE check how you are creating your URL and see exactly what is being sent

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two URLs: http://s140452.gridserver.com/view-pullsheet/ https://s140452.gridserver.com/locations/ When browsing through any properties on the locations
I need a litte bit help. I have the following two URLS: WSDL: https://amsel.dpwn.net/abholportal/gw/lp/schema/1.0/var3ws.wsdl
I have two types of urls: http://mydomain.com/npguar/en/products.php http://mydomain.com/npguar/en/1/product_specification.php Earlier I was using this .htaccess
I have two URLs: One is the application URL = http://domain.com/app One is the
I have two tables with list of urls fetched from different sources. I want
So basically, I have two fast questions about kohana urls. 1) With default .htaccess
What I'm trying to achieve here is lets say we have two example URLs:
Having some issues getting this MPMoviePlayerViewController to work. I have two sample URLs pointing
I am working on existing project. I have following two URLs http://example.dev/en/course/myUserName/myCourseName/150/myChapterName/1016/page/1/?hcid=147 http://example.dev/en/course/myUserName/myCourseName/150/myChapterName/1016/page/2/?hcid=147 2nd
I have two urls: url1 = http://127.0.0.1/test1/test2/test3/test5.xml url2 = ../../test4/test6.xml How can I get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.