Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with Win32 <=> HP-UX comms

Status
Not open for further replies.

mightyjebus

Programmer
Jun 3, 2004
5
0
0
US
i'm using TAO CORBA 1.3a and using an example based on one from "Advanced CORBA Programming with C++" by Henning and Vinoski. it's a simple interface, i can print it here:

interface Time
{
long get_current_time();
};

the client requests the result of time(0) from the server (my server is writing the IOR to a txt file, the client reads the file). simple. my server/client programs work fine when both are running on HP-UX and the same code compiles and runs fine on Win32 (Windows XP Pro). i get problems when the server and client are on different OS. i have my HP-UX space set up as a mapped drive under XP so both programs can see the IOR file.

i can get ORB set up just fine. the server runs with no problems. i'm getting an exception in the client when i try to call the interface function get_current_time(). the exception is as follows:

(3144|4000) EXCEPTION, caught CORBA exception
system exception, ID 'IDL:eek:mg.org/CORBA/TRANSIENT:1.0'
OMG minor code (2), described as 'No usable profile in IOR.', completed = NO

i get the exception in the client no matter if i have the server on the HP, client on XP and vice versa. i'm reltively new to CORBA and i hadn't expected this much trouble.

if this is a common problem, i apologize. any assistance would be appreciated. thanks in advance.

brandon
 
you should ensure what you pass the correct .ior to the client. So, if server writes an .ior in a file, you should give this file to client. Each time server starts you should copy again this file from server to client. I guess, your server writes the ior in a file and client also reads it from a file.

Ion Filipski
1c.bmp
 
thanks for your quick response!

i'm positive that the client is reading the IOR correctly. after reading the file the client does a string_to_object() and it comes back ok (not nil) even the call to _narrow() is good. the only problem is when the client calls the interface function.

i've also tested this on two different HP machines and it works ok. the only problem is the HP <=> Windows. i can post the code if i have to (it's not too long) but for some reason i think the code is good, because it works in other cases.

thanks again!
b
 
If you try to access an object what exist as registered somewhere in the ORB but it is not instantiated you get TRANSIENT or SERVANT_NOT_ACTIVE. So, when you do string_to_object is created the CORBA object what does nothing. When you try to call it, you get SERVANT_NOT_ACTIVE if object is not instantiated, OBJECT_NOT_EXIST if ORB sure has information what in the system is no such object and TRANSIENT when CORBA does not know what to say about that object.
There could be many variants
1. The server have finished execution before client is executed
2. Server was not started
3. The information contained in ior is valid, but expirated.
You should assure what client and server executes Ok on the same machine at the first. After that do it on different machines.

Ion Filipski
1c.bmp
 
but the same code works when client/server are on the same machine. i just did some more testing and i get the same exception when the server isn't running, leading me to believe that it is a problem with the IOR file. but at first glance the IOR file looks ok (no strange characters in it) i'll play around with it some more. thanks for your help.
 
In this case, the problem is what you don't remove the old IOR from client mashine after starting server again, or the problem persist in the network configuration.

Ion Filipski
1c.bmp
 
FYI i've solved this issue. the problem was a naming issue between the two hosts. if i run with these command line args:

server -ORBDottedDecimalAddresses 1
client -ORBDottedDecimalAddresses 1

all is well! thanks for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top