Streaming to HTTP Response through ResultSet?

I have a cursor which returns a large amount of data (potentially millions of rows, each with 10-20 columns). I would like to efficiently create a CSV file from these results by streaming it to the user upon their demand. In other words, I'm not saving a file to the server, I'm piping the results directly to the Response object of my web/client structure.
Currently, I have a resultset, and a BufferedOutputStream attached to the Response object. But I don't know how to properly get the resultset into an InputStream such that I can write it to the output stream in efficient chunks. My code looks like this so far (work in progress):
          String filename = "testfile.txt";
          response.setHeader("cache-Control", "no-store");
             response.setHeader("pragma", "no-cache");
             response.setDateHeader("Expires", 0);
             response.setContentType("application/download");
             response.setHeader("Content-Disposition","attachment;filename=\""+filename + "\"");
             // Getting output stream.
             BufferedOutputStream os = new BufferedOutputStream(response.getOutputStream());                   
             // Buffer for read operations.
             byte[] buffer = new byte[4072];
             // now start the database operations to get the resultset
             Connection conn = null;
          CallableStatement stmt = null;
          ResultSet rs = null;
          String query = "{?= call get_all_data(?,?)}";
          conn = DBUtil.getConnection();
          conn.setReadOnly(true);
          stmt=conn.prepareCall(query);
          stmt.registerOutParameter(1,java.sql.Types.INTEGER);     // return value
          stmt.registerOutParameter(2,oracle.jdbc.OracleTypes.CURSOR);     // CURSOR
          stmt.registerOutParameter(3,java.sql.Types.VARCHAR);     // return message
          stmt.execute();              
          rs = (ResultSet)stmt.getObject(2);
          // here's where I'm unclear
          // how do I get the resultset to the outputstream in specific sized chunks? 
                // where would I apply the CSV formatting to the columns?
          while (rs.next()) {
               os.write(?????);
          rs.close();
          stmt.close();
                os.flush();Edited by: xaeryan on Apr 11, 2011 12:07 PM

Thank you, you are correct in all your comments; We do expect possibly very large files, and this is only a delivery mechanism.
We prevent duplicate requests of this delivery using a lock object (i.e. "already in progress").
As for chunking, that is what I'm trying to figure out and I assumed that would be in the scope of JDBC. You can "chunk" with an InputStream created from a file, so I was hoping there was some elegant way to do the same on the ResultSet, via some method which can treat the ResultSet as an InputStream, although I don't see any striking me as obvious.
The following is a working example we have used for chunking based on reading from a file. Really all I want to do is replace the file with a ResultSet instead:
                  response.setHeader("cache-Control", "no-store");
                  response.setHeader("pragma", "no-cache");
                  response.setDateHeader("Expires", 0);
                  response.setContentType("application/download");
                  response.setHeader("Content-Disposition","attachment;filename=\""+filename + "\"");
                  FileInputStream fis = new FileInputStream(new File(server_path+"/"+server_filename));
                  BufferedInputStream bis = new BufferedInputStream(fis);
                  DataInputStream dis = new DataInputStream(bis);     
                  // Getting output stream.
                  BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream());                   
                  // Buffer for read operations.
                  byte[] buffer = new byte[4072];
                  // dis.available() returns 0 if the file does not have more lines.
                  while (dis.available() != 0)
                        // Read data from input stream ...
                        int length = dis.read(buffer);   // if somehow dis was an inputstream from the resultset?
                        // ... and write data to output stream (response).
                        out.write(buffer, 0, length);
                  // Dispose all input resources after using them.
                  fis.close();
                  bis.close();
                  dis.close();
                  // Flushing output stream. Do not close it. Controller/Servlet is
                  // responsible of it.
                  out.flush();

