• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Problem in executing remote Java Swing client of an EJB application

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting the following exception when i am trying to run my client code.

client code is running perfectly, when i tried it on the same system on which server is running. I am using WSAD 5.0.
is there any further settings required for running clients from a remote machine. Please, somebody help me out.

javax.naming.ServiceUnavailableException: A communication failure occurred while attempting to obtain an initial context using the provider url: "iiop://<mc-name>:2809". Make sure that the host and port information is correct and that the server identified by the provider url is a running name server. If no port number is specified, the default port number 2809 is used. Other possible causes include the network environment or workstation network configuration. Root exception is org.omg.CORBA.TRANSIENT: Connection refused: connect:host=<mc-name>.<my - company>.com,port=2809 minor code: 4942F301 completed: No


the code for looking up is:
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL,"iiop://<mc-name>:2809");
Context ctx = new InitialContext(env);



Thanks & Regards
Rajan
 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because you are running your client on a remote host , please set the Server information in your InitialContext properties as
properties.put( javax.naming.Context.PROVIDER_URL,
"IIOP://remote_host_ip_address:2809/" );
 
Sudhesh Rajan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
Thanks for your kind reply.
I tried it with the InitialContext properties as
properties.put( javax.naming.Context.PROVIDER_URL,
"IIOP://remote_host_ip_address:2809/" );


but again the same exception came. On adding namingserver.jar file the
previous exception has gone.
Now it is giving

javax.naming.CommunicationException: A communication failure occurred while attempting to obtain an initial context using the provider url: "corbaloc:iiop:remote_host_ip_address:2809". Make sure that the host and port information is correct and that the server identified by the provider url is a running name server. If no port number is specified, the default port number 2809 is used. Other possible causes include the network environment or workstation network configuration. Root exception is org.omg.CORBA.COMM_FAILURE: WRITE_ERROR_SEND_1 minor code: 49421050 completed: No

Regards

sudhesh Rajan
 
Lin Feng
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you did not use your real remote host name or ip address of the server which hosts your naming service to replace remote_host_ip_address string .
 
Sudhesh Rajan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Lin,

Once again Thanks for your kind reply.

I got the solution, actually i didn't set the BootstrapHostAddress from localhost to machine address that's why the problem was coming during execution.

If any one have the same type of problem with the deployment of client code then just go to the Adminconsole the to the server
in processdefinition change the value of BootStrapHostAddress from localhost to mc name then restart your server.


or you can change this value in serverindex.xml file also.

Thanks & Regards

Sudhesh
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!