polska03's Profile User Rating: -----

Reputation: 5 Worker
Group:
Active Members
Active Posts:
292 (0.17 per day)
Joined:
28-November 09
Profile Views:
14,942
Last Active:
User is offline Jul 05 2014 06:01 PM
Currently:
Offline

Previous Fields

Dream Kudos:
0

Latest Visitors

Icon   polska03 has not set their status

Posts I've Made

  1. In Topic: Multiple threads not inserting everything into MySQL

    Posted 21 Jun 2014

    Sorry can this reply be deleted
  2. In Topic: Multiple threads not inserting everything into MySQL

    Posted 21 Jun 2014

    I have a question regarding the loop. If the request is successful the first time, will the loop still send out 4 more requests?
  3. In Topic: Multiple threads not inserting everything into MySQL

    Posted 21 Jun 2014

    The first 2 tests all url came through, but now I am getting:

    java.net.ConnectException: Connection timed out: connect
    


    So the URL seems to be time out. How would I retry to send the request again if it timeouts?

    As well with the help of the printstack I am getting this error:

    org.json.JSONException: JSONObject["results"] is not a JSONObject.
    	at org.json.JSONObject.getJSONObject(JSONObject.java:562)
    	at MySQLPopulateHistData.getHistory(MySQLPopulateHistData.java:166)
    	at MySQLPopulateHistData.<init>(MySQLPopulateHistData.java:47)
    	at MainClass$1.run(MainClass.java:39)
    	at java.lang.Thread.run(Unknown Source)
    
    
  4. In Topic: Multiple threads not inserting everything into MySQL

    Posted 21 Jun 2014

    So I put:

    (if s.equals("")){
    System.out.println("EMPTY");
    }
    
    


    and it never printed out EMPTY. After the JSONrequests gets converted to the JSONArray I added:

    [code
    if(arr.length()>0){
    StaticClassHolder.cntResponses++;
    }
    [/code]

    This is just a static variable in another class that gets incremented everytime there is a valid JSON response. It equalled to the exact right amount it was supposed to be. So it seems as if the URL gets all the responses properly, parses them properly, but is not INSERTING them properly into the database? I can't figure out why?
  5. In Topic: Multiple threads not inserting everything into MySQL

    Posted 20 Jun 2014

    Anyone have a suggestion on how to fix this? The main goal is to send an http request to the api server, get a json response back, parse it, and put it into my database using threads.

My Information

Member Title:
D.I.C Regular
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Click here to e-mail me

Friends

polska03 hasn't added any friends yet.

Comments

polska03 has no profile comments yet. Why not say hello?