Similar Messages

  • Get http headers through GenericServlet

    hi ,
    Is it possible to get the http headers through the GenericServlet. I know i can get it through the HttpServlet. Considering that GenericServlet is parent class of HttpServlet I would think that is possible when I get the InputStream - request.getInputStream I should be able to print the headers too. But that does not seem to be happening ? Any information will be appreciated . thanks -sudhir

    Greetings,
    hi ,
    Is it possible to get the http headers through the GenericServlet. I know i can get it through theTechnically, no. Message headers are intended to provide information to the container/encapsulating server relevant to its part in handling the request. Indeed, most headers are not even relevant to the servlet which provides only an "extension" of the server proper. The headers are available in an HttpServlet[Request] primarily because HttpServlets are intended to operate in place of their CGI counterparts (the CGI spec. converts nearly all headers into environment variables...) though not all headers are converted into accessor-enabled object members.
    A GenericServlet, however, is, well, exactly that, "generic". It forms the basis of other protocol-specific implementations (which currently, to my knowledge, includes only HTTP...), and so making those "protocol specific" headers available to an implementation class is the responsibility of the "protocol specific" servlet container.
    However, since you're (presumably) running your "generic servlet" in an HTTP-specific container environment, you can always try casting the ServletRequest object to an HttpServletRequest reference and call getHeader on it. ;)
    HttpServlet. Considering that GenericServlet is parent class of HttpServlet I would think that is
    possibleRefer again to the above.
    when I get the InputStream - request.getInputStream I should be able to print the headers too. But
    that does not seem to be happening ? Any information will be appreciated.Er, no. Input/output streams relate to the body (i.e. the content...) of the message. Headers relate to the meta-data of the message (i.e. its "envelope") - which, again, contains information relevant to the container. That information could be, for example, "routing instructions" - e.g. "Host" or "Referer" headers - or it could be, for example, "handling instructions" - e.g. "Accept-Encoding" or "Cookie" headers.
    In the former case, the headers are mostly of relevance only to the container, though a servlet may also base some part of its processing on them and so they are made accessible through the getHeader method.
    In the latter case, they are not necessarily relevant to either (the container or the servlet) though, when relevant, they are most likely relevant to the servlet - whether implicitly ("Accept-Encoding") or explicitly ("Cookie") - and so are made available either in the same "implicit" fashion (getHeader), or through a more "explicit" API call (getCookies).
    thanks -sudhirRegards,
    Tony "Vee Schade" Cook

  • Scheduled report failures - Unexpected error getting the HTTP response

    Getting this error when scheduled report executes:
    Unexpected error getting the HTTP response stream while generating report: http://cdmdb1c.nam.nsroot.net:4889/em/console/reports/render

    Hi..
    Thanks for the comment.
    Below is how my web.xml entry looks like.
    The requirement is to send a 404 error response and that will be handled by a servlet which inturn writes the output to the response object.
         <servlet>
              <servlet-name>ErrorPageServlet</servlet-name>
              <servlet-class>com.test.ErrorPageServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>ErrorPageServlet</servlet-name>
              <url-pattern>/error</url-pattern>
         </servlet-mapping>
         <error-page>
              <error-code>404</error-code>
              <location>/error</location>
         </error-page>>>
    the first option to turn off the "show friendly html error pages" works fine.
    It would be better if I can get a different solution

  • Received HTTP response code 500 : Internal Server Error using connection Fi

    Hi everybody,
    I have configured a file-webservice-file without BPM scenario...as explained by Bhavesh in the following thread:
    File - RFC - File without a BPM - Possible from SP 19.
    I have used a soap adapter (for webservice) instead of rfc .My input file sends the date as request message and gets the sales order details from the webservice and then creates a file at my sender side.
    I monitored the channels in the Runtime work bench and the error is in the sender ftp channel.The other 2 channel status is "not used" in RWB.
    1 sender ftp channel
    1 receiver soap channel
    1 receiver ftp channel.
    2009-12-16 15:02:00 Information Send binary file "b.xml" from ftp server "10.58.201.122:/", size 194 bytes with QoS EO
    2009-12-16 15:02:00 Information MP: entering1
    2009-12-16 15:02:00 Information MP: processing local module localejbs/AF_Modules/RequestResponseBean
    2009-12-16 15:02:00 Information RRB: entering RequestResponseBean
    2009-12-16 15:02:00 Information RRB: suspending the transaction
    2009-12-16 15:02:00 Information RRB: passing through ...
    2009-12-16 15:02:00 Information RRB: leaving RequestResponseBean
    2009-12-16 15:02:00 Information MP: processing local module localejbs/CallSapAdapter
    2009-12-16 15:02:00 Information The application tries to send an XI message synchronously using connection File_http://sap.com/xi/XI/System.
    2009-12-16 15:02:00 Information Trying to put the message into the call queue.
    2009-12-16 15:02:00 Information Message successfully put into the queue.
    2009-12-16 15:02:00 Information The message was successfully retrieved from the call queue.
    2009-12-16 15:02:00 Information The message status was set to DLNG.
    2009-12-16 15:02:02 Error The message was successfully transmitted to endpoint com.sap.engine.interfaces.messaging.api.exception.MessagingException: Received HTTP response code 500 : Internal Server Error using connection File_http://sap.com/xi/XI/System.
    2009-12-16 15:02:02 Error The message status was set to FAIL.
    Please help.
    thanks a lot
    Ramya

    Hi Suraj,
    You are right.The webservice is not invoked.I see the same error in the sender channel and the receiver soap channel status is "never used".
    2009-12-16 15:52:25 Information Send binary file  "b.xml" from ftp server "10.58.201.122:/", size 194 bytes with QoS BE
    2009-12-16 15:52:25 Information MP: entering1
    2009-12-16 15:52:25 Information MP: processing local module localejbs/CallSapAdapter
    2009-12-16 15:52:25 Information The application tries to send an XI message synchronously using connection File_http://sap.com/xi/XI/System.
    2009-12-16 15:52:25 Information Trying to put the message into the call queue.
    2009-12-16 15:52:25 Information Message successfully put into the queue.
    2009-12-16 15:52:25 Information The message was successfully retrieved from the call queue.
    2009-12-16 15:52:25 Information The message status was set to DLNG.
    2009-12-16 15:52:27 Error The message was successfully transmitted to endpoint com.sap.engine.interfaces.messaging.api.exception.MessagingException: Received HTTP response code 500 : Internal Server Error using connection File_http://sap.com/xi/XI/System.
    2009-12-16 15:52:27 Error The message status was set to FAIL.
    what can I do about this?
    thanks,
    Ramya

  • How to see http response from an axis web service call (Eclipse)

    Hello,
    I would like to see the raw http response which is returned from web service calls. I have a dynamic web project in Eclipse which uses a local instance of Tomcat 6. I'm using all of the default setting for a top-down web service generated from a WSDL file. I've generated the client using the built-in "generate client" using default settings.
    I've tried using the Eclipse plugin TCP/IP monitor and apache's TCPMON, but I am only able to see the http request, not the http response returned from the web server I am querying.
    I've seen some sparse documentation outlining how to use logging handlers and a client-config.wsdd file, but I haven't been able to get that working.
    So to recap, I'm looking for a way to view raw http responses using a web service client and server generated from a WSDL file in eclipse. I don't mind creating a new project using different code-generating libraries if someone has an easy way to do this using a different configuration.
    Thanks very much,
    Craig

    908794 wrote:
    Hello,
    I would like to see the raw http response which is returned from web service calls.Why the HTTP response? Isn't the soap message body enough? If it is, you probably want to check out SoapUI.
    A simple google query for "apache axis2 http response" also return this article:
    http://blogs.cocoondev.org/dims/archives/004668.html
    And finally, you did go through the Axis2 website right? It has a wiki with a rather staggering amount of articles in there.
    http://wiki.apache.org/ws/FrontPage/Axis2/

  • Received HTTP response code 404 : Not Found

    I am attempting to pass a file through XI into an IDoc to ECC.  I have tested the mapping, and that works fine.  I have also tested the configuration in the integration builder and it seems to be fine.  However, when the file is picked up by XI from the directory, processed by XI, and then sent to ECC, an error occurs in the runtime workbench:
    Transmitting the message to endpoint http://server:port/sap/xi/engine?type=entry using connection AFW failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Received HTTP response code 404 : Not Found.
    The error leads me to believe that the system cannot be found, or there is a privelage issue with the service user attempting to log onto ECC.  However I believe I have set up the RFC connection correctly, and the service user should be fine.
    Does anyone know what may be causing this?  I am using the IDoc adapter for the reciever communication channel.  I have set the RFC destination (and tested it in SM59, works fine) and the port (I assume this is the port in WE21?).  Not sure where to look...

    Being that the error says:
    Transmitting the message to endpoint http://server:port/sap/xi/engine?type=entry using connection AFW failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Received HTTP response code 404 : Not Found.
    I am trying to understand what this means.  Can anyone explain to me why the message is getting sent to this address?  I assume that the AFW is coming into play because I am using the IDoc adapter, hence the adapter framework.  Is this true?  Should the AFW be showing up, or do you think there is another issue?
    Mainly I want to know if this is more of a basis issue, or a configuration problem with the interface in XI?

  • HTTP response code 500 : Error during Sender Agreement Determination

    I am trying a simple file to file scenario and messages are not being received in Integration Server.
    Through communication channel monitoring, i have received the below error message.
    Error Transmitting the message to
    endpoint http://<hostname>:50000/sap/xi/engine?type=entry using
    connection File_http://sap.com/xi/XI/System failed, due
    to:
    com.sap.engine.interfaces.messaging.api.exception.MessagingException:
    Received HTTP response code 500 : Error during Sender
    Agreement Determination.
    Can you please help
    Regards
    Harish

    Hi Harish,
    http://<hostname>:50000/sap/xi/engine?type=entry
    it should be http://<hostname>:8000/sap/xi/engine?type=entry not 50000 as port It should be your HTTP port...please .make the changes !!
    In SXMB_ADM transaction under Integration engine configuration please change the settings to http://<hostname>:8000/sap/xi/engine?type=entry
    make sure with your basis team that ur http port is 8000 or 8001 ..as per that make the necessary changes..
    Regards,

  • RFC  Received HTTP response code 500 : Timeout error

    Hi All.
    I am getting the following error for the RFC sender:
    Transmitting the message to endpoint http://pocitmsprdxi.crisp.com:8000/sap/xi/engine?type=entry using connection RFC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Received HTTP response code 500 : Timeout.
    The RFC sends the data to XI through RFC and at times the data is not entering XI and the error shown above occurs.
    How do i solve this?

    Hi Lavanya,
    For these kind of problem, you need to set proctimeout smicm as per SAP note - 824554 .
    Application threads in the J2EE engine might have got consumed in high load situations. Increase the count of application threads in config tool at location Config Tool -> cluster-data -> <configuration template> -> <instance-ID> -> managers -> ApplicationThreadManager -> MaxThreadCount.
    And also Increase the parameter ServletInputStreamTimeout.
    Hope this helps to you.
    Regards,
    P.Rajesh

  • Received HTTP response code 500 with acknowledgment

    Hello,
    This is my process : R/3 (Idoc) -> XI -> 3rdParty(CSV).
    I use R/3 4.6C and XI 3.0 SP10
    This work fine but there is a problem with the acknowledgment :
    Transmitting the message to endpoint http://<server>:8000/sap/xi/engine/entry?action=execute using connection AFW failed, due to: Received HTTP response code 500..
    I use this Weblog : /people/saravanakumar.kuppusamy2/blog/2005/01/20/configuration-tips-for-a-business-serviceintegration-process-to-send-back-ale-audit-idoc
    and all I can find in this forum.
    What can I do ?
    Thanks
    Regards
    Message was edited by: Christophe DUMONT

    HTTP 500 is an error caused at the Web Server side. Any http connection happens in 4 steps:
    1) Obtain the IP address from the URL - provied by DNS
    2) Open Ip Socket for that IP
    3) Use this socket to write data
    4) Receive data stream back from the server.
    This data stream which is passed by the server has status codes. If there is a status code 500, this is trapped only at the last level and client is not able to resolve the status.
    You would want to look at the 4 points of faliure mentioned above. And it would help if u get someone on the Web Server side to look at the server logs. These logs are more descriptive and will provide a clue to set things right.
    let us know if u are able to resolve the issue.

  • IOException  :server returned http response code:505 for url url

    hi,
    my program creates IOException server returned http response code:505 for url <some url>
    I close the i/p stream.I dont know ,where is the problem.plz let me know.Thanks in advance.
    Here is the code:
    public class CallApplicationURL
    private static final String className = "[CallApplicationURL] ";
    private MailAlert ma = new MailAlert();
    public String callURL(String purl, RequestObject ro, Debug log)
         URL url = null;
         String URLResponse = "No response from Provider";
         ProxySetter ps = new ProxySetter();
         try
              ps.setProxy(ro, log);
              url = new URL (purl);
         catch (Exception e)
         URLResponse = className+"Exception while URL assignment \n"+purl+"\n, Exception is "+e;
         return (URLResponse);
         try
         HttpURLConnection h = (HttpURLConnection) url.openConnection();
         h.connect();
         BufferedReader br = new BufferedReader( new InputStreamReader( h.getInputStream() ) );
         URLResponse = br.readLine();
         br.close();
         catch (Exception e)
              URLResponse = className+"Exception while calling URL "+purl+", Exception is "+e;
         return (URLResponse);
         return (URLResponse);
    }

    http response 505: http://libraries.ucsd.edu/about/tools/http-response-codes.html
    This would indicate nothing is wrong with your applet but with your http server (not supporting http 1.1??)
    A full trace might help:
    To turn the full trace on (windows) you can start the java console, to be found here:
    C:\Program Files\Java\j2re1.4...\bin\jpicpl32.exe
    In the advanced tab you can fill in something for runtime parameters fill in this:
    -Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|ext|liveconnect
    if you cannot start the java console check here:
    C:\Documents and Settings\userName\Application Data\Sun\Java\Deployment\deployment.properties
    add or change the following line:
    javaplugin.jre.params=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    The trace is here:
    C:\Documents and Settings\your user\Application Data\Sun\Java\Deployment\log\plugin...log
    When you catch the exception you should print the stacktrace: (e.printStackTrace()).

  • SRM SUS PO response:HTTP response contains status code 401

    Hi,
    While sending the PO response from SUS to mm am getting the error as below in SUS :
    SAP:Stack>HTTP response contains status code 401 with the description Unauthorized
    Authorization error while sending by HTTP (error code: 401, error text: Unauthorized)
    Please advise.
    Thanks,
    Venky

    Hi,
      Is this the error you see when you click on "Send" button from POResponse? Or, does it happen when SUS is trying to send the XML message through PI/XI?
    SG

  • HTTP Response code 500 ERROR

    Dear All,
    I am using Tomcat 4 and J2SE 1.4.2 and winXp. I am try to write a simple server/client program using servlet to connect them.
    I am using URLConnection in client side to connect server. However, when i try to get the input/output stream from URLCOnnection object, Error Occur
    java.IO.Exception: server response return code: 500 for URL http://localhost:8080/examples/servlet/CPServlet
    I dunno why it happens, Can you tell the reason or simply tell me the solution.
    Below is my code
    // Client
    import java.net.URL;
    import java.net.URLConnection;
    import java.io.*;
    public class Customer
         ObjectInputStream oin = null;
         ObjectOutputStream oout = null;
         URLConnection conn = null;
         public Customer()
              try
                   URL url = new URL("http://localhost:8080/examples/servlet/CPServlet");
                   conn = url.openConnection();
                   conn.setDoOutput(true);
                   conn.setDoInput(true);
                   conn.setUseCaches(false);
                   conn.setRequestProperty("Content-type","application/x-java-serialized-object");
                   conn.connect();
                   oin = new ObjectInputStream(conn.getInputStream());
                   //oout = new ObjectOutputStream(conn.getOutputStream());
                   System.out.println("Connected");
              catch (Exception e)
                   e.printStackTrace();
                   System.exit(1);
         public static void main(String[] args)
              Customer cust = new Customer();
              try
                   //Message msg = cust.receiveContent();
                   //System.out.println("Received " + msg.getInt());
              catch (Exception e)
                   e.printStackTrace();
                   System.exit(1);
         public Message receiveContent()
              Message msg = (Message)MyUtil.getObjectThrSocket(oin);
              System.out.println("Successfully receive content from Server");
              return msg;
    // Server
    import java.io.*;
    import javax.servlet.http.*;
    import javax.servlet.*;
    public class CPServlet extends HttpServlet {
         // field
         ObjectOutputStream oout = null;
         ObjectInputStream oin = null;
         public void doGet (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
              System.out.println(request.getMethod());
              response.setContentType("application/x-java-serialized-object");
              oout = new ObjectOutputStream(response.getOutputStream());
              oin = new ObjectInputStream(request.getInputStream());
    Thanks

    I'm new to Servlet development, but I'll try to help.
    The error code 500 usually means the servlet is confused, so you will want to focus server side. And in your case, you have created an output stream on your response object before you have created an input stream on your request object. I don't think that is correct. I think the order of those two processes needs to be reversed. Read the request headers first, then construct the response.

  • Java.io.IOException: Server returned HTTP response code: 500 for URL:

    Hi,
    I am using java.net.URLConnection to invoke servlet which uses oracle.xml.sql.dml.OracleXMLSave for dml operations.
    I am facing below exception.
    09/05/26 17:47:50 java.io.IOException: Server returned HTTP response code: 500 for URL: http://xxx.com/servlets/com.xxx.qu.XMLDocPostOracleInsert
    09/05/26 17:47:50 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpConnection.java:)
    09/05/26 17:47:50 at com.xxx.util.http.HTTPRequester.makePostRequest(HTTPRequester.java:)
    09/05/26 17:47:50 at com.xxx.qu.PostReceiver.doPost(PostReceiver.java:145)
    09/05/26 17:47:50 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    09/05/26 17:47:50 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    09/05/26 17:47:50 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810)
    09/05/26 17:47:50 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
    09/05/26 17:47:50 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
    09/05/26 17:47:50 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
    09/05/26 17:47:50 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
    09/05/26 17:47:50 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    09/05/26 17:47:50 at java.lang.Thread.run(Thread.java:534)
    The oraclexmlsave operations are with in try-catch block as shown below, but its not getting caught there(Donnno Whyy????).Instead its giving
    exception at HttpURLConnection.getInputStream
    try{
    System.out.println("entered try :1");
    String Query="SELECT * from global_name";
    Statement CntStmt=con.createStatement();
    ResultSet rsEmailAlertQuery=CntStmt.executeQuery(Query);
    while(rsEmailAlertQuery.next()){
    System.out.println(rsEmailAlertQuery.getString(1));
    OracleXMLSave oxs = new OracleXMLSave(con,insertObject);
    System.out.println("MI B: ");
    oxs.setRowTag("row");
    oxs.setIgnoreCase(true);
    int rowsInserted = oxs.insertXML(xd);
    System.out.println("MI C: ");
    out.println("<success>TRUE</success>");
    con.commit();
    System.out.println("MI D: ");
    catch(OracleXMLSQLException e){
    System.out.println("OracleXMLSQLException");
    e.printStackTrace();
    catch(SQLException e){
    System.out.println("SQLException");
    e.printStackTrace();
    catch(Exception e){
    System.out.println("Exception");
    e.printStackTrace();
    Normal jdbc queries(rsEmailAlertQuery) are working properly.The problem is only with OracleXMLSave.
    Any help would be greatfull.
    Edited by: suryaraj on 29-May-2009 06:45

    Hi,
    May be you can get the description of the error on the server log of the server running on ip:url
    -Priyanka

  • HTTP_RESP_STATUS_CODE_NOT_OK HTTP response contains status code 500 with th

    hello friend,
    I have developed a proxy to JDBC synchronous scenario.
    My scenario works like this.
    i run an abap program which calls a client proxy,
    the proxy fetches the data from database table and returns the data in the ABAP program.
    My program is working fine but there is a small problem.
    when i run the report for the first time, it gives me an exception while calling proxy
    HTTP_RESP_STATUS_CODE_NOT_OK HTTP response contains status code 500 with the description Timeout
    and when i run the report for the second time with same variant it works fine.
    i can see the exception mostly in the morning when i run the report for the first time
    please help me to find the solution of this problem.
    thanks
    kannu.

    1. Increase the proctimeout in smicm as per note - 824554
    2.   Application threads in the J2EE engine might have got consumed in high load situations.
    Increase the count of application threads in config tool at location Config Tool -> cluster-data ->
    <configuration template> -> <instance-ID> -> managers -> ApplicationThreadManager ->
    MaxThreadCount
    3.    Increase the parameter ServletInputStreamTimeout from 180000 to 1728000000.
    Steps for setting this parameter:
    a.   If you have configured ICM to forward requests to the J2EE dispatcher then apply Note
    1048692. If the problem is not resolved, then apply section b.
    b.   The request bytes are reaching the Engine too slowly
    i.    Start the configtool in <J2EE>/configtool directory
    ii.    Browse the tree in the left pane
    cluster-data -> Global server configuration -> services -> http
    iii.    Press the ServletInputStreamTimeout key in the keylist on the right
    iv.    Change the value of the "Value" field at the bottom of the right pane to the
    preferred one (in milliseconds).
    -1 means there is no timeout - that is unless the full request comes into a single
    chunk, an error will be thrown
    180000 means the Engine would wait for 3 minutes for any byte to be entered in
    the stream.
    1728000000 means the Engine would wait for 20 days for any byte to be entered
    in the stream 
    v.    Press the "Set" button in the top-right corner
    vi.    Select from the menu File -> Apply and confirm all popups.
    vii.    Restart the Engine for changes to take effect

  • HTTP response code 403 (forbidden)

    Hi, my name is Sebastiano and I'm a student.
    I'm developping a Server-Client application for Web in 100% Java.
    My application comunicates with a browser (Explorer) through a socket to satisfy http request.
    So my application is between the browser and the web (like a proxy).
    My application create an HttpUrlConnection with the URL contained in the http request getting from the browser, receive the response (the content of the url requested) from this URL and after doing some task with it, send it to browser as response.
    However some site (in particular www.google.com when my application send to it a query of research) gives to my application http response code 403 (forbidden) raising an "java.io.IOException: Server returned http response code: 403 for URL ...".
    There is someone who can help me ... may questions are:
    Why my application get this respone code?
    There is something to set in HttpUrlConnection to avoid this response?
    How can I avoid this response?
    Thank you very much for yuor reply,
    Sebastiano.

    Read this page:
    http://www.google.com/terms_of_service.html
    Especially the section headed "No Automated Querying".

Maybe you are looking for

  • Multiple users/iTunes, one computer/account

    We currently have one computer and 3 separate iTunes libraries running off of a single account. We want to transfer 2 of the 3 libraries to 2 descrete computers, but are afraid that "authorizing" a new computer to allow syncing with the single accoun

  • How do you create two apple ids for one email address.

    I bought two i pads for my kids. Since we have just one email address, everytime I try to create a new apple id it says I already have one. They need separate ids so their friends can facetime with one and not the other. Can't figure out how to creat

  • Xslt mapping cidx message is Load Tender Motor

    Hi I am working on XSLT  Mapping from the below link SAP Technical Import corresponding XSD structure under External Definitions in IR. Here the corresponding CIDX message is Load Tender Motor. In the above line what is CIDX, I have little bit knowle

  • FAQ - Ancile RWD SPP compatibility with IE 9

    There may be problem starting RWD client when IE 9 is installed on the client machine. This can happen for version below SPP 4.31. For version SPP 4.31, there are some successful stories but this is not officially supported by Ancile as Ancile RWD is

  • Measuring performance tcp udp connection using java

    ho find t answers for these questions .. 1. Is it possible to set some upper cut off for the data rate or transmission rate in TCP or UDP ? 2. IF true, get t source code for t same ? 3. is it possible to measure t data rate of a TCP or UDP connection