Home Answers Viewqa Development-process error for getting the data from an api using br.readLine

 
 


sayeed
error for getting the data from an api using br.readLine
0 Answer(s)      2 years and 9 months ago
Posted in : Development process

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 Pages:
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
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... an internal error () that prevented it from fulfilling this request. exception
api
of it by a computer program. An API differs from an application binary interface...api  WHAT IS THE DEFINITON OF API,EXPLAIN IN DETAIL?   An API is the interface implemented by an application which allows other
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
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
Hibernate: ORDER BY using Criteria API.
API is very Simplified API for fetching data from Criterion objects. The criteria...Hibernate: ORDER BY using Criteria API.  How to display record in order using Criteria API?   Hibernate Criteria API provides an easy way
Error using SoapClient() in PHP
Error using SoapClient() in PHP  I'm trying to access WSDL(Web... parameter and active SSL on my server, still I'm getting an error. Here is the code I'm...","Password" => "password")); Here is the error I'm getting: Warning
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
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
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
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
Need to remove duplicated rows from excel using apache POI API
to remove duplicated rows from excel sheet by using apache poi api oe jxl api...Need to remove duplicated rows from excel using apache POI API  Hi, Need help from you. I am able to generate excel sheet with data also
Preferences API - What do you Prefer? - Java Tutorials
they created the Preferences API. Using this API starts with the Preferences...Preferences API - What do you Prefer? 2001-09-17 The Java Specialists... me of the new Preferences API in JDK1.4, so I put away the red wine, and pulled
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..."; // declare a connection by using Connection interface Connection connection = null
What is criteria API?
on the persistence database. The hibernate criteria API is very Simplified API for fetching data from Criterion objects. The Hibernate Criteria API contains Restriction class... What is criteria API?  Hi, What is criteria API? Thanks,  
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
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
API
API  what means API in java?   Hi Friend, The Application Programming Interface (API) is a library of functions that allow programmers to perform common tasks like file transfer, networking, and data structures
Java Mail API - JavaMail
account using java mail api... i got code from our roseindia.net i.e....("pop3s"); after successful compilation, at runtime i am getting the following exce
the last data entered into database is getting stored again after refreshing
if the data is deleted from the database the last data entered is getting posted plz help...the last data entered into database is getting stored again after refreshing  hey all i made a shout box using php and mysql but the last data
getting dropdown values using apache commons in servlet
getting dropdown values using apache commons in servlet  i want... commoms,before that i was using o'reilly api. here is my code : @Override...); } i tried to debug and i am getting the wright file path but while proceeding
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...: This program helps you in retrieving the data from a XML file. It takes a xml file
Hibernate Criteria API
data from Criterion objects. The criteria API is an alternative of HQL... criteria functions and dynamic queries. Using Criteria API to create...Hibernate Criteria API The API (Application Programming Interface
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
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
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
Getting garbage value
Getting garbage value  Thank You Sir for helping me out from... from the link gets some garbage value whenever I'm using some particular set of value like from 0010 to 0757. After that from 0758 to 2400 every value returns
Getting garbage value
Getting garbage value  Thank You Sir for helping me out from... from the link gets some garbage value whenever I'm using some particular set of value like from 0010 to 0757. After that from 0758 to 2400 every value returns
how to display data from mysql table in text box using jsp??
how to display data from mysql table in text box using jsp??  <p>hi, i have a written a code to display data from a mysql table into txtboxes..But i am getting the following error...</p> <p>An error occurred
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
Apache POI API for Microsoft Doc's Manipulation
Data Validation from Spread Sheet Cell's Value Drawing...Apache POI API for Microsoft Doc's Manipulation This section contains the detail about the Apache POI API library with it's implementation code
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
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
Getting Started With Java
Getting Started With Java      ... version and can be downloaded free from the sun Microsystems. Installing... software tool known as Javadoc. This tool is used to generate API documentation
jquery post data error
jquery post data error  getting post data error in JQuery ..any idea why?   Please visit the following link: JQuery Post Data
Getting connect error in Jmeter - Development process
Getting connect error in Jmeter  Hi, Am trying to run a simple application in Jakarta Jmeter using HTTP request sampler. I am getting the below error. Please help me in viewing the results. Pl specify if there is any possible
Getting NumberFormatException
Getting NumberFormatException  Thanks for the reply. Its works well, but whenever I'm using numeric value from 0010 to 0757 it is returning some garbage value. I dont have the idea what is going wrong. Please give me some idea
Java Persistence API
the object from the database. O-R framework performs operations using the API... data and object/relational mapping. Java Persistence API is added in Java EE 5... persistence API.  Persistency of data is not so easy for most of the enterprise
Getting NumberFormatException
Getting NumberFormatException  Hello Sir, I'm using Integer.parseInt.... I used the same type of code in a simple .java program but when I.m using... is the object from class DBLogic which has a method to insert time in Database
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
Error in JfreeChart
Error in JfreeChart  I am getting an error when i am using jfreechart... and download the jfreechart api: http://www.brothersoft.com/jfreechart-download-15712.html Then extract the api and put the jcommon-1.0.16.jar
correct the sql error and retrive data....plez
correct the sql error and retrive data....plez  i am getting a SQL Error while retriving data from access to jframe called "datatype mismatch...("")) { JOptionPane.showMessageDialog(null,"Please enter the Student ID to Search","Error",0
The Simple API for XML (SAX) APIs
The Simple API for XML (SAX) APIs   ... prefix that was settled on by the group that defined the SAX API...; SAXParser Defines the API that wraps an XMLReader
Still getting the http 404 error - Java Beginners
Still getting the http 404 error  Dear experts, I refer.... String query = "SELECT count( * ) FROM user_details WHERE username... is userid? Anyway, whatever I do, I still receive the http 404 error...saying
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
Getting File path error - JSP-Servlet
Getting File path error  I have a requirement where i need to get certain properties on application login page start itself. I an currently using String str = request.getRealPath("/")+"a" + System.getProperty( "file.separator
Theming API
Theming API       Theming API You can edit or modify theme of widget... and its child text, links, and icons. .ui-state-error: Class
Problem in accessing data from Database
Problem in accessing data from Database  hi..... i'm making a project... is text and all others are of currency data type. If i enter 0 or null value in currency column and then try to retrieve data using my servlet coding
problem in getting mail exchange records(MX) using DNS in java
problem in getting mail exchange records(MX) using DNS in java  Hi......."+attributeMX); } catch(Exception e){ out.println("Error ****"+e); e.printStackTrace();; } %> Error: javax.naming.NotContextException

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.