Problem in getting Remote from applet
paragsagdeo Feb 23, 2004 8:18 AMPlease look at the code below
Properties props = new Properties();
props.setProperty(InitialContext.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory") ;
props.put(Context.PROVIDER_URL,"http://220.193.139.115:8080/invoker/JNDIFactory" );
InitialContext ic = new InitialContext(props);
TestRemoteHome home = (TestRemoteHome)PortableRemoteObject.narrow(ic.lookup( "TestRemote" ), AttendeeSessionRemoteHome.class);
System.out.println("got home");
TestRemote remote = (TestRemote) home.create();
This code is inside an applet, when it is executed it can get the home and prints got home but on home.create line it throws below execption..
java.rmi.ConnectException: Connection refused to host: 220.193.139.115; nested exception is:
java.net.ConnectException: Connection refused: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:135)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:96)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45)
at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:173)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
at $Proxy1.create(Unknown Source)
at TestClient.init(TestClient.java:50)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection refused: connect
at sun.rmi.transport.proxy.RMIMasterSocketFactory.checkConnector(Unknown Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
There is a proxy server between this applet and the server.... When run from a browser, I properly properly provide user name and password prompted by java-plugin. but still it throws this exception.
Can someone help regarding this.
Thanks...