Connection Refused Exception (imap protocol configuration in james server)

hai if i use pop3 protocol i can read the message from the james server
but if i use imap protocol i'm getting the exception connection refused.
what shall i do?

Sounds like a question to ask in the Apache James forum.
The server doesn't seem to be set up to accept IMAP connections.

Similar Messages

  • Rmi client throws Connection Refused exception

    My Rmi client throws a Connection Refused exception when i try to run it on remote machine (in this case i run it on my virtualbox macine).
    The virtualbox machine network is in NAT mode (host machine ip should be 10.0.2.2).
    When rmi client starts get registry instance and print in standar output:
    RegistryImpl_Stub[UnicastRef2 [liveRef: [endpoint:[//10.0.2.2/:1099,util,RmiInstances$1@1275d39](remote),objId:[0:0:0, 0]]]]But when rmi client trys to use any of remote methods it throws Connection Refused, but it's to strange because the Connection Refused has 127.0.1.1 as ip.
    java.rmi.ConnectException: Connection refused to host: 127.0.1.1; ....In client RmiInstances code (this class contains all remote implementations) is:
    public class RmiInstances {
        private static RmiInstances instance;
        private IUserManage userManage;
        private IAnalysis analysis;
        private IPacientManage pacientManage;
        private IInsuranceManage insuranceManage;
        private Config config;
        private RmiInstances()
                throws RemoteException, NotBoundException, IOException {
            this.config = Config.getInstance();
            Registry registry = LocateRegistry.getRegistry(config.getServerUrl()+"/",
                    1099, new RMIClientSocketFactory() {
                @Override
                public Socket createSocket(String host, int port) throws IOException {
                    try {
                        URI uri = new URI(config.getServerUrl()+
                                ":"+config.getServerPort());
                        return new Socket(uri.getHost(), uri.getPort());
                    } catch (URISyntaxException ex) {
                        ex.printStackTrace();
                        return null;
            System.out.println(registry);
            userManage = (IUserManage)registry.lookup("RUserManage");
            analysis = (IAnalysis)registry.lookup("RAnalysis");
            pacientManage = (IPacientManage)registry.lookup("RPacientManage");
            insuranceManage = (IInsuranceManage)registry.lookup("RInsuranceManage");
    ...And server code is the next:
    public static void main(String[] args) {
         System.out.println("GNULab Server " + VERSION + " starting...");
         System.setProperty("java.rmi.server.codebase",
              "file:/home/zarovich/workspace/labserver/bin");
         try {
             // Loading config
             System.out.println("Loading config...");
             Config config = Config.getInstance();
             // inicializando rmi registry
             Registry registry;
             if (config.isSsl()) {
              registry = LocateRegistry.createRegistry(
                   config.getServerPort(), new RmiSSLClient(),
                   new RmiSSLServer());
             } else
              registry = LocateRegistry
                   .createRegistry(config.getServerPort());
             // instanciando implementaciones
             RAnalysis rAnalysis = new RAnalysis();
             RInsuranceManage rInsuranceManage = new RInsuranceManage();
             RPacientManage rPacientManage = new RPacientManage();
             RUserManage rUserManage = new RUserManage();
             // registrando interfaz rmi
             registry.rebind("RAnalysis", (IAnalysis) UnicastRemoteObject.exportObject(rAnalysis, 0));
             registry.rebind("RInsuranceManage", (IInsuranceManage) UnicastRemoteObject.exportObject(rInsuranceManage, 0));
             registry.rebind("RPacientManage", (IPacientManage) UnicastRemoteObject.exportObject(rPacientManage, 0));
             registry.rebind("RUserManage", (IUserManage) UnicastRemoteObject.exportObject(rUserManage, 0));
             System.out.println("GNULab Server " + VERSION + " listening ...");
             System.out.println("Registry instance: " + registry.toString());
         } catch (RemoteException e) {
             e.printStackTrace();
            * catch (MalformedURLException e) { e.printStackTrace(); }
            */catch (IOException e) {
             // TODO Auto-generated catch block
             e.printStackTrace();
         } catch (JDOMException e) {
             // TODO Auto-generated catch block
             e.printStackTrace();
    ...

    I'm solved my problem.
    I just need run my server with -Djava.rmi.serverhost=10.0.2.2 and my client running on my virtualbox machine works!

  • Connection refused Exception parsing an xml on a network drive

    I am getting a "java.net.ConnectException: Connection refused: connect" exception when I try to parse an xml file over a network drive with a url like "\\Host\shared\file.xml". The problem only happens if I use a full qualified url to the file, if I map the drive to the local server then it works fine. This means that "\\Host\shared\file.xml" fails while "G:\file.xml" works but the two point to the same file. The other thing is that it fails for JDK 1.4.0 but works file for JDK1.3.1. Same program, same classpath, same server: it works with JDK1.3.1 but throws the exception for JDK1.4.0. Following is the full exception trace:
    java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
    at java.net.PlainSocketImpl.connectToAddress PlainSocketImpl.java:161)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
    at java.net.Socket.connect(Socket.java:425)
    at java.net.Socket.connect(Socket.java:375)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
    at sun.net.NetworkClient.openServer(NetworkClient.java:118)
    at sun.net.ftp.FtpClient.openServer(FtpClient.java:387)
    at sun.net.ftp.FtpClient.<init>(FtpClient.java:651)
    at sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.ja
    va:175)
    at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnec
    tion.java:257)
    at java.net.URL.openStream(URL.java:955)
    at org.apache.xerces.readers.DefaultReaderFactory.createReader(DefaultRe
    aderFactory.java:149)
    at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocume
    nt(DefaultEntityHandler.java:491)
    at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:3
    12)
    at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1080)
    at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1122)

    From the stack trace posted it appears that URL.openStream decided to use FTP to access the file. Of course that won't work. But the key is that a URL is expected, at least that's what I infer from this line:
    at java.net.URL.openStream(URL.java:955)
    And \\Host\shared\file.xml isn't a URL. Looks like 1.4 has fixed something which broke that shortcut. Change it to a real URL, something like
    file:////Host/shared/file.xml
    Four / is probably correct, although you may have to try it with three.

  • Connection Refused Exception.

    Hi! I have made a java server as an NT Service. This server and my client works fine when I run them from command prompt. But when I make the server as an NT service and then try to connect to it using this client, I get an exception saying connection refused. Can anyone help me with this, its urgent.
    thanks
    rahul

    This is the client program
    import java.net.*;
    public class Client {
    public static void main(String[] args)
    try
    Socket mySocket = new Socket("localhost", 4000);
    System.out.println("Connected");
    catch (Exception e)
    System.err.println("Exception: " + e);
    This is the Server Program
    import java.io.*;
    import java.util.Date;
    class MyServer {
    int m_port;
    ServerSocket m_serverSocket;
    public static void main(String[] args)
    new MyServer(4000);
    public MyServer(int port)
    m_port=port;
    try {
    init();
    catch (Exception e)
    System.out.println("Caught : "+e);
    public void init() throws Exception
    m_serverSocket = new ServerSocket(m_port);
    while(true)
    Socket client = m_serverSocket.accept();
    Thread clientThread = new Thread(new ClientHandler(client));
    clientThread.start();
    public void close() throws Exception { m_serverSocket.close(); } }
    and this is the ClientHandler PRogram.
    import java.io.*;
    import java.net.*;
    import java.util.Date;
    class ClientHandler implements Runnable {
    Socket m_socket;
    public ClientHandler(Socket clientSocket) {
    m_socket=clientSocket; }
    public void run() {
    try {
    processRequests();
    m_socket.close();
    catch (Exception e) { System.out.println("Caught "+e); }
    public void processRequests() throws IOException {
    DataOutputStream dout= new DataOutputStream(m_socket.getOutputStream());
    dout.writeChars((new Date()).toString()+"\n"); } }
    ...The point is that they run perfectly on command prompt but not when i make this server as nt service.
    What could go Wrong ??
    thanks
    rahul

  • Erratic connection refused exception

    Hi all,
    I have a thread in my program that periodically tries to do a Naming.lookup to a remote machine, and proceeds to do other things if there is no exception (this may be compared roughly to pinging the remote server to see if it is up and running).
    While this works fine on most occasions, I sometimes get exceptions like:
            Connection refused to host: remotehost; nested exception is:
            java.net.ConnectException: Connection refused: no further informationfor no apparent reason. This persists for a few cycles of the thread, after which, again for no apparent reason, my client is able to do a Naming.lookup as usual.
    I've made sure that the network connection between the two machines is active, and both of them are alive when these exceptions occur, so I'm not able to pin down the problem.
    I'm starting up a rmiregistry instance in the remote server using LocateRegistry.createRegistry(1099), instead of starting the rmiregistry program from the command line. Could this be a cause for problem?
    I'm using Windows 2000 server with jre 1.3.1 on both machines.
    Thanks,
    Sudarshan

    1. Sometimes just putting in a retry works. Set up a loop and do a naming and if a connection error, wait a few seconds and try it again.
    2. Why do you need multiple look-ups? Once your client gets the remote object there is no longer any need for the RMI Registry. Save the remote object and call the Server directly.

  • Connection refused Error while writing file to FTP server.

    Hi All,
    We got below error while writing file to FTP server. Any one have any idea on this?
    sABCS_1.0_8e88588d4fb54ebd2ac7ef66c8421d52.tmp/writeEncryptedFile.wsdl [ Put_ptt::Put(opaque) ] - Could not invoke operation 'Put' against the 'FTP Adapter' due to:
    ORABPEL-11429
    Error sending file to FTP Server.
    Unable to send file to server. [Caused by: Connection refused]
    Please ensure 1. Specified remote output Dir has write permission 2. Output filename has not exceeded the max chararters allowed by the OS and 3. Remote File System has enough space.

    Hmmm ...
    Same issue as your post from three months' earlier?
    Re: Error while putting file in sftp location.

  • Sql Exception on Testing Configuration with SQL Server JDBC driver for XA

    I have a requirement of analyzing the behavior of SQL Server JDBC data sources for XA transactions in our application.We have been using Non-XA drivers for both Oracle and SQL Server as we had no requirement for transactions spanning across multiple databases in past.I have setup and tested the XA driver for Oracle (Oracle Driver (Thin XA) for Instance Connections 9.0.1,9.2.0,10,11) in Weblogic 11g and its working perfectly for transactions spanning across two databases.No when I am trying to configure weblogic 11g R1 for Sql server JDBC driver to support XA transactions with driver details as follows,
    Server:Weblogic 11g R1
    Driver Type: MS Sql Server
    Database Driver :Oracle's MS SQL Server Driver(Type 4 XA) Version:7.0,2000,2005)
    Database:SQL Server 2005(Single Instance)
    and try to create a new data source and select "Test Configuration" and following error is thrown ,
    <Mar 17, 2011 4:49:49 PM GMT+05:30> <Error> <Console> <BEA-240003> <Console encountered the following error java.sql.SQLException: [OWLS][SQLServer JDBC Driver][SQLServer]xa_open (0) returns -3
    at weblogic.jdbc.sqlserverbase.BaseExceptions40.createAppropriateSQLExceptionInstance(Unknown Source)
    at weblogic.jdbc.sqlserverbase.BaseExceptions40.createSQLException(Unknown Source)
    at weblogic.jdbc.sqlserverbase.BaseExceptions.createException(Unknown Source)
    at weblogic.jdbc.sqlserverbase.BaseExceptions.getException(Unknown Source)
    at weblogic.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
    at weblogic.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
    at weblogic.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source)
    at weblogic.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
    at weblogic.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)
    at weblogic.jdbc.sqlserverbase.BaseStatement.commonTransitionToState(Unknown Source)
    at weblogic.jdbc.sqlserverbase.BaseStatement.postImplExecute(Unknown Source)
    at weblogic.jdbc.sqlserverbase.BasePreparedStatement.postImplExecute(Unknown Source)
    at weblogic.jdbc.sqlserverbase.BaseStatement.commonExecute(Unknown Source)
    at weblogic.jdbc.sqlserverbase.BaseStatement.executeUpdateInternal(Unknown Source)
    at weblogic.jdbc.sqlserverbase.BasePreparedStatement.executeUpdate(Unknown Source)
    at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown Source)
    at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown Source)
    at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.open(Unknown Source)
    at weblogic.jdbcx.sqlserverbase.BaseXAConnection.init(Unknown Source)
    at weblogic.jdbcx.sqlserverbase.BaseXAConnection40.init(Unknown Source)
    at weblogic.jdbc.sqlserverbase.BaseClassCreatorForJDBC40.createXaConnection(Unknown Source)
    at weblogic.jdbcx.sqlserverbase.BaseXADataSource.getXAConnection(Unknown Source)
    at com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:550)
    at com.bea.console.actions.jdbc.datasources.createjdbcdatasource.CreateJDBCDataSource.testConnectionConfiguration(CreateJDBCDataSource.java:450)
    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 org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:870)
    at org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)
    at org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)
    at org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306)
    at org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336)
    at org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute(FlowControllerAction.java:52)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:97)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2044)
    at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.continueChain(ActionInterceptors.java:64)
    at org.apache.beehive.netui.pageflow.interceptor.action.ActionInterceptor.wrapAction(ActionInterceptor.java:184)
    at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.invoke(ActionInterceptors.java:50)
    at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.continueChain(ActionInterceptors.java:58)
    at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:87)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2116)
    at com.bea.console.internal.ConsolePageFlowRequestProcessor.processActionPerform(ConsolePageFlowRequestProcessor.java:261)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:556)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:853)
    at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:631)
    at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:158)
    at com.bea.console.internal.ConsoleActionServlet.process(ConsoleActionServlet.java:256)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
    at com.bea.console.internal.ConsoleActionServlet.doGet(ConsoleActionServlet.java:133)
    at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1199)
    at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.executeAction(ScopedContentCommonSupport.java:686)
    at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.processActionInternal(ScopedContentCommonSupport.java:142)
    at com.bea.portlet.adapter.scopedcontent.PageFlowStubImpl.processAction(PageFlowStubImpl.java:106)
    at com.bea.portlet.adapter.NetuiActionHandler.raiseScopedAction(NetuiActionHandler.java:111)
    at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:181)
    at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:167)
    at com.bea.netuix.servlets.controls.content.NetuiContent.handlePostbackData(NetuiContent.java:225)
    at com.bea.netuix.nf.ControlLifecycle$2.visit(ControlLifecycle.java:180)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:324)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:130)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
    at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:184)
    at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:159)
    at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388)
    at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258)
    at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:199)
    at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at com.bea.console.utils.MBeanUtilsInitSingleFileServlet.service(MBeanUtilsInitSingleFileServlet.java:47)
    at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:130)
    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:292)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    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.run(WebAppServletContext.java:3592)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    I followed the instruction in weblogic jdbc drivers guide to configure the JTA Transactions to support XA on SQL Server machine and weblogic server which included,
    1.Copying sqljdbc.dll copied to SQL_Server_Root/bin directory from WL_HOME\server\lib.
    2.Copied instjdbc.sql to sql server machine and executed the script with following output,
    Changed database context to 'master'.
    Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
    Cannot drop the procedure 'xp_jdbc_open', because it does not exist or you do not have permission.
    Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
    Cannot drop the procedure 'xp_jdbc_open2', because it does not exist or you do not have permission.
    Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
    Cannot drop the procedure 'xp_jdbc_close', because it does not exist or you do not have permission.
    Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
    Cannot drop the procedure 'xp_jdbc_close2', because it does not exist or you do not have permission.
    Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
    Cannot drop the procedure 'xp_jdbc_start', because it does not exist or you do not have permission.
    Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
    Cannot drop the procedure 'xp_jdbc_start2', because it does not exist or you do not have permission.
    Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
    Cannot drop the procedure 'xp_jdbc_end', because it does not exist or you do not have permission.
    Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
    Cannot drop the procedure 'xp_jdbc_end2', because it does not exist or you do not have permission.
    Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
    Cannot drop the procedure 'xp_jdbc_prepare', because it does not exist or you do not have permission.
    Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
    Cannot drop the procedure 'xp_jdbc_prepare2', because it does not exist or you do not have permission.
    Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
    Cannot drop the procedure 'xp_jdbc_commit', because it does not exist or you do not have permission.
    Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
    Cannot drop the procedure 'xp_jdbc_commit2', because it does not exist or you do not have permission.
    Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
    Cannot drop the procedure 'xp_jdbc_rollback', because it does not exist or you do not have permission.
    Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
    Cannot drop the procedure 'xp_jdbc_rollback2', because it does not exist or you do not have permission.
    Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
    Cannot drop the procedure 'xp_jdbc_forget', because it does not exist or you do not have permission.
    Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
    Cannot drop the procedure 'xp_jdbc_forget2', because it does not exist or you do not have permission.
    Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
    Cannot drop the procedure 'xp_jdbc_recover', because it does not exist or you do not have permission.
    Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
    Cannot drop the procedure 'xp_jdbc_recover2', because it does not exist or you do not have permission.
    creating JDBC XA procedures
    instxa.sql completed successfully.
    3.Verified that MSDTC service is running on both SQL Server and weblogic machines with XA Transaction enabled and DTC option enabled for both inbound and outbound connections.
    4.Copied sqljdbc.jar (version 3.0 downloaded from msdn portal) to "C:\Oracle\Middleware\wlserver_10.3\server\ext\jdbc\sqlserver" directory and updated weblogic_classpth variable in commEnv.cmd file.
    set WEBLOGIC_CLASSPATH=%JAVA_HOME%\lib\tools.jar;%BEA_HOME%\utils\config\10.3\config-launch.jar;%WL_HOME%\server\lib\weblogic_sp.jar;%WL_HOME%\server\lib\weblogic.jar;%FEATURES_DIR%\weblogic.server.modules_10.3.2.0.jar;%WL_HOME%\server\lib\webservices.jar;%ANT_HOME%/lib/ant-all.jar;%ANT_CONTRIB%/lib/ant-contrib.jar;C:\Oracle\Middleware\wlserver_10.3\server\ext\jdbc\sqlserver\server\ext\jdbc\sqlserver\sqljdbc.jar
    Can some one please provide some input on whats causing this and any other steps needs to be followed to implement XA support using SQL Server JDBC driver.

    You seem to have done everything correctly and diligently. I would ask that you open
    an official support case.

  • ACE connection refused but not when accesing directly the server

    Hello,
    I am facing the following problem when I try to load a specific webpage using the VIP:
    If I skip the load balancer and hitting the real server, then the page is correctly loaded:
    I capture traffic and I saw that the VIP sends a 400 http error to both real server and to my laptop IP (10.160.8.73)
    Has someone any idea why this is happening?
    Thanks in advance
    Ion

    Hi,
    This may help you:
    The ACE's tengig port is always /1.
    Let's say your ACE is in slot 3. It's backplane interface would then be
    Te3/1. You then use
    the monitor command to configure the source (SPAN) port to this interface.
    monitor session 1 source interface TenGigabitEthernet 3/1 both
    monitor session 1 destination interface GigabitEthernet x/y
    monitor session 1 filter vlan 510 - 511 , 640 , 652 - 656        <---- Line
    is optional and will capture only specified VLANs
    Configure the destination (SPAN) port as a trunk port so that the VLAN IDs
    will be preserved:
    interface Gix/y
    switchport
    switchport trunk encapsulation dot1q
    switchport mode trunk
    switchport nonegotiate
    Be sure that the network analyzer connected to the destination port can
    monitor VLAN tags
    (a trunked port). Here is a link on how to configure NICs using some of the
    Intel chipsets to
    pass the VLAN tagging info:
    http://support.intel.com/support/network/sb/CS-005897.htm
    Wireshark has posted this info, as well as how to configure NICs with the
    Broadcom chipset:
    http://wiki.wireshark.org/CaptureSetup/VLAN#head-e0dc0f9fe0cc6b1b1866d78da7b97ead34dca1d8
    With IOS Release 12.2(18)SXD and later releases, when a destination port is
    a trunk, you can
    use the list of VLANs allowed on the trunk to filter the traffic transmitted
    from the
    destination port.  This should not be necessary if you configured the
    optional 'filter' line
    in the monitor session configuration.
    interface Gix/y
    switchport
    switchport trunk encapsulation dot1q
    switchport trunk allowed vlan 102, 103
    switchport mode trunk
    switchport nonegotiate
    For additional information, see:
    http://www.cisco.com/en/US/docs/switches/lan/catalyst6500/ios/12.2SXF/native/configuration/guide/span.html#wp1036881
    http://www.cisco.com/en/US/products/hw/switches/ps708/products_tech_note09186a008015c612.shtml#topic6
    Cesar R
    ANS Team

  • Invocation time Exception (java.rmi.ConnectException: Connection refused to

    Hi folks,
    SERVER = LINUX
    CLIENT = WINDOWS 200
    JAVA VERSION : 1.4.2
    Object obj = Naming.lookup("rmi://x.x.x.x:5578/MyServer");
    System.out.println("Object ="+obj); // Works fine and return stub as shown in o/p
    MyServer_Stub server = (MyServer_Stub)obj;
    server.validate(); // throws following Connection refused exception
    -----OUTPUT-----
    Object =com.MyServer_Stub[RemoteStub [ref: [endpoint:[x.x.x.x:42360](remote),objID:[a981ca:10722cb9411:-8000, 0]]]]
    java.rmi.ConnectException: Connection refused to host: x.x.x.x.x; nested exception is:
         java.net.ConnectException: Connection refused: connect
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
         at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
         at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)[
         at com.MyServer_Stub.validate(Unknown Source)/b]
         at tescasees.testbyexample.rmi.MyServerChangesTestApplication.main
    Caused by: java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
         at java.net.Socket.connect(Socket.java:452)
         at java.net.Socket.connect(Socket.java:402)
         at java.net.Socket.<init>(Socket.java:309)
         at java.net.Socket.<init>(Socket.java:124)
         at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
         at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
         ... 5 more
    Exception in thread "main"
    [b] Why does java system throws exception at invoke time not connection time at lookup time</b]
    Any suggestion...
    Regards,
    Manoj

    > Are you getting this from a lookup()? If so it means the Registry you are looking for at rmi://x.x.x.x:5578 is not present.
    I am getting it at the time when I invoke the method validate on the object returned from lookup.
    --Manoj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Connection refused is not raising an exception

    Hi, I am having problems getting my code to recognise that a url refuses a connection, eg "http://tigers.com.au".
    Opening the url in a browser correctly shows that a connection is refused.
    However, in Java (1.6_07) code as below, no exception is raised, and the response code is 200 OK.
    Even though no exception is raised, the content that is returned by the InputStream is actually from somewhere else (my local development server), so it seems that the connection is not actually successful.
    The code works fine for other urls that does accept a connection, eg it works fine for "http://www.tigers.com.au".
    Why is my code not raising an exception for cases where the url refuses a connection? Or is there a bug in Java?
    Grateful for any help.
              BufferedReader in = null;
              String s=null;
              HttpURLConnection urlCon = null;
              URL url = null;
              try {
                   url = new URL("http://tigers.com.au");
                   urlCon = (HttpURLConnection) url.openConnection(); 
                   urlCon.connect();
                   System.out.println("urlCon after connect: "+urlCon.getURL());
                         System.out.println("Response code: ["+urlCon.getResponseCode()+"] "+urlCon.getResponseMessage());
                   in = new BufferedReader( new InputStreamReader(urlCon.getInputStream()));
                   while ( (s=in.readLine()) != null) {
                        System.out.println("s: "+s);                    
              catch (Exception e) {
                   System.out.println("Exception: "+e);
              }

    Have found that wildcard addresses matches any address of the local system, and that in IPv4, the wildcard address is 0.0.0.0. Can check for this with InetAddress.isAnyLocalAddress().
    This means that I could potentially handle these cases by adding code to "ping" a host such as "tigers.com.au" using
    InetAddress address = InetAddress.getByName(name);
    if (InetAddress.isAnyLocalAddress() {
    .... do something, eg raise exception
    }But this is not fully satisfactory, as I would rather know that a "connection refused" exception is raised, which is actually the case with "tigers.com.au" (as all the browsers seem able to detect). I am not entirely sure what the relationship is between a site that has "connection refused" and it returning an ip address of 0.0.0.0. I don't think they are synonymous.
    Any thoughts?

  • Connection refused with HTTPS

    Hello,
    We have created a webservice deployed to WebLogic Server 9.2. It requires secure transport using the annotation
    @UserDataConstraint(transport=UserDataConstraint.Transport.CONFIDENTIAL)
    We're able to test this successfully using an XSmiles client browser.
    However, I've written a Java client started with "clientgen" that runs successfully when connecting in nonsecure mode (annotation removed) to a local instance. But when I try to connect to our remote server in secure mode I get "connection refused" (the lengthy call stack is copied below).
    The client code is also copied below (a few strings and IPs were changed). It's able to retrieve the WSDL, but then bombs when calling a port method. This is probably something simple but I've followed tutorials and have not found reference to this particular error on forums or via Google. Any ideas would be appreciated!
    Thanks,
    CJ
    = = = = = = = =
    System.setProperty ("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
    java.security.Security.addProvider (new com.sun.net.ssl.internal.ssl.Provider());
    // must define .trustStoreType, .trustStore, and .trustStorePassword
    System.setProperty("javax.net.ssl.trustStore", "c:\\client-keytool.ts");
    System.setProperty("javax.net.ssl.trustStorePassword", "password");
    System.setProperty("javax.net.ssl.trustStoreType", "JCEKS");
    System.setProperty("weblogic.wsee.client.ssl.stricthostchecking", "false");
    System.out.println ("Connecting to the webservice...");
    PatientRegistrationService service = new PatientRegistrationService_Impl ("https://domain/ws/services/PatientRegistrationPort?WSDL");
    PatientRegistrationPort port = service.getPatientRegistrationPort();
    SecurityQuestionRequestType request = new SecurityQuestionRequestType();
    RequestHeaderType requestHeader = new RequestHeaderType();
    requestHeader.setApplication("x");
    requestHeader.setAppLoginId("x");
    requestHeader.setAppPassword("x");
    request.setRegistrationRequest (requestHeader);
    System.out.println ("Calling getSecurityQuestion method...");
    SecurityQuestionResponseType response = port.getSecurityQuestion (request);
    System.out.println ("...just called getSecurityQuestion.");
    = = = = = = = =
    Connecting to the webservice...
    Calling getSecurityQuestion method...
    Exception in thread "Main Thread" java.rmi.RemoteException: SOAPFaultException - FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}Server] FaultString [Failed to send message using connection:(SoapClientConnection@41626058 <transport=(HTTPSClientTransport@41626055 <url=https://IPADDRESS:9223/domain/ws/PatientRegistrationPort>)>)Connection refused: connect] FaultActor [null] Detail [<detail><bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0"></bea_fault:stacktrace>java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Ljava.net.InetAddress;II)V(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.Socket.connect(Socket.java:507)
         at java.net.Socket.connect(Socket.java:457)
         at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
         at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
         at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
         at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:280)
         at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:337)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:176)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:744)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:162)
         at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:836)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
         at weblogic.wsee.connection.transport.http.HTTPClientTransport.send(HTTPClientTransport.java:161)
         at weblogic.wsee.connection.soap.SoapConnection.send(SoapConnection.java:54)
         at weblogic.wsee.connection.soap.SoapClientConnection.send(SoapClientConnection.java:89)
         at weblogic.wsee.ws.dispatch.client.ConnectionHandler.handleRequest(ConnectionHandler.java:89)
         at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:127)
         at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:100)
         at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:101)
         at weblogic.wsee.ws.WsStub.invoke(WsStub.java:89)
    </detail>]; nested exception is:
         javax.xml.rpc.soap.SOAPFaultException: Failed to send message using connection:(SoapClientConnection@41626058 <transport=(HTTPSClientTransport@41626055 <url=https://IPADDRESS:9223/domain/ws/PatientRegistrationPort>)>)Connection refused: connect
         at test.wsclient.PatientRegistrationPort_Stub.getSecurityQuestion(PatientRegistrationPort_Stub.java:337)
         at test.client.TestClient4.main(TestClient4.java:80)
    Caused by: javax.xml.rpc.soap.SOAPFaultException: Failed to send message using connection:(SoapClientConnection@41626058 <transport=(HTTPSClientTransport@41626055 <url=https://IPADDRESS:9223/domain/ws/PatientRegistrationPort>)>)Connection refused: connect
         at weblogic.wsee.codec.soap11.SoapCodec.decodeFault(SoapCodec.java:259)
         at weblogic.wsee.ws.dispatch.client.CodecHandler.decodeFault(CodecHandler.java:105)
         at weblogic.wsee.ws.dispatch.client.CodecHandler.decode(CodecHandler.java:90)
         at weblogic.wsee.ws.dispatch.client.CodecHandler.handleFault(CodecHandler.java:78)
         at weblogic.wsee.handler.HandlerIterator.handleFault(HandlerIterator.java:254)
         at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:224)
         at weblogic.wsee.ws.dispatch.client.ClientDispatcher.handleResponse(ClientDispatcher.java:161)
         at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:116)
         at weblogic.wsee.ws.WsStub.invoke(WsStub.java:89)
         at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:335)
         at test.wsclient.PatientRegistrationPort_Stub.getSecurityQuestion(PatientRegistrationPort_Stub.java:332)
         ... 1 more
    Caused by: weblogic.wsee.handler.InvocationException: Failed to send message using connection:(SoapClientConnection@41626058 <transport=(HTTPSClientTransport@41626055 <url=https://IPADDRESS:9223/domain/ws/PatientRegistrationPort>)>)
         at weblogic.wsee.ws.dispatch.client.ConnectionHandler.handleRequest(ConnectionHandler.java:91)
         at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:127)
         at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:100)
         at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:101)
         ... 4 more
    Caused by: java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Ljava.net.InetAddress;II)V(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.Socket.connect(Socket.java:507)
         at java.net.Socket.connect(Socket.java:457)
         at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
         at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
         at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
         at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:280)
         at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:337)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:176)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:744)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:162)
         at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:836)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
         at weblogic.wsee.connection.transport.http.HTTPClientTransport.send(HTTPClientTransport.java:161)
         at weblogic.wsee.connection.soap.SoapConnection.send(SoapConnection.java:54)
         at weblogic.wsee.connection.soap.SoapClientConnection.send(SoapClientConnection.java:89)
         at weblogic.wsee.ws.dispatch.client.ConnectionHandler.handleRequest(ConnectionHandler.java:89)
         at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:127)
         at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:100)
         at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:101)
         at weblogic.wsee.ws.WsStub.invoke(WsStub.java:89)

    Never mind, my silly mistake!
    Thanks to http://jordan.fortwayne.com/oracle/oralinux.html
    I realized that I had forgotten to do 'lsnrctl start'
    R. Inamdar (guest) wrote:
    : I downloaded Oracle 805 for Linux. I was able to successfully
    : able to connect to the test database and issue queries with
    : SVRMGRL. However, I get a 'Connection Refused' exception
    : while connecting through the JDBC sample program.
    : How do I enable diagnostics. I tried
    : TRACE_LEVEL_LISTENER = SUPPORT
    : but no trace file was created.
    : What am I doing wrong. Thanks for the help...
    : My evironment is:
    : JDK1.1.7
    : Linux Red Hat 5.2
    : Thin JDBC driver
    : Code fragment:
    : DriverManager.registerDriver(new
    jdbc.driver.OracleDriver());
    : Connection conn =
    : DriverManager.getConnection (
    : "jdbc:oracle:thin:@localhost.localdomain:1521:test",
    : "system",
    : "manager"
    : I tried with "localhost" in place of "localhost.localdomain"
    : without success.
    : Following is my listener.ora
    : # Installation Generated Net8 Configuration
    : # Version Date: Jun-17-97
    : # Filename: Listener.ora
    : LISTENER =
    : (ADDRESS_LIST =
    : (ADDRESS= (PROTOCOL= IPC)(KEY= test))
    : (ADDRESS= (PROTOCOL= IPC)(KEY= PNPKEY))
    : (ADDRESS= (PROTOCOL= TCP)(Host=
    : localhost.localdomain)(Port= 1521))
    : SID_LIST_LISTENER =
    : (SID_LIST =
    : (SID_DESC =
    : (GLOBAL_DBNAME= localhost.localdomain.)
    : (ORACLE_HOME= /usr/local/oracle/805)
    : (SID_NAME = test)
    : (SID_DESC =
    : (SID_NAME = extproc)
    : (ORACLE_HOME = /usr/local/oracle/805)
    : (PROGRAM = extproc)
    : STARTUP_WAIT_TIME_LISTENER = 0
    : CONNECT_TIMEOUT_LISTENER = 10
    : TRACE_LEVEL_LISTENER = OFF
    : # TRACE_LEVEL_LISTENER = SUPPORT
    : # TRACE_FILE_LISTENER = lsnr
    : # TRACE_DIRECTORY_LISTENER=/usr/local/oracle/805/network/trace
    null

  • RMI connection refused

    Hello to all,
    I have created and completed an RMI chat application and tested it on my localhost. It worked all right.
    Now I want to make it live i.e. run it through internet.
    Is it same as running on localhost only we have to change the IP address for locating registry.
    I have done that and uploaded the server file on host, also I have the IP address of that host.
    I have replaces localhost whit the give IP address but connection refused exception is thrown.
    I have located the registry on the server through IP address then when I use
    Registry reg=LocateRegistry("xx.xx.xx.xxx");
    System.out.println("1");
    chatAppIF chatStub=(chatAppIF)Naming.lookup("rmi://xx.xx.xx.xxx:xxxx/service");
    System.out.println("2");
    int i=chatStub.logMeIn(user,pass);
    System.out.println("3");Output screen shows
    1
    2
    Client exception: java.rmi.ConnectException: Connection refused to host: xx.xx.xx.xxx; nested exception is:
            java.net.ConnectException: Connection refused: connectWhile when i use
    Registry reg=LocateRegistry("xx.xx.xx.xxx");
    System.out.println("1");
    chatAppIF stub=(chatAppIF)reg.lookup("service");
    System.out.println("2");
    int i=chatStub.logMeIn(user,pass);
    System.out.println("3");it give output as
    1
    Client exception: java.rmi.ConnectException: Connection refused to host: xx.xx.xx.xxx; nested exception is:
            java.net.ConnectException: Connection refused: connectIs there is difference between naming.lookup() and reg.lookup() method?
    I think Naming.lookup() finds the registry but cannot find the method logMeIn() while reg.lookup() has no success.
    anyway why the connection is refused?

    The argument to Naming.bind()/rebind()/unbind() and Naming.lookup() is a URI of the form rmi://hostname[:port]/path.
    The argument to Registry.bind()/rebind()/unbind() and Registry.lookup() is just the path part.
    The data returned by Naming.list() is an array of URIs.
    The data returned by Registry.list() is an array of paths.
    In other words Naming.list() returns items which can be used as arguments to Naming.lookup(), and Registry.list() returns items which can be used as arguments to Registry.lookup().
    The reason is that when you construct a Registry, via LocateRegistry.getRegistry(), you supply the host and port at that point, so specifying it again in the bind/lookup string would be redundant. There's nothing stopping you doing that but the resulting name won't be compatible with what Naming.bind() would have done.

  • HttpConnection.getResponseCode generates a Connection Refused exeption

    I have the following problem:
    I connect to a webserver, this works fine. Then I write data to the webserver, this also works fine. After writing the data, I determine the http response code to see if everything was successfull. Every so often this generates a "connection refused" exception. This happens even after the connect and the write were successfull. I find this strange, since I was able to connect and write data (this data has arrived at the server because I can log it there without a problem).
    Can anyone explain this behaviour to me, because I am lost here.
    Mark

    Have found that wildcard addresses matches any address of the local system, and that in IPv4, the wildcard address is 0.0.0.0. Can check for this with InetAddress.isAnyLocalAddress().
    This means that I could potentially handle these cases by adding code to "ping" a host such as "tigers.com.au" using
    InetAddress address = InetAddress.getByName(name);
    if (InetAddress.isAnyLocalAddress() {
    .... do something, eg raise exception
    }But this is not fully satisfactory, as I would rather know that a "connection refused" exception is raised, which is actually the case with "tigers.com.au" (as all the browsers seem able to detect). I am not entirely sure what the relationship is between a site that has "connection refused" and it returning an ip address of 0.0.0.0. I don't think they are synonymous.
    Any thoughts?

  • Connection refuse

    Hi,
    I try to load test my web site using apache soap 2.2 for doing some web services. However, when I increase the number of threads in the load test. I got connection refused exception from OC4J and also find SOAPException : msg=Error opening socket...
    Is there a max. connection setting in oc4j?
    Can any one give me a hand in this issue?
    Thanks in advanced!
    Regards,
    --kenneth                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    The problem is addressed (see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4665037):
    Use this code to test the localhost, and I found that those successful machines returned hostname/correct IP, those unsuccessful machines returned hostname/127.0.0.1.
    ----------------- BEGIN SOURCE --------------------
    import java.net.*;
    public class LocalHostTest {
         public static void main(String[] args) {
              try {
                   System.out.println(InetAddress.getLocalHost());
              } catch (Exception e) { e.printStackTrace(); }
    ----------------- END SOURCE --------------------

  • Connection refused problem..., please help.

    I am running the server on PC (Windows 98) and I got
    this message:
    java.rmi.ConnectionException: Connection refused to host: 33186; nested exception is:
    java.net.ConnectException: Connection refused: no further information
    I got both server and client policy. So this is the way I run the server:
    java -Djava.security.policy=server.policy CalcServer
    where CalcServer is the name of the server.
    anybody can help please post.
    Thanks,
    Ted.

    sorry, I forgot to run rmiregistry.
    Problem solved.

Maybe you are looking for