Error response: "java.io.BufferedReader@69d02b"

Hi,
I am trying the following code and encountered the error mentioned in the subject.This piece of code read a file online and prints its content into a web page. Can any one explain me what is causing it? I think it could be because my buffer is over loaded. if it is so then can some one show me how to crease the buffer size?
or any help will be appreciated.
Thank you.
* To change this template, choose Tools | Templates
* and open the template in the editor.
package cgSkewPackage;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.net.MalformedURLException;
import java.net.URL;
* @author Owner
public class CgSkew extends HttpServlet {
    public String getcgskew;
    public String url1;
    public String url2;
    public String getURL;
    public String inputLine;
    public BufferedReader in;
    * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
    * @param request servlet request
    * @param response servlet response
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
        //Getting the user input.
        getcgskew = request.getParameter("cgskew");
        // Check for null value.
        if((getcgskew == null ) || (getcgskew.trim().equals(""))){
            response.sendRedirect("http://www.genomecalculator.org/cg-skew/cg-skew.html");
            else{
                getcgskew = getcgskew.trim();
                url1 = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=genome&id=NC_";
                url2 = "&rettype=gb";
                getURL= url1+getcgskew+url2;
                // Opening buffer reader
             try{  
                URL geneBankLink = new URL(getURL);
                in = new BufferedReader( new InputStreamReader
                        (geneBankLink.openStream()));
             catch(MalformedURLException e) {
        response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
        try {
            out.println("<html>");
            out.println("<head>");
            out.println("<title>Servlet CgSkew</title>"); 
            out.println("</head>");
            out.println("<body>");
            // Printing out here the file content.
            out.println(in);
            out.println("</body>");
            out.println("</html>");
        } finally {
            out.close();
    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
    * Handles the HTTP <code>GET</code> method.
    * @param request servlet request
    * @param response servlet response
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
        processRequest(request, response);
    * Handles the HTTP <code>POST</code> method.
    * @param request servlet request
    * @param response servlet response
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
        processRequest(request, response);
}

I see. This is indeed not the way to download a file.
You should not print it as a String to the outputStream, but you should be rather streaming the whole inputStream contents to the outputStream inside a loop. Learn the Java IO basics: [http://google.com/search?q=java+io+tutorial+site:sun.com].
If you rather want to download it as an independent file instead of copying its content inside a HTML response, then rather write a servlet which does the task independently. Here is an example of such a servlet: [http://balusc.blogspot.com/2007/07/fileservlet.html].

Similar Messages

  • Error on java.util.NoSuchElementException

    Hi,
    I am facing an error "Exception in thread "main" java.util.NoSuchElementException" on my java code but i have no idea on how to solve this error. I have been figuring for very long but still no solution. Below is my code. Can anyone help? Thank in advance=D
    import java.io.FileReader;
    import java.io.BufferedReader;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.util.*;
    class Matrix {
          double[][] element;
         public static void getFile(String fileName) throws IOException{
            BufferedReader br = null;
            int numRows,numCols;
            Matrix m1 = new Matrix();
            try{
                  br = new BufferedReader(new FileReader(fileName));
                  String line = br.readLine();
                  //Get the number of rows
                  line = br.readLine();
                  StringTokenizer st = new StringTokenizer(line, "=");
                  st.nextToken();
                  String row = st.nextToken();
                  numRows = Integer.parseInt(row.substring(1));
                  //Get the number of columns
                  line = br.readLine();
                  StringTokenizer st2 = new StringTokenizer(line, "=");
                  st2.nextToken();
                  String col = st2.nextToken();
                  numCols = Integer.parseInt(col.substring(1));
                  line = br.readLine();
                  while ((line = br.readLine()) != null ){
                     //Declare and initialize the 2d array
                     m1.element = new double[numRows][numCols];
                     StringTokenizer st3 = new StringTokenizer(line, "</matrix>");
                     while(st3.hasMoreTokens()){
                          for(int r = 0; r < m1.element.length; r++){
                              for(int c = 0; c <= m1.element.length; c++){
                                 String record = st3.nextToken(" ");
                                 m1.element [r][c] = Double.parseDouble(record);
                      br.close();      
               }catch(FileNotFoundException ex){
                      System.out.println(ex.getMessage());
    }

    Tave wrote:
    Some things occur to me, none of which may be useful.
    Firstly, you have no constructor for your class.
    Secondly, you don't seem to have a main method, though this may be because this class is called by another.
    Thirdly, don't you have a line number or other identification for what is causing the exception?Thank for your reply=D
    Yap this is a class that is called by another class that why there is no main method for it. And for the line that causing the error is
    String record = st3.nextToken(" ");

  • Oracle error 1403:java.sql.SQLException: ORA-01403: no data found ORA-06512

    My customer has an issue, and error message as below:
    <PRE>Oracle error 1403: java.sql.SQLException: ORA-01403: no data found ORA-06512:
    at line 1 has been detected in FND_SESSION_MANAGEMENT.CHECK_SESSION. Your
    session is no longer valid.</PRE>
    Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.
    And customer’s statement is: Upgrade from EBS 11.5.10 to 12.1.3. Login the EBS, open any forms and put it in idle. Then refresh the form, error happens
    Then, I checked ISP, and found two notes:
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid (Doc ID 1284094.1)
    Note 1319380.1: Webadi Gl Journal Posting Errors After Atg R12.1.3 (Doc ID 1319380.1)
    But these two notes are both WebADI.
    Following is the data collection from customer:
    1. Run UNIX command to check .class file version:
    strings $JAVA_TOP/oracle/apps/bne/utilities/BneViewerUtils.class | grep Header--> S$Header: BneViewerUtils.java 120.33.12010000.17 2010/11/21 22:19:58 amgonzal s$
    2. Run SQL to check you patch level:
    SELECT * FROM fnd_product_installations WHERE patch_level LIKE '%BNE%';--> R12.BNE.B.3
    3. Run SQL to check patch '9940148' applied or not:
    SELECT * FROM ad_bugs ad WHERE ad.bug_number = '9940148';--> No Rows returned
    4. Run SQL to check patch '9785477' applied or not:
    SELECT * FROM ad_bugs WHERE bug_number in ('9785477');-->
    BUG_ID APPLICATION_SHORT_NAME BUG_NUMBER CREATION_DATE ARU_RELEASE_NAME CREATED_BY LAST_UPDATE_DATE LAST_UPDATED_BY TRACKABLE_ENTITY_ABBR BASELINE_NAME GENERIC_PATCH LANGUAGE
    576982 11839583 2011/8/7 上午 08:20:36 R12 5 2011/8/7 上午 08:20:36 5 pjt B n US
    516492 9785477 2011/6/12 上午 11:42:45 R12 5 2011/6/12 上午 11:42:45 5 bne B n US
    546109 9785477 2011/6/12 下午 01:17:41 R12 5 2011/6/12 下午 01:17:41 5 bne B n ZHT
    5. Run SQL to check the status of object ‘FND_SESSION_MANAGEMENT’
    SELECT * FROM dba_objects do WHERE do.object_name = 'FND_SESSION_MANAGEMENT';-->
    OWNER OBJECT_NAME SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIME TIMESTAMP STATUS TEMPORARY GENERATED SECONDARY NAMESPACE EDITION_NAME
    APPS FND_SESSION_MANAGEMENT 219425 PACKAGE 2004/10/30 下午 01:52:35 2011/8/7 上午 08:18:39 2011-08-07:08:18:26 VALID N N N 1
    APPS FND_SESSION_MANAGEMENT 226815 PACKAGE BODY 2004/10/31 上午 01:05:40 2011/8/7 上午 08:18:54 2011-08-07:08:18:27 VALID N N N 2
    So, my question is: Customer’s BneViewerUtils.java version is already 120.33.12010000.17, which greater than 120.33.12010000.14. Is there any others solutions for this issue? Does customer still need to apply patch '9940148' based on action plan of
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid?
    Customer's EBS version is 12.1.3; OS is HP-UX PA-RISC (64-bit); DB is 11.2.0.2.
    Thanks,
    Jackie

    And customer’s statement is: Upgrade from EBS 11.5.10 to 12.1.3. Login the EBS, open any forms and put it in idle. Then refresh the form, error happens
    Idle for how long? Is the issue with all sessions?
    Please see these docs/links
    User Sessions Get Timed Out Before Idle Time Parameter Values Are Reached [ID 1306678.1]
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Timeout+AND+R12&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Then, I checked ISP, and found two notes:
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid (Doc ID 1284094.1)
    Note 1319380.1: Webadi Gl Journal Posting Errors After Atg R12.1.3 (Doc ID 1319380.1)
    But these two notes are both WebADI.Can you find any details about the error in Apache log files and in the application.log file?
    Any errors in the database log file?
    So, my question is: Customer’s BneViewerUtils.java version is already 120.33.12010000.17, which greater than 120.33.12010000.14. Is there any others solutions for this issue? No.
    Does customer still need to apply patch '9940148' based on action plan ofIf the issue not with Web ADI, then ignore this patch. However, if you use Web ADI you could query AD_BUGS table and verify if you have the patch applied.
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid?
    Customer's EBS version is 12.1.3; OS is HP-UX PA-RISC (64-bit); DB is 11.2.0.2.If you could not find any details in the logs, please enable debug as per (R12, 12.1 - How To Enable and Collect Debug for HTTP, OC4J and OPMN [ID 422419.1]).
    Thanks,
    Hussein

  • Error in Java Map...PLz help

    Hello,
    I have check the map and it is working fine on netbeans  IDE. But when try to use it in PI 7.0 the following error is coming :
    <Trace level="1" type="T">LinkageError at JavaMapping.load(): Could not load class: final map/XMLHeaderGenerator</Trace>
      <Trace level="1" type="T">java.lang.NoClassDefFoundError: final map.XMLHeaderGenerator (wrong name: XMLHeaderGenerator) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:254) at java.lang.ClassLoader.defineClass(ClassLoader.java:191) at com.sap.aii.ibrun.server.mapping.MappingLoader.findClass(MappingLoader.java:158) at java.lang.ClassLoader.loadClass(ClassLoader.java:627) at java.lang.ClassLoader.loadClass(ClassLoader.java:593) at com.sap.aii.ibrun.server.mapping.JavaMapping.load(JavaMapping.java:95) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:45) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:68) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0_0.processFunction(MappingServiceObjectImpl0_0.java:131) at sun.reflect.GeneratedMethodAccessor3858.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:62) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy208.processFunction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:277) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219) at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:260) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:219) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)</Trace>
      <Trace level="1" type="T">Linkage error occurred when loading class final map/XMLHeaderGenerator (http://icc.XXXXXXXXXXXXXXXXX, 8fde2b90-c816-11dc-c9b8-ee57346358b4, -1)</Trace>
      <Trace level="1" type="T">com.sap.aii.ibrun.server.mapping.MappingRuntimeException: Linkage error occurred when loading class final map/XMLHeaderGenerator (http://icc.XXXXXXXXXXXX, 8fde2b90-c816-11dc-c9b8-ee57346358b4, -1) at com.sap.aii.ibrun.server.mapping.JavaMapping.load(JavaMapping.java:115) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:45) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:68) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0_0.processFunction(MappingServiceObjectImpl0_0.java:131) at sun.reflect.GeneratedMethodAccessor3858.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:62) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy208.processFunction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:277) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219) at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:260) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:219) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: java.lang.NoClassDefFoundError: final map.XMLHeaderGenerator (wrong name: XMLHeaderGenerator) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:254) at java.lang.ClassLoader.defineClass(ClassLoader.java:191) at com.sap.aii.ibrun.server.mapping.MappingLoader.findClass(MappingLoader.java:158) at java.lang.ClassLoader.loadClass(ClassLoader.java:627) at java.lang.ClassLoader.loadClass(ClassLoader.java:593) at com.sap.aii.ibrun.server.mapping.JavaMapping.load(JavaMapping.java:95) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:45) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:68) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0_0.processFunction(MappingServiceObjectImpl0_0.java:131) at sun.reflect.GeneratedMethodAccessor3858.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:62) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy208.processFunction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:277) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219) at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:260) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:219) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)</Trace>

    Hey I am using this lib
    import org.xml.sax.helpers.*;
    import java.io.BufferedReader;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import org.w3c.dom.Element;
    import org.w3c.dom.Document;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.AbstractTrace;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    Do i need to import some of these or they are available in PI

  • Error 500 Java.Lang.Null.Pointer Exception

    Please help me:
    I have problem with starting my portlet under portal.
    Provider is registred correctly ,portlet is added corectly on
    Portal Page ,but when I test my page I have :
    The Listener Returned the folowing message-
    Error 500 Java.Lang.Null.Pointer Exception
    Note:Portlet is compiled in JDeveloper 2.0 and there look Ok.
    Thanks

    we encountered the same error on aix4.3.3. in fact the error comes from a variable, that has not been initialized, jserv error log says the following:
    [07/11/2001 10:00:54:098 GMT+00:00] esvportal/init
    [07/11/2001 10:01:08:668 GMT+00:00] esvportal/Response status: 500 : java.lang.NullPointerException
         at oracle.portal.provider.v1.http.ServletProviderRequest.getAcceptLanguage(ServletProviderRequest.java:162)
         at oracle.portal.provider.v1.http.ServletProviderResponse.showPortlet(ServletProviderResponse.java:521)
         at oracle.portal.provider.v1.http.HttpProvider.dispatchProviderAction(HttpProvider.java:662)
         at oracle.portal.provider.v1.http.HttpProvider.service(HttpProvider.java:391)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:402)
         at org.apache.jserv.JServConnection.run(JServConnection.java:260)
         at java.lang.Thread.run(Thread.java:481)
    i habe a public page with 4 jsp portlets and one pl/sql portlet. the plsql ist working, every one of the jsp portlets gets the "getAcceptLanguage" error

  • 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

  • Can we throw an error in java ,if yes plz give an example?

    Hi,
    How can we throw an error in java like an exception(using try catch).If an error can be thrown then what is the diffrence between error and exception because both can be thrown using throwble.
    Thanks
    Sumit

    Error and Exception both are subclasses of Throwable class, so both can be thrown(I don't want to explain by an example). Now Error class defines exceptions that are not expected to be caught under normal circumstances. Exceptions of type Error are used by Java run-time system to indicate errors having to do with the run-time environment, itself.
    "Stack Overflow" is an example of Error.
    Errors are generally caused in response to catastrophic failures which can't be handeled by your program.

  • Send error from Java to Flex

    I need to throw errors from Java and to receive them in Flex.
    My idea is using xml with error id and message, and maybe the Flex
    component which should show the error.
    Is there any other way to do it? Another interaction between
    Java and Flex?
    Thanks in advance
    Tuli-O

    XML wrapping error info written to response when java code
    throws and having a common component on the flex to handle this
    situation -- maybe on the fault event.

  • Applicatio​n using Http Post... getting error response

    Im from Ecuador, and me and other 4 people from the same country are getting this error response when a native java application is trying to make a http post to mydomain.com
    The requested URL could not be retrieved:
    While trying to process the request:
    POST /somedir/more?var1=abc&var2=xyz& HTTP/1.1
    Expect: 100-continue
    Host: mydomain.com
    Content-Length: 40
    Content-Type: text/plain; charset=utf-8
    Accept: */*
    Connection: close
    Invalid request. Some aspect of the HTTP Request is nivalid. Possible problems:
    Missing or unknwon request method
    Missing URL
    Missing HTTP Identifier (HTTP/1.0)
    Request is too large
    Content-Length missing for POST or PUT request
    Generated by Blackberry.Internet.Browsing.Service (squd/2.7.STABLE6)
    This issue is only happening in my country (Ecuador). I have some friends in Argentina and they have no problems at all. What are the posible causes for this problem?
    Message Edited by andufo on 07-09-2009 08:43 PM

    Hi again,
    im attaching all the info you request:
    What does the program actually do?
    Social network (because of the TOS of this forum im not allowed to post project names or urls)
    What is it trying to send when you submit a request?
    What url is it posting the information to? 
    Im attaching all this at the end of the post.
    Is it the 'exact' same application that works in other countries?
    Yeap, the exact same one...
    Is it supposed to be useing the Internet Browser?
    No, it is a native app. The Browser is not used at all.
    Are you on a BlackBerry Enterprise Server? 
    Im on BIS, all the users use BIS.
    Technical details:
    1) The app makes an Http Connection (POST) to:
    http://mydomain.com/api/call?param1=abc&param2=xyz
    2) This is the Http connection configuration:
    httpConnection = (HttpConnection) Connector.open(url);
    HttpConnection.POST;
    ("Content-Type", "text/plain; charset=utf-8");
    ("Host", 'mydomain.com');
    ("Content-Length", 100); //depends on sent data
    ("User-Agent", 'BlackBerry8300... etc');
    ("Expect", "100-continue");
    3) On every country it works fine... on my country i get this error:
    The requested URL could not be retrieved while trying to process the request:
    POST /app/llamada?param1=abc&param2=xyz& HTTP/1.1
    - Expect: 100-continue
    - Host: mydomain.com
    - Content-Length: 100
    - Content-Type: text/plain; charset=utf-8
    - Accept: */*
    - Connection: close
    Invalid request. Some aspect of the HTTP Request is invalid. Possible problems:
    - Missing or unknwon request method
    - Missing URL
    - Missing HTTP Identifier (HTTP/1.0)
    - Request is too large
    - Content-Length missing for POST or PUT request
    Generated by Blackberry.Internet.Browsing.Service (squid/2.7.STABLE6)

  • To find the error in java code if any

    i was learnig java.net package and this is the code i wrote to read the contents directly from a given url using openStream() method of URL class and got the message 'error' from
    java.io.IOException which i had given in the catch block. please tell me what is happening & how
    could i read the content from an url with url class method.
    import java.io.*;
    import java.net.*;
    public class url
    public static void main(String[] args)
    throws java.io.IOException,java.java.MalformedURLException
    try{
    URL yahoo = new URL("http://www.yahoo.com");
    BufferedReader read_io = new BufferedReader(new InputStreamReader(yahoo.openStream()));
    String line;
    while((line =read_io.readLine())!= null)
    System.out.println(line);
    line.close();}
    catch(MalformedURLException e)
    System.out.println("error");
    catch(IOException e)
    System.out.println("error"):
    after execution at the terminal
    bash-3.00#javac url.java
    bash-3.00#java url
    error

    Please use [code] tags when posting code.
    Are you sure String has a close method? I'm not sure your code compiles.
    Exceptions have a getMessage method, which can be useful (and a printStackTrace method that can be even more useful.)

  • [jwsc] error: Response wrapper bean names must be unique ?

    I am trying to use wsdlc and jwsc on my existing WSDL file, with "type=JAXWS", I am getting this error
    "[jwsc] error: Response wrapper bean names must be unique and must not clash with other generated classes"
    What does it mean? And how can I resolve this?
    Here is the full stack trace:
    build-service:
    [jwsc] JWS: processing module /com/covergence/ws/callouts/CallOutsServiceImpl
    [jwsc] Parsing source files
    [jwsc] Parsing source files
    [jwsc] 1 JWS files being processed for module /com/covergence/ws/callouts/CallOutsServiceImpl
    [jwsc] JWS: C:\source_tree\b3.3\ss\java\ws\sdk\build\weblogic\src\com\covergence\ws\callouts\CallOutsServiceImpl.java Validated.
    [jwsc] Processing 1 JAX-WS web services...
    [jwsc] error: Response wrapper bean names must be unique and must not clash with other generated classes. Class: com.covergence.ws.callouts.CallOutsPortType method getConfig(javax.xml.ws.Holder<java.util.List<com.covergence.ws.callouts.ConfigClassesType>>)
    [jwsc] Problem encountered during annotation processing;
    [jwsc] see stacktrace below for more information.
    [jwsc] [failed to localize] modeler.nestedGeneratorError(java.lang.IllegalArgumentException: trying to create the same field twice: config)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.generateWrappers(WebServiceWrapperGenerator.java:302)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.processMethod(WebServiceWrapperGenerator.java:154)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitMethodDeclaration(WebServiceVisitor.java:449)
    [jwsc] at com.sun.tools.apt.mirror.declaration.MethodDeclarationImpl.accept(MethodDeclarationImpl.java:41)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.processMethods(WebServiceVisitor.java:374)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.postProcessWebService(WebServiceVisitor.java:338)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.postProcessWebService(WebServiceWrapperGenerator.java:125)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitInterfaceDeclaration(WebServiceVisitor.java:120)
    [jwsc] at com.sun.tools.apt.mirror.declaration.InterfaceDeclarationImpl.accept(InterfaceDeclarationImpl.java:32)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.inspectEndpointInterface(WebServiceVisitor.java:420)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitClassDeclaration(WebServiceVisitor.java:141)
    [jwsc] at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDeclarationImpl.java:95)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.buildModel(WebServiceAP.java:300)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:224)
    [jwsc] at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
    [jwsc] at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
    [jwsc] at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:448)
    [jwsc] at com.sun.tools.apt.main.Main.compile(Main.java:1075)
    [jwsc] at com.sun.tools.apt.main.Main.compile(Main.java:938)
    [jwsc] at com.sun.tools.apt.Main.processing(Main.java:95)
    [jwsc] at com.sun.tools.apt.Main.process(Main.java:43)
    [jwsc] at com.sun.tools.apt.Main.main(Main.java:34)
    [jwsc] Caused by: java.lang.IllegalArgumentException: trying to create thesame field twice: config
    [jwsc] at com.sun.codemodel.JDefinedClass.field(JDefinedClass.java:392)
    [jwsc] at com.sun.codemodel.JDefinedClass.field(JDefinedClass.java:363)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.writeMembers(WebServiceWrapperGenerator.java:419)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.generateWrappers(WebServiceWrapperGenerator.java:299)

    I am starting from WSDL and below are the corresponding elements from WSDL
        <message name="getConfig">
            <part name="parameters" element="tns:getConfig"/>
        </message>
        <message name="getConfigResponse">
            <part name="result" element="tns:getConfigResponse"/>
        </message>
        <portType name="CallOutsPortType">
            <operation name="getConfig">
                <input message="tns:getConfig">
                </input>
                <output message="tns:getConfigResponse">
                </output>
                <fault name="callOutFault" message="tns:callOutFault"/>
            </operation>
        <binding name="CallOutsBinding" type="tns:CallOutsPortType">
            <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
            <operation name="getConfig">
                <soap:operation soapAction="getConfig"/>
                <input>
                    <soap:body use="literal"/>
                </input>
                <output>
                    <soap:body use="literal"/>
                </output>
                <fault name="callOutFault">
                    <soap:fault name="callOutFault" use="literal"/>
                </fault>
            </operation>

  • ChiliBean Control error '800a03e8'  java.lang.NoClassDefFoundError

    hi all,
    http://forum.java.sun.com/thread.jspa?forumID=759&threadID=5019680
    in reference to the post above, i have a Win2003 server running Sun ONE with Chilisoft ASP plug-in. i did the suggestions there but am still getting the same error, to be exact:
    ChiliBean Control error '800a03e8'
    java.lang.NoClassDefFoundError: MyHelloWorld
    /myhelloworld.asp, line 3
    <html>
        <% Dim mhw, mhwString, mwh1
    REM    Set mhw = NewJavaObject("MyHelloWorld")
           Set mhw = Server.CreateObject("Chili.Beans")
           Set mhw1 = mhw.Construct("MyHelloWorld")
           Set mhwString = mhw1.myString
           Response.Write(mhwString)
        %>
    </html>
    public class MyHelloWorld {
         public String myString = "Hello World!";
    }hope you could help me out.
    thanks in advance :D

    hi all,
    http://forum.java.sun.com/thread.jspa?forumID=759&threadID=5019680
    in reference to the post above, i have a Win2003 server running Sun ONE with Chilisoft ASP plug-in. i did the suggestions there but am still getting the same error, to be exact:
    ChiliBean Control error '800a03e8'
    java.lang.NoClassDefFoundError: MyHelloWorld
    /myhelloworld.asp, line 3
    <html>
        <% Dim mhw, mhwString, mwh1
    REM    Set mhw = NewJavaObject("MyHelloWorld")
           Set mhw = Server.CreateObject("Chili.Beans")
           Set mhw1 = mhw.Construct("MyHelloWorld")
           Set mhwString = mhw1.myString
           Response.Write(mhwString)
        %>
    </html>
    public class MyHelloWorld {
         public String myString = "Hello World!";
    }hope you could help me out.
    thanks in advance :D

  • Compiling error on Java I/O

    My first time to write a very simple Java progam. Any one could help me on this comipling error? Thanks in advance!
    Compiling ERROR:
    ================
    C:\java\class>javac hw01.java
    hw01.java:43: cannot resolve symbol
    symbol : variable in
    location: class hw01
    while((line = in.readLine()) != null ) {
    ^
    1 error
    SOURCE CODE:
    ============
    *     Program name: hw01.java
    *     Author:
    *     Description: Simple I/O and computation
    *     Date: 12/08/2002
    *     compile: javac hw01.java
    *     usage: java hw01 <infile> <utfile>
    *     <infile> - input file
    *     operator operand1 operand2
    *          ex. + 1 1
    * <outfile> - output file
    * operand1 operator operand2 = result
    *          ex. 1 + 1 = 2
    import java.io.*;
    import java.util.*;
    public class hw01 {
         // Open input file and output file
         public static void main(String[] args) throws IOException {
              if (args.length == 2) {
                   // Open File for Reading
                   File inFile = new File(args[0]);
                   FileReader in = new FileReader(inFile);
                   // Open File for Writing
                   File outFile = new File(args[1]);
                   FileWriter out = new FileWriter(outFile);
              } else {
                   System.out.println("java command <arg1> <arg2>");
              // Get operation, operand1 and operand2 for each line
              String line = null;
              while((line = in.readLine()) != null ) {
                   //String op; String op1; String op2; String result;
                   // Get operation and operands
                   //stringTokenizer t = new StringTokenizer(line);
                   //op = t.nextToken().charAt(0);
                   //op1 = Integer.valueOf(t.nextToken()).intValue();
                   //op2 = Integer.valueOf(t.nextToken()).intValue();
                   // Compute math operation
                   //if( op == '+' ) {
                   //     result = op1 + op2;
                   // } else if( op == '-' ) {
                   //     result = op1 - op2;
                   //} else if( op == '*' ) {
                   //     result = op1 * op2;
                   //} else if( op == '/' ) {
                   //     result = op1 / op2;
                   // Print out the result
                   //system.out.println(op1 + op + op2 + "=" + result);
              // Close infile
              // in.close();
              // System.out.println("");
              // Close outFile
              // out.close();

    The compiling error is fixed. The revised working source code hw01.java is provided below. Can someone help the remining question below?
    PROBLEM/Question:
    =================
    The output only goes to the console. How code should be changed to allow output to a specified file from command line.
    SOURCE FILE (without Compiling error):
    =====================================
    *     Program name: hw01.java
    *     Author:
    *     Description: Simple I/O and computation
    *     Date: 12/08/2002
    *     compile: javac hw01.java
    *     usage: java hw01 <infile> <utfile>
    * example: java hw01 hw1data.txt hw1out.txt
    *     <infile> - input file
    *     operator operand1 operand2
    *          ex. + 1 1
    * <outfile> - output file
    * operand1 operator operand2 = result
    *          ex. 1 + 1 = 2
    import java.io.*;
    import java.util.*;
    public class hw01 {
         // Open input file and output file
         public static void main(String[] args) throws IOException {
              FileReader in = null;
              FileWriter out = null;
              BufferedReader br = null;
              System.out.println("input File Name = " + args[0]);
              System.out.println("output File Name = " + args[1]);
              if (args.length == 2) {
                   // Open File for Reading
                   File inFile = new File(args[0]);
                   in = new FileReader(inFile);
                   br = new BufferedReader(in);
                   // Open File for Writing
                   File outFile = new File(args[1]);
                   out = new FileWriter(outFile);
              } else {
                   System.out.println("java command <arg1> <arg2>");
              // Get operation and operands for each line
              String line = null;
         char op;
              int op1, op2;
              int result = 0;
              while((line = br.readLine()) != null ) {
                   // Get operation and operands
                   StringTokenizer t = new StringTokenizer(line);
                   op = t.nextToken().charAt(0);
                   op1 = Integer.valueOf(t.nextToken()).intValue();
                   op2 = Integer.valueOf(t.nextToken()).intValue();
                   // Compute math operation and print result
                   if( op == '+' ) {
                        result = op1 + op2;
                        System.out.println(op1 + " + " + op2 + " = " + result);
                   } else if( op == '-' ) {
                        result = op1 - op2;
                        System.out.println(op1 + " - " + op2 + " = " + result);
                   } else if( op == '*' ) {
                        result = op1 * op2;
                        System.out.println(op1 + " * " + op2 + " = " + result);
                   } else if( op == '/' ) {
                        result = op1 / op2;
                        System.out.println(op1 + " / " + op2 + " = " + result);
              // Close infile
              in.close();
              // Close outFile
              out.close();
    }

  • Oracle error 1403: java.sql.SQLException:

    Hi All,
    ebs r12 12.1.3
    db 11gr1 11.1.0.7
    os OUL5x64
    After the clone, the database and the middle tier were ready, no error. when open the url i was able to type in username/password
    but then got this error
    <PRE>Oracle error 1403: java.sql.SQLException: ORA-01403: no data found ORA-06512: at line 1 has been detected in FND_SESSION_MANAGEMENT.CHECK_SESSION. Your session is no longer valid. </PRE>
    Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.
    --i did check invalid objects and it was fine.
    Can someone please advise for this error.
    Thanks in advance.
    Regards,

    After the clone, the database and the middle tier were ready, no error. when open the url i was able to type in username/password
    but then got this error Is the issue with all usernames?
    Did AutoConfig complete successfully on both tiers?
    Please confirm that none of the main database accounts is expired (i.e. system, apps, applsys, ..etc).
    <PRE>Oracle error 1403: java.sql.SQLException: ORA-01403: no data found ORA-06512: at line 1 has been detected in FND_SESSION_MANAGEMENT.CHECK_SESSION. Your session is no longer valid. </PRE>
    Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.Any details about the error in the application log files?
    Can someone please advise for this error.Please see if (FND_SESSION_MANAGEMENT.CHECK_SESSION Error During External Candidate Registration [ID 1368801.1]) is applicable.
    Also, make sure your FND_NODES table has correct entries.
    Unable to login from Notificationdetail.htm or AppsLogin.jsp [ID 269748.1]
    How to Clean Nonexistent Nodes or IP Addresses From FND_NODES [ID 260887.1
    Thanks,
    Hussein                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • Add midnigh time to a date

    Hi, <cfset endDate = DateAdd("d", 1, endDate)> this will add one date into the endDate.  Instead of add one date, i want it to add the midnigh time to the endDate. such as: 2012/10/01 23:59:59 i had tried this <cfset endDate= DateAdd("ms",86399997,en

  • Prob in BDC

    Hi Friends, I am doing bdc call transaction method.Releasing delivery block from sales order at header level n item level. I am getting all sales order which r having block order.The output is constructed like when i select 1  sales order n click on

  • Parallel instances using ONE Action Engine

    Hi Everyone. I just wanted to see what type of ideas this would bring to this issue. I have an AE that holds all the pointers (or referances) that 20 instances of a reentrantVI use in parallel. Obviously the issue is the execution speed as all the in

  • ADF Security Design Question

    Hi All, I am developing an ADF web application. The security design is such that user authentication is mapped to database users. The design I see several pros and cons 1) Different database users means I cannot take advantage of connection pooling.

  • MM Source List export to SRM Vendor List

    Hi Friends , I learnt that  we need to create the Vendor List in SRM separtly . Can any one suggest/ confirm me , whether the Source List  craeted in ECC , can be export to SRM ? If yes , how ? Regards NAP