Connection refused--while executing (HttpConnection) Connector.open(url);

Hi,
i'm using netbeans mobility 5.0
as i was new to this mobile programming i'm getting the output as "Connection Refused"
plz plz plz plz....... help me out from this problem
here is my code..
code:_
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.io.*;
import java.io.*;
public class FileViewer extends MIDlet implements CommandListener
private Display display; // Reference to Display object
private TextBox tbViewer; // View file contents in a textbox
private Command cmView; // Command to view file
private Command cmExit; // Command to exit
private String url = "http://www.corej2me.com/midpbook_v1e1/scratch/fileViewer.hlp";
public FileViewer()
display = Display.getDisplay(this);
// Define commands
cmView = new Command("View", Command.SCREEN, 2);
cmExit = new Command("Exit", Command.EXIT, 1);
tbViewer = new TextBox("Viewer", "", 250, TextField.ANY);
tbViewer.addCommand(cmView);
tbViewer.addCommand(cmExit);
tbViewer.setCommandListener(this);
public void startApp()
display.setCurrent(tbViewer);
private void viewFile() throws IOException
HttpConnection http = null;
InputStream iStrm = null;
try
http = (HttpConnection) Connector.open(url);
// Client Request
// 1) Send request method
http.setRequestMethod(HttpConnection.GET);
// 2) Send header information (this header is optional)
http.setRequestProperty("User-Agent", "Profile/MIDP-1.0 Configuration/CLDC-1.0");
// 3) Send body/data - No data for this request
// Server Response
// 1) Get status Line
System.out.println("Msg: " + http.getResponseMessage());
System.out.println("Code: " + http.getResponseCode());
// 2) Get header information
if (http.getResponseCode() == HttpConnection.HTTP_OK)
// 3) Get data (show the file contents)
iStrm = http.openInputStream();
int length = (int) http.getLength();
if (length > 0)
byte serverData[] = new byte[length];
iStrm.read(serverData);
tbViewer.setString(new String(serverData));
finally
if (iStrm != null)
iStrm.close();
if (http != null)
http.close();
public void pauseApp()
public void destroyApp(boolean unconditional)
public void commandAction(Command c, Displayable s)
if (c == cmView)
try
viewFile();
catch (Exception e)
System.out.println(e.toString());
else if (c == cmExit)
destroyApp(false);
notifyDestroyed();
output*
build.xml(debug)*
some....
Application descriptor does not declare any MIDlet. Direct execution is not allowed.
Generated "C:\Documents and Settings\Lakshmi Narayan J\jlnexample\dist\jlnexample.jar" is 2655 bytes.
post-jar:
debug:
C:\Documents and Settings\Lakshmi Narayan J\jlnexample\src\.timestamp
Starting emulator in debug server mode on port 1469
com.sun.kvem.midletsuite.InvalidJadException: Reason = 22
The manifest or the application descriptor MUST contain the attribute: MIDlet-1
nbdebug:
KdpDebugTask connecting to debugger 1 ..
KdpDebugTask connecting to debugger 2 ..
KdpDebugTask connecting to debugger 3 ..
KdpDebugTask connecting to debugger 4 ..
KdpDebugTask connecting to debugger 5 ..
Connecting JPDA Debugger to emulator timed out after 5 attempts and 31 seconds.
C:\Documents and Settings\Lakshmi Narayan J\jlnexample\nbproject\build-impl.xml:306: The following error occurred while executing this line:
C:\Documents and Settings\Lakshmi Narayan J\jlnexample\nbproject\build-impl.xml:311: Connecting JPDA Debugger to emulator timed out after 5 attempts and 31 seconds.
BUILD FAILED (total time: 43 seconds)
Debugger console:
Attaching to localhost:1469
Connection refused.
Edited by: LAKSHMI_NARAYAN_J on Jun 23, 2008 9:54 AM

