error for getting the data from an api using br.readLine

error for getting the data from an api using br.readLine

hi
the application is hanging while reading the data using readLine() function . actually the data is coming from remote using particular api call see the following code.

StringBuilder sb = new StringBuilder();

String strtemp;
Runtime runtime = Runtime.getRuntime();

Process process = runtime.exec("cmd.exe /C c:\\curl\\curl -X POST -d \"format=json&api_key=MY739HWQW4PWZ1HIJEWVNSOUAF8EJQ4K\";user[email]=useremail;user[password]=userpassword;user[country]=usercountry;user[mobile_phone]=userphone http://staging-orion.sabsebolo.com/users");

Process process = runtime.exec(url);


BufferedReader inputreader = new BufferedReader(new InputStreamReader(process.getInputStream()));
while ((strtemp = inputreader.readLine()) != null) {


sb=sb.append(strtemp);

}

while executing the above while loop the application is hanging . i find that the application gets hanging while executing inputreader.readLine() function.

please can you help to solve this problem
View Answers









Related Tutorials/Questions & Answers:
error for getting the data from an api using br.readLine - Development process
error for getting the data from an api using br.readLine  hi the application is hanging while reading the data using readLine() function . actually the data is coming from remote using particular api call see the following code
Getting data from servlet into javascript
Getting data from servlet into javascript  How do i get json data from my servlet on to a variable in javascript n bind the data to display onto sigma grid.Has anyone Idea how to do
Advertisements
Getting Textbox data from database
Getting Textbox data from database  When i m trying to get data in textbox as readonly from database i m getting following error.and my code is shown... an internal error () that prevented it from fulfilling this request. exception
data type used to store name.(getting an error)
data type used to store name.(getting an error)    Statement stm=con.createStatement(); String query="select * from employee where ename... getting an error like dis: "ename cannot be resolved to a variable" whats
Getting Textbox data from database
Getting Textbox data from database  When i m trying to get data in textbox as readonly from database i m getting following error.and my code is shown... data from database and display it on the textboxes. <%@page language="java
Getting and sending data to and from mobile and the system
Getting and sending data to and from mobile and the system  Hi, For getting and sending data to mobile from system.make system is a server.From... in the mobile application.This is done using J2ME also. Regards, Sivakumar.J
sending data to google chart api from mysql database using java
sending data to google chart api from mysql database using java  how to send data from mysql database to google chart api using java
Getting Json data from servlet to javascript variable
Getting Json data from servlet to javascript variable  How do i get json data from my servlet on to a variable in javascript n bind the data to display onto sigma grid.Has anyone Idea how to do
Which splunk component is used for getting data from data source
Which splunk component is used for getting data from data source  Hi, I am using Splunk for Big Data Analysis. I have to configure components for getting data from a data source. Which splunk component is used for getting data
sending data to google chart api from mysql database using java
sending data to google chart api from mysql database using java  Äîáîâëÿéòåñü â ãðóïïó "ÌÀÉÍÊÐÀÔÒÀ" Áóäüòå ó÷àñòíèêàìè Ãðóïïû Ïîìîãàèòå íàì è ñåáå Íàøà ãðóïïà https://vk.com/club60851464 Åñòü ñâîé ñåðâåð! Õîðîøàÿ àòìîñôåðà
error getting repository data for epel repository not found centos 7
error getting repository data for epel repository not found centos 7  Hi, Can't find repository while installing one of the software using yum because of the error: error getting repository data for epel repository not found
error getting repository data for epel repository not found centos 7
error getting repository data for epel repository not found centos 7  Hi, Can't find repository while installing one of the software using yum because of the error: error getting repository data for epel repository not found
Getting an error :(
Getting an error :(  I implemented the same code as above.. But getting this error in console... Console Oct 5, 2012 10:18:14 AM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server
Why you are not getting value from your data science?
Why you are not getting value from your data science?  Hi, I am... for the tutorials to learn: Why you are not getting value from your data science? Try...;Why you are not getting value from your data science?". Also tell me which
getting int values from form and insert it in data base in jsp
getting int values from form and insert it in data base in jsp  how...; Hi, You can get the parameter from the request object: String s... = Integer.parseInt(s); Then you can write JDBC code to insert data
Error in reading Excel data using jsp
Error in reading Excel data using jsp  ERROR while executing bellow code:java.io.IOException: Invalid header signature; read 576460838270094160...() method shows the following Error message on console
Exporting data from mysql into csv using jsp
Exporting data from mysql into csv using jsp  Hi friends.... I want to export the data from mysql to csv file using... i am having 30 columns in my... in csv file..if i export, am getting the csv file with all data in one row
Getting Error - Development process
Getting Error   Hi , i am getting error while executing this code. I just want to store date in to database. Dont mistake me for repeated questions... of query values and destination fields are not the same. my table : Add_Data
How to Retrieve Data from Facebook Using PHP
How to Retrieve Data from Facebook Using PHP  is this link has right content regards that?? http://techpdf.co.cc/blog/how-to-retrieve-data-from-facebook-using-php
How to Retrieve Data from Facebook Using PHP
How to Retrieve Data from Facebook Using PHP  is this link has right content regards that?? http://techpdf.co.cc/blog/how-to-retrieve-data-from-facebook-using-php
Retrieve data from xml using servlets
Retrieve data from xml using servlets  Hi plz send me the code for retrieving the data from xml File using Servlets.   Hi, Do you want... File using ServletADS_TO_REPLACE_2 Thanks   Hi, Learn Get Data From
Retrieve data from databse using where in JSP
Retrieve data from databse using where in JSP  Hi, can somebody help me? I have a jsp page. in that i want to get data from the database where... help me. ALL DATABASE CONNECTIONS ARE OK. THE ERROR IS SHOWN IN "WHERE". IT SAYS
retrieve data from database using jsf
retrieve data from database using jsf  Hello I want an example of source code to retrieve data from database i have a database (oracle) name as db1 it's contain table 'author' composed of three columns idauthor(primary key
Retrive the data from the table in data base using jdbc
Retrive the data from the table in data base using jdbc  Retrive the data from the table in data base using jdbc   JDBC Tutorials
inserting data from radio buttons to database-ERROR - JSP-Servlet
inserting data from radio buttons to database-ERROR  hi, i have already changed the option field of table question. the code which you give me has... it in the code. but still i am getting the error in the update query. please provide
Fetching the exact data from file using java
Fetching the exact data from file using java  **hi ... i am having one .lst file.. that file consists of instructions and opcodes.. now i want to fetch only the opcode from that file.. could u pls anyone guide me this using java
when sending the mail from java I am getting the below error - JavaMail
when sending the mail from java I am getting the below error   when sending the mail from java I am getting the below error : Exception... the RFC 822 "From" header field using the // value
Request URl using Retrive data from dtabase
Request URl using Retrive data from dtabase  Using With GWT the user can create an event. In the create page, we have three buttons. Save as draft... the contents from the db based on the event id. But this jsp url should
Getting error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver.
Getting error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver. ... .when i done database connection then i get an error...:8080/tickettool"; // declare a connection by using Connection interface Connection
Populate a combo box using data from a database
Populate a combo box using data from a database  Hi Guys, In need... to populate the first one, and then how to send the data off to a servlet and preform... to the client using ajax, and then populate the combo box, I must'nt reload
retrive data from database using jsp in struts?
retrive data from database using jsp in struts?   *search.jsp* <%@taglib uri="http://struts.apache.org/tags-html" prefix="html"%> <... searchProduct(SearchDTO sdto) { String query="select * from product
Getting Data from XML File (Document)
Getting Data from XML File (Document)   ... from a XML file. All xml files store the data. You can add and modify the data..._TO_REPLACE_1 This program helps you in retrieving the data from a XML file
A programm for error free transmission of data using UDP in java
A programm for error free transmission of data using UDP in java  Hi... is to create applications for error-free transmission of data (transmitter... error,also the data should be stored in the correct order, and that only one copy
get from address using javamail api?
get from address using javamail api?  i want to get from address of particular mail using the javamail api? actually i had done it in one .jsp file... no to composereplymail.jsp using the javascript, m getting message[messageno].getSubject() but when i
Retrieving data from data base using jsp combo box
Retrieving data from data base using jsp combo box  Hi guys please help me , i have on GUI page int that Server type(like apache,jboss,weblogic) one... of the server it has to display the process name from database into the process name
unable to retrive the data from mysql using servlet using jdbc driver
unable to retrive the data from mysql using servlet using jdbc driver ... = stmt.executeQuery("SELECT * FROM login where username="+username+" and password..."); } // throw new IOException(new IOException("Error
getting files from VSS
getting files from VSS  I am not able to get the files from VSS.I am using following code. and just let me know is localpath attribute is for our local project path? I am getting the problem in this line failed
Retrieve data using Criteria api
Retrieve data using Criteria api  import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Query; import org.hibernate.Criteria; import org.hibernate.criterion.Restrictions; import
How to get the data from the database using Servlet or JSP program
How to get the data from the database using Servlet or JSP program  ... the problem   Get data from database using servlet Retrieve data from database using JSP Get data from database using JSP
getting coords from an image.
getting coords from an image.  how to get coordinates dynamically(in run time) from an image?? pls help me
How to get data from Oracle database using JSP
How to get data from Oracle database using JSP  hello i have a simple problem in jsp in the sense to get data from the database like oracle . I have... the answer to retrieve data from the database by using servlet or jsp program
create login page using data from text file
create login page using data from text file  I want to create login page using data store in textfile(data submit from regiter page to textfile) using jsp and servlet. Thanks
Retriving data from MYSQL without line break using java
Retriving data from MYSQL without line break using java  get data without line breaking from mysql table (i.e data stored as mediumtext )using java
How to export data from html to excel sheet by using java
How to export data from html to excel sheet by using java   How to export data from html to excel sheet by using java
How to export data from jsp to excel sheet by using java
How to export data from jsp to excel sheet by using java   How to export data from jsp to excel sheet by using java
How to export data from html file to excel sheet by using java
How to export data from html file to excel sheet by using java   reading the data from Html file
getting started with data science
getting started with data science  Hi, I am beginner in Data Science...: getting started with data science Try to provide me good examples or tutorials links so that I can learn the topic "getting started with data science"
getting a job in data science
getting a job in data science  Hi, I am beginner in Data Science... that I can learn the topic "getting a job in data science". Also tell me... in Data Science and searching for the best tutorials for getting started
getting a job as a data analyst
getting a job as a data analyst  Hi, I am beginner in Data Science... that I can learn the topic "getting a job as a data analyst". Also... are beginner in Data Science and searching for the best tutorials for getting
getting a job in data analytics
getting a job in data analytics  Hi, I am beginner in Data Science... that I can learn the topic "getting a job in data analytics". Also... are beginner in Data Science and searching for the best tutorials for getting

Ads