HttpURLConnection returns overlaping responses for concurrent requests

Hi,
we are facing an issue in making HttpURLConnection requests. Our servlet has to make HttpURLConnection to another server (Both request and response body to be passed is xml, that is the contract with server which we are firing requests to). User can fire 2 concurrent requests one after another with out waiting for first request to be completed. When two requests are fired, two threads are executing the below block of code with no time. And the problem is first response is empty second response contains data for both responses
           URL url = new URL(urlStr);
            HttpURLConnection c = (HttpURLConnection) (url.openConnection());
            c.setRequestMethod("POST");
            c.setRequestProperty("Content-Type", "text/xml; charset=\"utf-8\"");
            c.setDoOutput(true);
            out = new BufferedOutputStream(c.getOutputStream());
            out.write(requestData.getBytes("UTF-8"));
            out.close();
            String inputLine = null;
            StringBuffer sBuffer = new StringBuffer();          
            in2 = new BufferedReader(new InputStreamReader(c.getInputStream(), "UTF-8"));
            while ((inputLine = in2.readLine()) != null) {
                sBuffer.append(inputLine);
                sBuffer.append("\n");
            String responseXML = sBuffer.toString();and the above code is in separate static class. we tried using third party implementations for HttpURLConnection instead of sun implementation. NO LUCK.
Any help in resolving this issue would be of great help
Thanks,
JKChaitanya

JKChaitanya wrote:
"in2" is also local variable to the method, only "requestData" comes from servlet's doPost method, all other variables are local to the method in which HttpURLConnection code is availableIt seems to me that the implication is that the server you are chaining to is not thread safe and can only handle one request at a time. This means that you will have to process the requests sequentially. Two obvious approaches - use synchronisation or use a request queue. To test the hypothesis it would be very easy to use synchronisation on your servlet class object. Note - you cannot reliably synchronise on the servlet instance since your server may be configured to use more than one instance.

Similar Messages

  • PO 7.4: NW BPM: HTTP Error response for SOAP request or invalid content-type.HTTP 200 OK

    Hi Experts
    I am trying to call NW BPM scenario(File to BPM) from PI, and using below adapter config.
    I am getting below error.
    Failed to call the endpoint: Error in call over HTTP: HTTP 200 OK
    SOAP: Call failed: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 200 OK
    SOAP: Error occurred: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 200 OK
    MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 200 OK
    Transmitting the message to endpoint <local> using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 200 OK
    Any idea how to fix this issue?
    Thanks,
    Sandeep Maurya.

    Hi Sandeep,
    Test the URL from your browser and check the proxy settings as well.
    Refer the below links
    SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT
    SOAP: Call failed: java.io.IOException: Failed to get the input stream from socket: java.net.SocketException: Connection…
    Regards
    Bhargava Krishna

  • SOAP Receiver Error: HTTP Error response for SOAP Request

    Hi gurus,
    I'm facing a weird error in File --> PI 7.31 java only --> soap receiver proxy.
    The other interfaces runs well. just one get the the following error:
    Exception caught by adapter framework: java.io.IOException: Error receiving or parsing request message: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.
    I check the payload and test in the inbound proxy. on error.
    Any hints?
    Thanks a lot!
    regards
    Christine

    Hello Christine,
    I faced the same issue,
    You can use the beans below to overcome the error.
    And charset should be utf-8

  • Sending Multiple response for a request

    Hi,
    I have a HTML form and have used a post method to send the details in the form to my web service. Inside my web service, I perform a validation with the data received and send back a error message if the data received is not proper.
    Suppose if the data is proper, I am querying a database and after all the processing is done,I am invoking a URL.
    I just want to know a couple of things.
    1.) In case the input data to my web service is fine, can I send back a response saying that the data receieved is proper and then continue with the other processing like querying the DB for the same request? I need to do the actual process also and then invoke a url in the end.
    2.) If not, in case the input data is proper and after all the processing is done, can I inovke the url by using sendRedirect func of the response object and also finally return the status for that particular request?
    Eg: public String FuncA(){
    //Some processing with input data
    try{
    servletResponse.sendRedirect(URL);
    return "Successfull"
    Will the above one work? Like am invoking a URl using redirect and then finally am returning a message back. Will both the things together work? Both the url to which it is returned as well as the url given in the redirectmethod() is different.
    Please provide some inputs.
    Thanks in advance.

    Hi,
    I am using REST webservice. Also, currently there is no session being maintained or any request object. Currently, the input to the webservice will be obtained as a string value. After some processing with the input, I have to invoke the URl as well return a message to the one that calls this webservice.

  • Can't view output for concurrent request

    I apologize if this is a common error - I tried to research this in the forums but didn't find anything that I haven't already tried. I checked the OPP - it is running with 3 processes - no error in the log that I can see. I checked the profile for the OPP timeout and have increased it....
    I have registered the data definition, registered and associated a template - created the concurrent program but when I try to run it completes with a warning and can't view output. The log states:
    XDO Data Engine Version No: 5.6.3
    Resp: 20420
    Org ID : 81
    Request ID: 2322744
    All Parameters: PO=5026930
    Data Template Code: GISDOSXML
    Data Template Application Short Name: XXGISD
    Debug Flag: N
    {PO=5026930}
    Calling XDO Data Engine...
    Start of log messages from FND_FILE
    End of log messages from FND_FILE
    Executing request completion options...
    ------------- 1) PUBLISH -------------
    Unable to find an Output Post Processor service to post-process request 2322744.
    Check that the Output Post Processor service is running.
    ------------- 2) PRINT   -------------
    Not printing the output of this request because post-processing failed.
    --------------------------------------

    also - I found a note on using the XML Republish Report and I tried it with the report I ran and it erred completely. Here is the log for the republish:
    Oracle XML Publisher 5.6.3
    Updating request description
    Waiting for XML request
    Retrieving XML request information
    Preparing parameters
    Process template
    --XDOException
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at oracle.apps.xdo.common.xml.XSLT10gR1.invokeParse(XSLT10gR1.java:517)
         at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:224)
         at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:177)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
         at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1657)
         at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:967)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5888)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3438)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3527)
         at oracle.apps.xdo.oa.cp.JCP4XMLPublisher.runProgram(JCP4XMLPublisher.java:683)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    Caused by: oracle.xdo.parser.v2.XMLParseException: '=' missing in attribute.
         at oracle.xdo.parser.v2.XMLError.flushErrors1(XMLError.java:324)
         at oracle.xdo.parser.v2.NonValidatingParser.parseAttrValue(NonValidatingParser.java:1556)
         at oracle.xdo.parser.v2.NonValidatingParser.parseAttr(NonValidatingParser.java:1461)
         at oracle.xdo.parser.v2.NonValidatingParser.parseAttributes(NonValidatingParser.java:1394)
         at oracle.xdo.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1225)
         at oracle.xdo.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:314)
         at oracle.xdo.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:281)
         at oracle.xdo.parser.v2.XMLParser.parse(XMLParser.java:266)
         ... 17 more

  • Overlapping trips (for Travel Request - TP04)

    Hi, Gurus
    Is there any way so that I can create 2 or more travel requests using the same period for the same employee? It would be a desirable requirement here in our company.
    I know that through 'FITVFELD' transaction I can choose, for a given travel schema, if I want to allow overlapping trips (checkbox "Overlapping Trips Allowed"). But it works only for the expense reports ("TRIP" transaction) related to the schema selected. For travel request (TP04) I can't do that.
    An example: with "Overlapping Trips Allowed" checked for schema A, I am able to create 2 or more expense reports (schema A) from 11/09/2010 to 11/16/2010. But if I try to create a new travel request (TP04) within this period, the system throws an error.
    PS: As we know, unfortunately schema "PL" (Travel Planning) doesn't have "Overlapping Trips Allowed" checkbox... It manages some travel request parameters.
    Thank you
    Roberto

    Hi robtaboaco  ,
    you can create two or more overlapping trip.
    it will just give u warning if u have overlap trip. but you can still save it.
    here's the link, hope it helps to explain..
    http://wiki.sdn.sap.com/wiki/display/ERPHCM/OverlappingTripRequest
    Regards,
    nz.

  • How can I get the responsibility for concurrent programs

    Guys,
    How can I get the responsibility for a list of concurrent programs. Is there a query that I can run to get the results?
    Thanks in advance,

    Refer to Note: 134036.1 - WHOCANRUN.SQL - List Responsibilities That Can Run a Given Concurrent Program
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=134036.1
    From the output of the query in the note referenced above, you can run "Users of a Responsibility" concurrent program then to find out the list of users who have access to a certain responsibility.

  • Sql tuning advisor for concurrent requests

    Dear all,
    I am having one doubt in my mind from very long time.Can we use sql tuning advisor from 10G(EM) to tune concurrent requests and reports?
    Regards

    Hi Helios,
    I am just thinking wiht voice. If you have one code blog which is typed in sql-pl/sql for your concurrent request, its going and run on dbtier. So it has one SQL'ID and also can be check on AWR report. So i belive you can use sqltuning adviser for to can tune related sqlAFAIK, some Instances a single concurrent request may contain multiple SQLID's and in that scenario tuning approach is difficult. Any information how can we consolidate it. If tune one specific sql then the explain plan for other sql become more worst. I came across this situation so many time.
    Any information or inputs on this is really appreciated.
    thanks,
    X A H E E R

  • Notification failure for concurrent requests

    Hi,
    Here, we have a situation where there are concurrent requests which are completing normal for a user, but no notification is being sent to that user after completing the request. Checked both user and mail ID and both are fine. What could be the reasons for this failure. Please advice ASAP

    Please post the details of the application release, database version and OS.
    Here, we have a situation where there are concurrent requests which are completing normal for a user, but no notification is being sent to that user after completing the request. Checked both user and mail ID and both are fine. What could be the reasons for this failure. Was this working before? If yes, any changes been done recently?
    Can you find any errors in the Workflow log files?
    Please verify the value of the (Email Style) from the user preferences and make sure it is set properly.
    Workflow Java Mailer & Notifications FAQ [ID 562551.1] -- Why would Workflow Email Notifications not be received for a user, but are for others?
    Please advice ASAPFor urgent requests, please log a SR.
    Thanks,
    Hussein

  • How are OAM custom authentication plugins used for concurrent requests

    Custom authentication plug-ins are loaded by Access Server.
    I want to understand how they are used or how they work when multiple concurrent request start pouring in.
    Thanks.

    The access server is a multi-threaded application. The "Fn" function of the plugin is executed in each of the thread of the access server.

  • Client server null response for some requests!

    Hi, I have a client server application. When run on my local machine it runs fine. However when is put on the unix server some requests come back with null responses. I have logging implemented and the response in the logs is fine but it doesnt get sent back to the client. There is no timeout set either! any ideas?

    If you get an empty reponse (note that you cannot get a null response) then your server is probably encountering an error that is subsequently being caught before any response is written. Check your server code for "catch" staments that throw away the exception.
    If the server does not suffer this problem then your client does.
    matfud

  • How to create two respone for one request

    Hi
    is there any way for us to create two response for one request
    the scenario is as below
    1. user click on update button for particular record in the datatable (
    after its get updated and status get updated = 'UPDATED' it will remove the object from ObjectListDataProvider and clear the tablePhaseListener ).
    2. After it gets updated successfuly , i want to prompt the user with generateExcel function which using response.getOutputStream() using Apache POI.
    How can we combine 1 and 2 together
    Here what i have tried and didnt work
    1. i tried to put the generateExcel function in destroy() method after page is rendered but it gives me Exception
    2. i tried to put the generateExcel function in prerender() method
    but the page will only execute the generateExcel function
    - the data still get updated to the database but it doesnt refresh the page ( i meant the removing object and tablephaseListener.clear() doesnt work )
    3 . i tried to put generateExcel Function after it process the data
    public String updateData()
           //update data
           if(success){
                // prompt user to save excell sheet
            return null;
         }This one also doesnt work and gives the same behaviour as number 2
    The Prompt to save excel sheet still gets popped up
    but the page just doesnt get refreshed
    Thanks
    is anybody know the workaround?

    yea i did set some alert message and clear the table by calling
    provider.removeRow and commitChanges
    it just doesnt reflected in the page that we see
    by actually is already removing the row from the provider
    Thanks

  • Concurrent Request 를 처리하는 File과 Tables

    제품 : AOL
    작성날짜 : 2003-12-02
    Concurrent Request 를 처리하는 File과 Tables
    =================================================
    PURPOSE
    이 Note는 Concurrent Reqeust output & Log 의 저장위치와 DB내 저장되는
    Object들에 대한 설명입니다. Purge Concurrent Request and Output을 실행할때 다음 table들의 해당 record들이 삭제됩니다.
    Explanations
    - FND_CONCURRENT_REQUESTS
    This table contains a complete history of all concurrent requests and
    stores information about all submitted jobs(requested directly or by a
    report set) within applications.
    There's one request_id for each requested job in this tables.
    - FND_RUN_REQUESTS
    When a user submits a report set, this table stores information about the
    reports in the report set and the parameter values for each report.
    Stores information about all request sets submittted within applications.
    Columns parent_request_id and request_id reflect the job# for the
    report-set and the jobs it calls to.
    - FND_CONC_REQUEST_ARGUMENTS
    This table records arguments passed by the concurrent manager to each program
    it starts running.
    FND_DUAL
    This table records when requests do not update database tables.
    FND_CONCURRENT_PROCESSES
    This table records information about Oracle Applications and operating system
    processes.
    FND_CONC_STAT_LIST
    This table collects runtime performance statistics for concurrent requests.
    FND_CONC_STAT_SUMMARY
    This table contains the concurrent program performance statistics generated by
    the Purge Concurrent Request and/or Manager Data program.
    The Purge Concurrent Request and/or Manager Data program uses the data in
    FND_CONC_STAT_LIST to compute these statistics.
    FND_CONC_PP_ACTIONS
    Stores the post request processing actions(e.g., print, notify) for each
    submitted request. There's a concurrent_request_id here for each request_id
    in the FND_CONCURRENT_REQUESTS.
    FND_RUN_REQ_PP_ACTIONS
    Stores the post request processing actions(e.g., print, notify) for
    submitted request set programs that are stored in FND_RUN_REQUESTS.
    Reference Documents
    Note 132823.1

  • How to get the concurrent request id while running a concurrent program

    Hi All,
    I am working with oracle apps r12.
    I have created a custom report with some parameter. And i have created a parameter P_CONC_REQUEST_ID.
    And in the report i have used SRW.USER_EXIT('FND SRWEXIT'); in after report and SRW.USER_EXIT ('FND SRWINIT'); in before report trigger.
    when i ran the report from the application, I didnt get the conc request id in the parameter. It not passing the concurrent request id.
    Can any one tell me how to bring the concurrent request id.
    Thanks & regards
    Srikkanth
    Edited by: Srikkanth.M on Mar 14, 2012 1:56 PM

    Hi;
    FND_CONCURRENT_REQUESTS
    This table contains a complete history of all concurrent requests.
    FND_RUN_REQUESTS
    When a user submits a report set, this table stores information about
    the reports in the report set and the parameter values for each report.
    FND_CONC_REQUEST_ARGUMENTS
    This table records arguments passed by the concurrent manager to each program it starts running.
    FND_DUAL
    This table records when requests do not update database tables.
    FND_CONCURRENT_PROCESSES
    This table records information about Oracle Applications and operating system processes.
    FND_CONC_STAT_LIST
    This table collects runtime performance statistics for concurrent requests.
    FND_CONC_STAT_SUMMARY
    This table contains the concurrent program performance statistics generated by the Purge Concurrent Request and/or Manager Data program. The Purge concurrent Request and/or Manager Data program uses the data in FND_CONC_STAT_LIST to compute these
    Also see:
    concurrent request details
    Find history of concurrent request details
    How to determine the user who placed a certain concurrent request?
    Regard
    Helios

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

    Hi,
    I am calling below method in ADF 11g Ver 11.1.2.3.0 . for creating report in our developed Form Report Apps.
    below generated URL accessible in browser and showing pdf but runtime this URL is not opening automatically and throwng some error.
    http://ittest:7779/reports/rwservlet?orientation=PORTRAIT&desformat=PDF&destype=cache&desname=RF07D10.pdf&server=repittest11&report_execution_mode=RUNTIME&P_DOCCOD=24&report_comm_mode=SYNCHRONOUS&P_COMCOD=5&report=H:\ami\RF07D10.rdf&userid=refmdba/refm11gtest@refm11g&P_DOCNO=945861&disposition=inline&P_DOCFYR=2013
    public static void fileUrl(String fAddress, String localFileName, String destinationDir) {
    System.out.println("\n mak fAddress = "+fAddress+"\n mak localFileName="+localFileName+"\n mak mak destinationDir = "+destinationDir);
    OutputStream outStream = null;
    URLConnection uCon = null;
    //InputStream is = null;
    InputStream is = null;
    try {
    URL url;
    byte[] buf;
    int ByteRead, ByteWritten = 0;
    url = new URL(fAddress);
    outStream = new BufferedOutputStream(new FileOutputStream(destinationDir + "\\" + localFileName));
    System.out.println("outStream = "+outStream);
    uCon = url.openConnection();
    System.out.println("uCon = "+uCon);
    is = uCon.getInputStream(); //Error Caught in this line
    System.out.println("is = "+is);
    buf = new byte[size];
    while ((ByteRead = is.read(buf)) != -1) {                 
    outStream.write(buf, 0, ByteRead);
    ByteWritten += ByteRead;
    System.out.println("Downloaded Successfully.");
    System.out.println("File name:\"" + localFileName + "\"\nNo ofbytes :" + ByteWritten);
    } catch (Exception e) {
    System.out.println("Exception Caught");
    e.printStackTrace();
    } finally {
    try {
    is.close();
    outStream.close();
    } catch (IOException e) {
    e.printStackTrace();
    SOP for confirmation, in console all variables and parameter have value
    fileName = refm11gtest@refm11g&P_DOCNO=945861&disposition=inline&P_DOCFYR=2013
    mak fAddress = http://ittest:7779/reports/rwservlet?orientation=PORTRAIT&desformat=PDF&destype=cache&desname=RF07D10.pdf&server=repittest11&report_execution_mode=RUNTIME&P_DOCCOD=24&report_comm_mode=SYNCHRONOUS&P_COMCOD=5&report=H:\ami\RF07D10.rdf&userid=refmdba/refm11gtest@refm11g&P_DOCNO=945861&disposition=inline&P_DOCFYR=2013
    mak localFileName=refm11gtest@refm11g&P_DOCNO=945861&disposition=inline&P_DOCFYR=2013
    mak mak destinationDir = D://Resource
    outStream = java.io.BufferedOutputStream@b8c77f
    uCon = sun.net.www.protocol.http.HttpURLConnection:http://ittest:7779/reports/rwservlet?orientation=PORTRAIT&desformat=PDF&destype=cache&desname=RF07D10.pdf&server=repittest11&report_execution_mode=RUNTIME&P_DOCCOD=24&report_comm_mode=SYNCHRONOUS&P_COMCOD=5&report=H:\ami\RF07D10.rdf&userid=refmdba/refm11gtest@refm11g&P_DOCNO=945861&disposition=inline&P_DOCFYR=2013
    Error Console
    Exception Caught
    java.io.IOException: Server returned HTTP response code: 502 for URL: http://ittest:7779/reports/rwservlet?orientation=PORTRAIT&desformat=PDF&destype=cache&desname=RF07D10.pdf&server=repittest11&report_execution_mode=RUNTIME&P_DOCCOD=24&report_comm_mode=SYNCHRONOUS&P_COMCOD=5&report=H:\ami\RF07D10.rdf&userid=refmdba/refm11gtest@refm11g&P_DOCNO=945861&disposition=inline&P_DOCFYR=2013
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
         at amgdom.refm.view.managebean.authentication.UrIDownload.fileUrl(UrIDownload.java:34)
         at amgdom.refm.view.managebean.authentication.UrIDownload.fileDownload(UrIDownload.java:64)
         at amgdom.refm.view.managebean.collection.MakePayment2.callReport(MakePayment2.java:259)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:112)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:106)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:787)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1252)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:973)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:354)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    <ActionListenerImpl> <processAction> java.lang.NullPointerException
    javax.faces.el.EvaluationException: java.lang.NullPointerException
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:112)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:106)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:787)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1252)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:973)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:354)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.NullPointerException
         at amgdom.refm.view.managebean.authentication.UrIDownload.fileUrl(UrIDownload.java:48)
         at amgdom.refm.view.managebean.authentication.UrIDownload.fileDownload(UrIDownload.java:64)
         at amgdom.refm.view.managebean.collection.MakePayment2.callReport(MakePayment2.java:259)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
         ... 54 more
    <RichExceptionHandler> <_logUnhandledException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
    javax.faces.FacesException: #{makePayment2.callReport}: java.lang.NullPointerException
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:112)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:106)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:787)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1252)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:973)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:354)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         ... 53 more
    Caused by: java.lang.NullPointerException
         at amgdom.refm.view.managebean.authentication.UrIDownload.fileUrl(UrIDownload.java:48)
         at amgdom.refm.view.managebean.authentication.UrIDownload.fileDownload(UrIDownload.java:64)
         at amgdom.refm.view.managebean.collection.MakePayment2.callReport(MakePayment2.java:259)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
         ... 54 more
    <JUCtrlHierNodeBinding> <release> [3154] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_579, value:DummyVpartyDealDetVOIterator
    <JUCtrlHierNodeBinding> <release> [3155] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_579, value:DummyVpartyDealDetVOIterator
    <DCIteratorBinding> <releaseDataInternal> [3156] Releasing iterator binding:DummyVpartyDealDetVOIterator
    <DCIteratorBinding> <releaseDataInternal> [3157] Releasing iterator binding:vcRowsIterator
    <DCIteratorBinding> <releaseDataInternal> [3158] Releasing iterator binding:variableIterator
    <JUCtrlHierNodeBinding> <release> [3159] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_581, value:CompanyAMIVOIterator
    <JUCtrlHierNodeBinding> <release> [3160] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_581, value:CompanyAMIVOIterator
    <DCIteratorBinding> <releaseDataInternal> [3161] Releasing iterator binding:CompanyAMIVOIterator
    <DCUtil> <findSpelObject> [3162] DCUtil, returning:oracle.jbo.uicli.binding.JUFormBinding, for ptb1
    <JUCtrlHierNodeBinding> <release> [3163] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_581, value:CompanyAMIVOIterator
    <JUCtrlHierNodeBinding> <release> [3164] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_581, value:CompanyAMIVOIterator
    <DCIteratorBinding> <releaseDataInternal> [3165] Releasing iterator binding:CompanyAMIVOIterator
    <ADFLogger> <begin> Rollback transaction
    <ApplicationModuleImpl> <resetState> [3166] Resetting AM=Root
    <ApplicationPoolMessageHandler> <doPoolMessage> [3167] **** PoolMessage REQ DETACH LWS
    <May 21, 2013 4:22:17 PM AST> <Error> <HTTP> <BEA-101017> <[ServletContext@20213623[app:REFMApp module:amificweb path:/amificweb spec-version:2.5], request: weblogic.servlet.internal.ServletRequestImpl@182b8[
    POST /amificweb/faces/makePayment/makePayment_2?_adf.ctrl-state=spmhovpgy_24 HTTP/1.1
    Connection: keep-alive
    Content-Length: 316
    Cache-Control: max-age=0
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Origin: http://192.168.102.41:7101
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22
    Content-Type: application/x-www-form-urlencoded
    Referer: http://192.168.102.41:7101/amificweb/faces/makePayment/makePayment_2?_adf.ctrl-state=spmhovpgy_24
    Accept-Encoding: gzip,deflate,sdch
    Accept-Language: en-US,en;q=0.8
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
    Cookie: oracle.uix=0^^GMT+3:00; JSESSIONID=JTRBRb0FQQYDWJNvyL26fhj2MNPtyDwH05GtH2kDLLwqyBVLxPzD!1337581137
    ]] Root cause of ServletException.
    javax.faces.el.EvaluationException: java.lang.NullPointerException
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
         Truncated. see log file for complete stacktrace
    Caused By: java.lang.NullPointerException
         at amgdom.refm.view.managebean.authentication.UrIDownload.fileUrl(UrIDownload.java:48)
         at amgdom.refm.view.managebean.authentication.UrIDownload.fileDownload(UrIDownload.java:64)
         at amgdom.refm.view.managebean.collection.MakePayment2.callReport(MakePayment2.java:259)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         Truncated. see log file for complete stacktrace
    >
    Maroof

    dvohra21 wrote:
    Caused By: java.lang.NullPointerException
    at amgdom.refm.view.managebean.authentication.UrIDownload.fileUrl(UrIDownload.java:48)
    The file url is producing NullPointerException.Dear
    method fileUrl() not have problem,
    problem at line number 19.
    1.     public static void fileUrl(String fAddress, String localFileName, String destinationDir) {
    2.     System.out.println("\n mak fAddress = "+fAddress+"\n mak localFileName="+localFileName+"\n mak mak destinationDir = "+destinationDir);
    3.     OutputStream outStream = null;
    4.     URLConnection uCon = null;
    5.     //InputStream is = null;
    6.     InputStream is = null;
    7.     try {
    8.     URL url;
    9.     byte[] buf;
    10.     int ByteRead, ByteWritten = 0;
    11.     url = new URL(fAddress);
    12.     outStream = new BufferedOutputStream(new FileOutputStream(destinationDir + "\\" + localFileName));
    13.     System.out.println("outStream = "+outStream);
    14.     //Error Caught
    15.     uCon = url.openConnection();
    16.     System.out.println("uCon = "+uCon);
    17.     //---------------------------------
    18.     // is = uCon.getInputStream();
    *19.     is = uCon.getInputStream();*
    20.     System.out.println("is = "+is);
    21.     buf = new byte[size];
    22.     while ((ByteRead = is.read(buf)) != -1) {                 
    a.     outStream.write(buf, 0, ByteRead);
    b.     ByteWritten += ByteRead;
    23.     }
    24.     System.out.println("Downloaded Successfully.");
    25.     System.out.println("File name:\"" + localFileName + "\"\nNo ofbytes :" + ByteWritten);
    26.     } catch (Exception e) {
    27.     System.out.println("Exception Caught");
    28.     e.printStackTrace();
    29.     } finally {
    30.     try {
    a.     is.close();
    b.     outStream.close();
    31.     } catch (IOException e) {
    a.     e.printStackTrace();
    32.     }
    33.     }
    34.     }
    Maroof
    Edited by: Maroof Ahmad on May 22, 2013 9:19 AM