It's called potential deadlock. The emulator blocks your app 'cause any connection and commandAction needs its own thread. So I suggest use a new thread with this http connection then your program will be run successful.

Similar Messages

  • Connection refused While Calling a Web Service from WebDynpro Application.

    Hi all,
    I've created a Webdynpro application by importing a WSDL file which is created from a
    Web Service from XI.
    While I run this Application, and while it tries to connect to XI, I am getting following
    error.
    <b>Service call exception; nested exception is: java.net.ConnectException: Connection refused</b>
    Can Someone please help me out on this issue?
    Thanks in advance,
    Tejas.

    Hi,
    In my WebDynpro Application which is created by Importing a WSDL file from XI Web
    Service is giving error : <b>Service call exception; nested exception is: java.net.ConnectException: Connection </b>
    In NWDS-> Windows Menu-> Preferances -> Wrokbench -> Proxy Settings
    Use Proxy Settings is <b>Checked</b>.
    My Settings in Model's Logical Port is
    <b>Use HTTP Port</b> is <b>Checked</b>.
    In Securities-> <b>Authentication</b> is set to '<b>None</b>'
    With this While I Execute the Application and when it tries to connect to XI..it throws
    an error :
    Service call exception; nested exception is: java.net.ConnectException: Connection
    refused
    Kindly help me on this issue.
    Thanks in advance,
    Tejas.

  • Connection Refused while invoking Web Service from BPEL process

    Hie
    I am getting the following error when I try to invoke a web service (created in JDeveloper) from a BPEL process.
    <remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
    <part name="code">
    <code>Server.userException</code>
    </part>
    <part name="summary">
    <summary>when invoking endpointAddress '.......................', java.net.ConnectException: Connection refused: connect</summary>
    </part>
    <part name="detail">
    <detail>AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.net.ConnectException: Connection refused: connect faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.net.ConnectException: Connection refused:
    Did anyone come across a similar problem...??? Plz help:(

    Hi everybody,
    I have the same problem. I developed a sample bpel process and tried to access it form another one, but still having the same exception :
    <remoteFault>
    <part name="code" >
    <code>Server.userException</code>
    </part>
    <part name="summary" >
    <summary>when invoking endpointAddress 'http://set.by.caller', java.net.UnknownHostException: set.by.caller</summary>
    </part>
    <part name="detail" >.......
    Thanks for your help!
    miroo

  • "Connection refused" while printing

    Hi guys,
    We've got weird problem at the office. Windows network printer, hundreds of Windows clients and around 30 Mac clients.
    All of a sudden, since last week, one of the macs refused to print. Looking in the logs shows "Connection refused". Simply removing printer and adding it again is resolving problem... until mac is restarted.
    The issue occurs only with this one Mac. They all run Mac OS 10.7.
    All user credentials are correct and accounts are valid.
    I tried removing credentials to the printer from keychain, reseting printing system, to no avail.
    Any ideas of troubleshooting would be most apreciated.
    Thanks,
    Daniel

    Nobody?

  • Error while executing webdynpro application : he URL does not contain full

    Dear All,
    I had installed SAP in my system.But when I am testing webdynpro application I am getting the belwo error. Please let me knwo what setting I need to do to avoid this error.
    Error when processing your request
    What has happened?
    The URL http://hari:8000/sap/bc/webdynpro/sap/z_test_pg was not called due to an error.
    Note
    The following error text was processed in the system DEV : The URL does not contain full domain specification (hari statt hari.<domain>.<ext>).
    The error occurred on the application server HARI_DEV_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: CHECK of program CX_FQDN=======================CP
    Method: LATE_CONSTRUCTOR of program CL_WDR_UCF====================CP
    Method: HANDLE_REQUEST of program CL_WDR_UCF====================CP
    Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
    Method: EXECUTE_REQUEST of program CL_HTTP_SERVER================CP
    Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
    Module: %_HTTP_START of program SAPMHTTP
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system DEV in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server HARI_DEV_00 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server HARI_DEV_00 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    Error code: ICF-IE-http -c: 800 -u: SAPUSER -l: E -s: DEV -i: HARI_DEV_00 -w: 0 -d: 20080109 -t: 073032 -v: RABAX_STATE -e: UNCAUGHT_EXCEPTION
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team

    Hello,
    Little extract from the SAP online help :
    In Web Dynpro ABAP it is imperative that a client browser with a fully qualified domain name (FQDN) has access to the AS-ABAP. For this reason the full URL must be assigned to a Web Dynpro ABAP application when it is called. The URL must not be shortened (for instance, no domain specification).
    More info on how you should do this can be found here :
    [Click|http://help.sap.com/saphelp_nw70/helpdata/en/67/be9442572e1231e10000000a1550b0/content.htm]
    This will solve your problem.
    Success.
    Wim

  • Master question! Connector.open... network

    A new problem has occured!
    Something strange happens when the connect-statement in the run-method
    is executed. When this happen, J2ME sets up a screen asking if it's
    right to use the net to send/receive. Nothing happens when the yes or no button
    is pressed. What should happens (when no threading is used) is the program to
    continue after one of the buttons has been pressed. What kind of deadlock is this?
    The SendThread-class works fine if there is another processing task in the run method,
    for instance a loop doing a calculation or similar. The code is tested using
    Wireless Toolkit.
    How can I fix this?
    Thanks for any feedback/help!
    public class Testing extends MIDlet
    public void startApp()
    SendThread thread = new SendThread( -1, null, null, null );
    thread.start();
    progressBar( thread );
    System.out.println( thread.getResult() );
    public void pauseApp()
    public void destroyApp( boolean unconditional )
    private void progressBar( SendThread thread )
    System.out.print( "Progress bar" );
    while( !thread.completed() )
    System.out.print( "." );
    public class SendThread extends Thread
    private boolean completed;
    private int action;
    private Employee employee;
    private Week week;
    private String[] userinfo;
    private String result;
    public SendThread( int action, Employee employee, Week week, String[] userinfo )
    this.action = action;
    this.employee = employee;
    this.week = week;
    this.userinfo = userinfo;
    public void run()
    connection = (HttpConnection)Connector.open( "http://www.gentoo.org",
    Connector.READ_WRITE ); completed = true;
    public boolean completed()
    return completed;
    public String getResult()
    return result;
    }

    Well, new update. The code above actually works fine, but
    when I construct the SendThread-object from the
    commandAction-method, the problem described above
    occurs...anybody with suggestions?

  • SOAP 'Connection refused' in java

    I am using the code attached to Log onto the SOAP Actuate reporting server using HttpURLConnection in Java. I get "java.net.ConnectException: Connection refused" while calling connection.getInputStream(); PLease note I do not get error while openConnection() but get it while getting the InputStream.
    URL u = new URL("http://devserver:8000//soap/servlet/acweb");
                   System.out.println("Opening connection...");
    URLConnection uc = u.openConnection();
                   System.out.println("Opening connection Done...");
    HttpURLConnection connection = (HttpURLConnection) uc;
    connection.setDoOutput(true);
    connection.setDoInput(true);
    connection.setRequestMethod("POST");
    connection.setRequestProperty("Connection", "Keep-Alive");
    connection.setRequestProperty("Content-Type", "text/xml;charset-'utf-8'");
    connection.setRequestProperty("SOAPAction", "");
    Writer wout = new OutputStreamWriter(connection.getOutputStream());
    System.out.println("connection.getOutputStream...");
    wout.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n");
    wout.write("<SOAP-ENV:Envelope xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"");
    wout.write("xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"");
    wout.write("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">");
    wout.write("<SOAP-ENV:Body>");
    wout.write("<SOAP-ACTU:Login xmlns:SOAP-ACTU=\"http://schemas.actuate.com/actuate6\">");
    wout.write("<User>testuser</User>");
    wout.write("<Password>tsetpwd</Password>");
    wout.write("<Domain>HQ</Domain>");
    wout.write("<UserSettings>true</UserSettings>");
    wout.write("</SOAP-ACTU:Login>");
    wout.write(" </SOAP-ENV:Body>");
    wout.write("</SOAP-ENV:Envelope>");
    wout.flush();
    wout.close();
    System.out.println("Wout.close...");
    InputStream in = connection.getInputStream();
    System.out.println("connection.ger Input Stream...");
    int c;
    while ((c = in.read()) != -1) System.out.print(c);
    in.close();
    System.out.println("Input Stream closed...");
    catch (IOException e)
    System.out.println("IO EXception : "+e);
    catch (Exception ee)
    System.out.println("EXception : "+ee);

    "Connection refused" generally means there is no server listening at the port you tried to connect to.

  • Socket mostly times out, connection refused.

    Hello,
    I am writing my own version of dc-hub in Java. This is my first networking program I make.
    The main class has a ServerSocket running on port 411 and it will then make another socket when someone connects. Although at the moment 198 users are connected, it seems that the server mostly gives a time out when you try to connect. It's not a firewall problem, because I get them (localhost) as well. The server also runs on localhost.
    This is the code:
    ServerSocket serverSock = new ServerSocket(411);while(true) {      Socket sock = serverSock.accept();      new ConnectorThread(sock,P,U);}
    I really have no clue why I and a lot of other users get time outs...
    I'll post the results from the client program (DC++):
    [17:39] *** Connection refused by target machine
    [17:39] *** Connecting to localhost...
    [17:39] *** Connection refused by target machine
    [17:39] *** Connecting to localhost...
    [17:40] *** Connection refused by target machine
    [17:40] *** Connecting to localhost...
    [17:40] *** Connected
    [17:40] <Hub-Security> Welcome to Tom's personal hubsoftware V1.0
    Oh... yeah... I get Connection refused, while my friends are receiving "Connection time out..."
    Again: It's not a firewall or router problem... I know that 100% sure...
    I hope someone knows how to fix this problem, I've searched the forum without a result for my problem.
    Thank you in advance,
    Tom

    I am running 1.4.2_05 on win2000
    Client code
    //{{{  Imports
    import java.io.*;
    import java.net.* ;
    * This class provides access to the IOR String via HTTP protocol.
    * Server accepts connection from anywhere
    public class SockClient // extends Thread
    //  public static int HTTPIORPort = 2096;
    //  ServerSocket incommingSocket = null;
    //  private int SockTimeout = 5000; // 5 seconds
      SockClient()
        for (int i = 0 ; i < 40 ; i++)
          try
            new GetThread(i);
          catch (Exception e)
            System.out.println("Caught Exception:");
            e.printStackTrace();
      public static void main (String args[])
        new SockClient();   
      class GetThread extends Thread
        int gen;
        GetThread(int i)
          //setDaemon(true);
          setDaemon(false);
          gen = i;
          start();
        public void run()
          int count = 69;
          try
            Socket socket = new Socket(InetAddress.getByName("localhost"), 2096);
            //System.out.println("timeout="+ socket.getSoTimeout());
            InputStream in = socket.getInputStream();
            OutputStream out = socket.getOutputStream();
            String get = "GET / HTTP/1.1\r\n\r\n";
            out.write(get.getBytes());
            byte[] buf = new byte[1024];
            while (count > 0)
              count = in.read(buf);
          catch (Exception e)
            System.out.println("Caught exception (g="+gen+"):("+count+")"+e.toString());
            //e.printStackTrace();
    }Server code:
    *  Handles HTTP requests
    //{{{  Imports
    import java.io.*;
    import java.net.* ;
    import java.util.* ;
    * This class provides access to the IOR String via HTTP protocol.
    * Server accepts connection from anywhere
    public class SockServer // extends Thread
      public static int HTTPIORPort = 2096;
      ServerSocket incommingSocket = null;
      private int sockTimeout = 5000; // 5 seconds
      public static void main (String args[])
        try
          new SockServer();
        catch (Exception e)
          System.out.println("main: Exception"+e.toString());
      SockServer() throws IOException
        System.out.println("Thread running: HTTPListener");
        Socket incommingRequest = null;
        try
          incommingSocket = new ServerSocket(HTTPIORPort);
          System.out.println("Timeout set to "+incommingSocket.getSoTimeout());
          //incommingSocket.setSoTimeout(sockTimeout); // 5 seconds
        catch (Exception e)
          System.out.println("Unable to start HTTP IOR Server");
          System.exit(1);
        //  Ready to Accept connections
        System.out.println("Started HTTPListener listening on "+HTTPIORPort);
        while (true)
          try
            synchronized(incommingSocket)
              incommingRequest = incommingSocket.accept();
              handleRequest(incommingRequest);
          catch (java.net.SocketTimeoutException to)
          catch (Exception e)
            System.out.println("Could not accept HTTP request: "+e.toString());
            break;
        // Close sockets
        try
          incommingRequest.close();
          incommingSocket.close();
        catch (Exception e) { }
        System.out.println("Thread exit: HTTPListener");
      void handleRequest(Socket ic)
        System.out.println("Received HTTP IOR Request from: "+
            ic.getInetAddress().getHostAddress()+":"+ic.getPort());
        final Socket httpRequest = ic;
        final String qmVersion = "1.0";
        final BufferedReader inData ;
        final OutputStream outData;
        try
          inData = new BufferedReader(new InputStreamReader(httpRequest.getInputStream()));
          //PrintWriter outData = new PrintWriter(httpRequest.getOutputStream(), true);
          //DataOutputStream outData = new DataOutputStream(httpRequest.getOutputStream());
          outData = httpRequest.getOutputStream();
        catch (Exception e)
          System.out.println("Caught set up streams:" +e.toString());
          return;
        new Thread (null, null, "HTTPAnswerThread", 10 * 1024)
            String page = null;
            // Anonymous contructor
              setDaemon(true);
              start();
            // Anonymous Thread to handle http request
            public void run ()
                String input = "starting";
              try
                // Ditch incoming header
                while (input.length() != 0)
                  input = inData.readLine();
                  if (input == null)
                    System.out.println("input == null");
                    break;
                page = "IOR:000000000000002349444C3A515F5175656E74696E2F515F496E7465726E616C506F7274616C3A312E300000000000020000000000000070000102000000000D31302E3136322E36332E3438000011690000001C5374616E64617264496D706C4E616D652F011147170A2C332E013928000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001000000010000002C0000000000000001000000010000001C00000000000100010000000105010001000101090000000105010001";
    //            outData.print(getHeader(page.length()));
    //            outData.print(page);
    //            outData.writeBytes(getHeader(page.length()));
    //            outData.writeBytes(page);
                //byte[] b = getHeader(page.length()).getBytes("ISO-8859-1");
                byte[] b = stringToBytes(getHeader(page.length()));
                outData.write(b);
                outData.flush();
                //byte[]
                //b = page.getBytes("ISO-8859-1");
                b = stringToBytes(page);
                outData.write(b);
                outData.flush();
                outData.close();
                inData.close();
                httpRequest.close();
              catch (Exception e)
                System.out.println("Unhandled http request:");
                e.printStackTrace();
            byte[] stringToBytes(String s)
              ByteArrayOutputStream os = new ByteArrayOutputStream();
              try
                DataOutputStream cob = new DataOutputStream(os);
                cob.writeBytes(s);
                cob.close();
              catch(Exception e)
                System.out.println("Caught unhandled exception:");
                e.printStackTrace();
              return os.toByteArray();
            String getHeader(int len)
              return
                 "HTTP/1.1 200 OK\r\n"+
                 "Date: "+ (new Date()).toString() + "\r\n"+
                 "Content-Type: text/plain\r\n"+
                 "Content-Length: "+ len +"\r\n"+
                 "Server: "+ qmVersion + "\r\n"+
                 "\r\n";
      }

  • Connector.open(String url) function problem

    Hi All
    I made HttpConnection with Connector.open function, but program block exactly on this function call, I think it's cause &#1072; poor connection what I have on my phone, so my question is: Is there a way to get out from this blocking?
    I must say that I make connection in a separate thread and I catch all exception from a function.
    Thank you for your replays.

    I can't see enything on url you posted, what you mean that I answer to my question.
    thanks for replay.

  • Getting error 'opening port for MGR  (Connection refused).

    Hi Guys,
    I m getting below, while starting replicat on target.
    GGSCI (ggtarget) 16> start replicat RLOAD
    Sending START request to MANAGER ...
    ERROR: opening port for MGR MGR (Connection refused).
    GGSCI (ggtarget) 20> view param mgr
    PORT 7809
    USERID orgg, PASSWORD orgg
    PURGEOLDEXTRACTS /ggs/dirdat/*, USECHECKPOINTS
    GGSCI (ggtarget) 21> view param rload
    REPLICAT RLOAD
    USERID orgg, PASSWORD orgg
    ASSUMETARGETDEFS
    HANDLECOLLISIONS
    APPLYNOOPUPDATES
    GETUPDATEBEFORES
    reperror default, discard
    DISCARDFILE ./dirrpt/rload.dsc, purge
    MAP HR.TCUSTORD, TARGET HR.TCUSTORD;
    MAP HR.TCUSTMER, TARGET HR.TCUSTMER;
    from Source I could able to do the telnet to target...
    What could be issue ???

    Hi,
    Error:
    GGSCI (ggtarget) 16> start replicat RLOAD
    Sending START request to MANAGER ...
    ERROR: opening port for MGR MGR (Connection refused).
    You can start Manager, but when you try to start Replicat, GGSCI gives me a connection timeout error
    Solution:
    GoldenGate uses a TCP/IP socket to communicate between local processes. When you issue a START, STOP, SEND, or other command in GGSCI, the command interface will try to open a local port for the process.
    Here is how to find out which local ports these processes are listening on. In the dirpcs directory, there will be one file for each running GoldenGate process.
    For Manager, the file name will be MGR.pcm.
    For Extract, it will be <GROUP_NAME>.pce.
    For Replicat, it will be <GROUP_NAME>.pcr.
    These are text files that can be viewed by using cat or any equivalent command. For example, the MGR.cpm file content will read like this:
    PROGRAM MGR PROCESSID MGR PORT sys1.4356 PID 60070
    After the keyword PORT will be the local hostname and the port number that Manager is supposed to be running on. In the preceding example, the hostname is sys1, and the port is 4356.
    The program (ggsci) tries to use that hostname to communicate to the process (Extract/Replicat/Manager) when the command is issued in GGSCI. If you get a timeout or connection-refused error on the command, that means GoldenGate could not connect to the local host. Most of the time, you should have no problem connecting to a local host, but when you have the wrong IP address or routine table configured in your TCP/IP settings, connection errors can happen.
    To troubleshoot this, follow the steps below
    1. Try to ping that host name from the OS shell to see if it goes to the correct IP address (which should be the one for the local system).
    2. If the ping is successful, try to telnet to the Manager port on your local host. You will be able to see your telnet session connect if a Manager is listening on that port.
    Here is an example:
    shell>telnet
    telnet> open sys1 4356
    Trying 100.100.100.100...
    Connected to sys1.oracle.com (100.100.100.100).
    Escape character is '^]'.
    3. If your telnet session times out or gets a connection-refused error, that means either the hostname is wrong or the port number is wrong.
    If the ping to the hostname listed in the pcm/pce/pcr file fails, or if you cannot connect your telnet session to the port listed in the file(s), contact your network engineers to get the TCP/IP issue resolved.
    Hope this information helps.
    Thanks & Regards
    Santhosh

  • Url connection refused to site

    Hi,
    I was using a program to connect to a website to pull down data and store in a file. Now I'm getting the following error:
    java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at sun.net.NetworkClient.doConnect(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.http.HttpClient.<init>(Unknown Source)
         at sun.net.www.http.HttpClient.<init>(Unknown Source)
         at sun.net.www.http.HttpClient.New(Unknown Source)
         at sun.net.www.http.HttpClient.New(Unknown Source)
         at sun.net.www.http.HttpClient.New(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at pcxtrade.URLAccess.<init>(URLAccess.java:23)
         at pcxtrade.URLAccess.main(URLAccess.java:50)
    After working for a while I'm getting blocked. How can I go around it? Thank you very much

    It would appear that either a) you have the wrong IP address and/or port of b) the server is explicitly disallowing your connection.
    1) Find out the IP address and port.
    2) Put a logging statement in right before your call to the API's connect method that spells out what URL you're connecting to.
    3) Look again at the error message and see if it provides any more detail about the server/port than what you've provided here.
    If the above tell you that you've got the wrong address/port, then put the right one in. If they tell you that you've got the right one, then see if you can connect via telnet or web browser. If the other connection method also fails, then you need to talk to the owner of the site, or your company's firewall admins or somebody. If the other methods let you get through, then it's your code, and you'll have to post the code here to get help debugging it.

  • Opening URL Connection

    Hi all,
    I'm having a problem when connecting to a URL that is non-esisting using a while loop to catch the exception but no exception is being thrown.
    while(myConn == null || !found)
    try
    myConn = url.openConnection();
    } //IOException
    catch (Exception Expt)
    System.out.println("Cannot open URL connection");
    java.lang.Thread.sleep(3000);
    myConn = null;
    continue;
    Cheers
    JavaJimmyD

        BufferedReader inp = null;
        try {
          URL url = new URL(urlString);
          URLConnection conn = url.openConnection();
          conn.setDoInput(true); // or setDoOutput(true)
          /* really open connection */
          conn.connect(); // establish connection
          inp = new BufferedReader(
                  new InputStreamReader(conn.getInputStream()));
          String result = inp.readLine(); // or your stuff
          inp.close();  // close connection
          inp = null;
        catch (MalformedURLException ue) {}
        catch (Exception e) {}
        finally {
          try { if (inp != null) inp.close(); } catch(IOException e) {}
        }

  • URL error while executing a web report in WAD

    Hi,
    When I execute a web report through the Web Application Designer, I get the following error:
    The requested URL could not be retrieved
    While trying to retrieve the URL: http://abcd.efghi.es:8000/sap/bw/BEx?
    The following error was encountered:
    Unable to determine IP address from host name for abcd.efghi.es
    The dnsserver returned:
    Name Error: The domain name does not exist.
    This means that:
    The cache was not able to resolve the hostname presented in the URL.
    Check if the address is correct.
    But when I execute the web report with  the IP  of the machine http://123.456.7.893:8000/sap/bw/BEx?...........
    I can  execute my web report correctly.
    I didn't find any options in the menu web template in order to modify the url generation.
    Please help me to solve this problem.
    Regards,
    Rocio

    You are not alone - Looks like SAP is also looking into this.
    Web Application Designer Appearing in Unicode (UTF-8)

  • Error while deploying module with iasdeploy : Exception while createXmlDocument() : connection refused

    Hi to you all,
    I work with iAS 6.0 sp2 on Solaris.
    For 1 day, I get that exception when trying to deploy or remove my modules (servlets + JSP) with the iasdeploy tool :
    Exception while createXmlDocument()
    java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native method)
    at com.netscape.server.deployment.WebbAppReg.run(compiled code)
    at com.netscape.server.deployment.WebbAppReg.main(Unknown source)
    The war archive is put in the JAR directory, unpacked in the APPS/modules directory, but the servlets of the module have the null GUID in the registry ({000000 000000 000000}. And so, I have the GX error when trying to invoke them.
    What appends ? Is it a iAS process which is unable ?
    Please help !
    Paul-Emile

    I think you have not put the xml files in the war file.
    You need to put them under WEB-INF/ directory. Manually generate the guids using kguidgen script and try to deploy the war module. It should work fine. If it doesnot work please send me the file. So that I can further investigate and find out where exactly the problem is.Other wise you can use the deploytool.
    Please let me know if this works fine.
    Thanks for visiting our web forum.

  • Connection Refused Error while running AS ABAP Initial Load

    All,
    I've never connected SAP NW IdM to an actual SAP system before, and I feel like I'm missing some obvious step of configuration, but I can't figure out what.
    We are in the process of trying provision user accounts to our SAP ABAP systems. My first step was to try to read all of the existing accounts from the ABAP system:
    Our Basis team created me a Communication user with the proper authorizations (I ensured that the authorizations included in SAP_BC_SEC_IDM_COMMUNICATION)
    I created a repository using the SAP NewWeaver AS ABAP (Specific Application Server) Repository Template (No CUA, No SNC) using that user's credentials
    I then used the Job Wizard and used the job template AS ABAP - Initial Load, specifying my repository above.
    When I run the job I get the following:
    Initializing SAP connection with parameters:
    com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to message server failed Connect_PM MSHOST=<IPADDRESS>, R3NAME=<SID>, GROUP=PUBLIC LOCATION CPIC (TCP/IP) on local host ERROR partner not reached (host <IPADDRESS>, service sapms<SID>) TIME Wed Jun 01 13:54:36 201 RELEASE 640 COMPONENT NI (network interface) VERSION 37 RC -10 MODULE nixxi_r.cpp LINE 8840 DETAIL NiPConnect2 SYSTEM CALL SiPeekPendConn ERRNO 10061 ERRNO TEXT WSAECONNREFUSED: Connection refused COUNTER 1
    Error Init failed
    I'm running SAP NW IdM 7.1 SP5 on Windows Server 2003 with MSSQL 2005. The ABAP server is on a UNIX box with an Oracle 10.2 dB.
    Is there additional configuration that needs to take place on the ABAP side to accept the connection?
    I've tried to find documentation on this, but have been unsuccessful. If someone could point me to the correct documents, or at least point me in the right direction for troubleshooting, it would be greatly appreciated.

    Ankur,
    Looks like the endpoint URL of the webservice is not updated and still pointing to the localhost. Try changing it to http://<ip_addres_of_your_server>:7101..... and see if it works fine then.
    -Arun

Maybe you are looking for

  • Importing a file containing long raw data

    I have got a .dmp file which was exported from an oracle 8i database & contains a long raw column.Now, when i try to import this file in to oracle 9i database, the import says, C:\>imp Import: Release 9.2.0.1.0 - Production on Sat Aug 20 14:51:03 200

  • How to increase size of check box in sap script

    Hi All, I need to include check box in sap script. I included check box using insert>character->sap symbols. I cant able to view check box in print preview but i can able to get check box in print out.Size of check box printed in the paper is not hav

  • Disable ALE settings

    Hello, I am sending MATMAS IDoc to XI using change pointers. We need to transport the interafce to production but want the message flow to start a month later so please suggest how can we stop the IDocs from flowing from sender to reciever. Thanks, S

  • No controls in Photomerge exposure?

    I am on the trial of Elements 9 for Mac, and I'm trying out the Photomerge Exposure thing.  I have converted 3 CR2 files to 8 bit .tiffs in LR3 and opened them in PSE9.  I then select them all from the project bin, and click New...Photomerge Exposure

  • Loading PS Elements 12

    I am trying to load PS Elements on windows 8 but keep getting invalid serial number, help please