File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Distributed Java and the fly likes Problems with NameService Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Problems with NameService" Watch "Problems with NameService" New topic
Author

Problems with NameService

Venkat dasari
Ranch Hand

Joined: Nov 12, 2003
Posts: 67
Hi,
I am new to Corba and i am trying to run my sample program in Corba using Jbuilder.
While trying to run the server I tried to get the name service but repeatedly i get the org.omg.Corba.COMM_Failure.
I am providing the code to the server and as well as the trace for further information
Note: i also tried using the NamingContext and NamingContextExt



public class CountServer {
public CountServer() {
}
public static void main(String args[]){
try {
ORB orb = ORB.init(args, null);
POA rootPOA = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
rootPOA.the_POAManager().activate();
CountImpl cImpl = new CountImpl();
cImpl.setORB(orb);
org.omg.CORBA.Object ref = rootPOA.servant_to_reference(cImpl);
count cnt = countHelper.narrow(ref);
org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");Line Number 34
NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
NameComponent nc = new NameComponent("count","");
NameComponent path[] = {nc};
ncRef.rebind(path,cnt);
System.out.println("Count Server is ready and waiting");
orb.run();
} catch (org.omg.CORBA.SystemException se) {
se.printStackTrace();
}catch(Exception e){
e.printStackTrace();
}
}
}


Server Trace:

org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No

at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:148)

at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:65)

at com.sun.corba.se.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:67)

at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:652)

at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:594)

at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1105)

at com.sun.corba.se.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:788)

at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1186)

at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:1079)

at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.java:2436)

at counter.CountServer.main(CountServer.java:34)


Any help would be appreciated.

Thanks and Regards,
Venkat Dasari


Regards,<br />Venkat Dasari<br />SCJP 1.4, SCBCD.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problems with NameService