I am rather new to this mailing list so excuse me if this problem has
been raised in other mails. My problems is that I have a java client which is
talking to a TAO c++ server, for a while we've been using persistant IOR's and
that seems to work fine, the problem is when we use the TAO Naming Service, java
clients cannot talk to the TAO Nameserver. The Tao Nameserver generates a
message saying the object INIT cannot be found in it's hash table (Note TAO
clients work fine). Could someone please calrify whether this is a bug or
whether it's because TAO is a compliant Interoperable Naming Service and the
java one is not. If the second one is the case can someone point me to a name
service that will talk to TAO.
Thanks,
David Gramosli
> I am rather new to this mailing list so excuse me if this problem has
>been raised in other mails.
Yes, it has. Please see www.dejanews.com to search for the discussion
and resolutions to your problem.
> My problems is that I have a java client which is talking to a TAO
> c++ server,
What Java ORB are you using?
> for a while we've been using persistant IOR's and that seems to work
> fine, the problem is when we use the TAO Naming Service, java
> clients cannot talk to the TAO Nameserver. The Tao Nameserver
> generates a message saying the object INIT cannot be found in it's
> hash table (Note TAO clients work fine). Could someone please
> calrify whether this is a bug or whether it's because TAO is a
> compliant Interoperable Naming Service and the java one is not.
Right. Fortunately, this is trivial to fix. Just check out the
$TAO_ROOT/examples/Simulator/DOVEBrowser/NS_Resolve.java
file for the solution.
Thanks,
Doug
--
Dr. Douglas C. Schmidt, Associate Professor
Department of Computer Science, Washington University
St. Louis, MO 63130. Work #: (314) 935-4215; FAX #: (314) 935-7302
sch...@cs.wustl.edu, www.cs.wustl.edu/~schmidt/
If you're using JDK 1.2 and the TAO Name Service, I know of 2 approached you
can use:
(1) Launch TAO Naming_Service with -ORBEndpoint iiop://hostname:900
since Java IDL bootstrap defaults to using port 900. (Note that if the
TAO name service is running on Solaris, you'll have to be root user since
port 900 is considered reserved.)
(2) Pass the TAO Name Service IOR to the Java client and do a string_to_object()
conversion, followed by the necessary narrow().
As a corollary, TAO applications can also use the JDK tnameserv utility. Just
make sure you specify "-ORBnameserviceport" with the same port number as
tnameserv
when launching the TAO app.
--- becs
From: David Gramosli <da...@syscorp.com.au> on 07/20/99 06:33 GMT
Please respond to da...@syscorp.com.au; Please respond to ace-...@cs.wustl.edu
To: ace-...@cs.wustl.edu
cc: (bcc: Rebecca A Sanford/GDIS/GDYN)
Subject: [ace-users] java using TAO Naming Service
Hi All,
I am rather new to this mailing list so excuse me if this problem has
been raised in other mails. My problems is that I have a java client which is
talking to a TAO c++ server, for a while we've been using persistant IOR's and
that seems to work fine, the problem is when we use the TAO Naming Service, java
clients cannot talk to the TAO Nameserver. The Tao Nameserver generates a
message saying the object INIT cannot be found in it's hash table (Note TAO
clients work fine). Could someone please calrify whether this is a bug or
whether it's because TAO is a compliant Interoperable Naming Service and the
Using the first approach, invoking (java application NT):
org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
throws an exception: ERROR :
org.omg.CORBA.OBJECT_NOT_EXIST: minor code: 1413545984 completed: No
The java application was lauched as follow:
java HelloClient -ORBInitialHost pegasus -ORBInitalPort 1050
The TAO Name Service (Solaris UNIX)was launched as follow:
Naming_Service "NameService" -ORBEndpoint iiop:://pegasus:1050
Do you know what's wrong here ?
Sidney
Sunil
import HelloApp.*;
import org.omg.CosNaming.*;
import
org.omg.CORBA.*;
import java.io.*;
public class HelloClient
{
public
static void main(String args[])
{
try{
// create
and initialize the ORB
ORB orb = ORB.init(args, null);
// get the root naming context
// file nsior contains the IOR of the TAO naming service
FileReader f = new FileReader("nsior");
BufferedReader bf = new
BufferedReader(f);
String nameIOR = bf.readLine();
System.out.println("Naming Service IOR is " + nameIOR);
org.omg.CORBA.Object nameObj = orb.string_to_object(nameIOR);
NamingContext ncRef = NamingContextHelper.narrow(nameObj);
//
resolve the Object Reference in Naming
NameComponent nc = new
NameComponent( args[0], "");
NameComponent path[] = {nc};
HelloApp.Hello helloRef =
HelloApp.HelloHelper.narrow(ncRef.resolve(path));
// call the
Hello server object and print results
String hello =
helloRef.sayHello();
System.out.println(hello);
}
catch (Exception e) {
System.out.println("ERROR : " + e) ;
e.printStackTrace(System.out);
}
}
}
\\|//
(o o)
+--------------------oOOo-(_)-oOOo-----------------------------------+
| |
| Sunil Kumar 408-992-3547 (phone) |
| SUTMYN Storage Corporation 408-992-3621 (fax) |
| sku...@sutmyn.com |
+-------------------o000-------000o----------------------------------+
\ ( ) /
\_) (_/
I also have tried the other approach of using the name service ior. When i use the
name service ior every time I attempt to retrieve an object from the name service
object the server crashes. the version of tao we are using is 3.24 I'm downloading
the latest as we speak. I've also tried what Shiba did and that fails for me too.
"Shiba, Sydney" wrote