Maybe you are looking for

  • How to move an itunes library to new HDD...

    Hello, My Windows 7 pc HDD crashed and I had to replace it with a new SSD. I can access the old HDD via an external drive bay to get files off it and what not, it just won't run windows as it has become corrupted. So, I was wondering if it was possib

  • Output for dvd player

    I don't use Premiere Pro very often so I would like to ask a question to avoid any problems. I work with Maya and I need to create a regular DVD in order to be played in a DVD player as opposed to a PC.   What settings do I need to be mindful of to a

  • Problem in opening spread sheet from iview

    Hi Experts, I have a ecc report integrated as an iview in enterprise portal. I am trying to preview the iview and run the report. Iu2019m successfully executing the report, but while saving the report as a spread sheet (exce file to local drive)thoug

  • HT201276 How to unfreeze Mac in Force Quit Applications? Only mouse isresponding.

    Mac desktop was frozen in Firefox. I used the option-command-esc and this did not unlock. Also, shut down with on-off switch, unpluged, and held on-off for over 1 minute. Rebooted and now getting a file with question mark flashing. Any ideas out ther

  • Will outlook calendars synch with os6

    iCloud version 2.0 has serious issues with Outlook 2007.  Although synching will take place, you cannot edit calendars--cannot copy, paste, backspace, etc.  Had to uninstall and install iCloud 1.0.  Was told by tech support Apple iCloud 2.0 does not