Archived

This forum has been archived. Please start a new discussion on GitHub.

Client problem reaching object operation at a different host

Hello,

I am developing my first ICE-application and I got missed with this problem...

I have 2 servants...
Servant1 at host1 that incarnates object1 which has the operation "op1"
, in Servant1 I create ObjectAdapter1 using the function createObjectAdapterWithEndPoints where the EndPoints are defined as follows
tcp -h * -p 9000

Servant2 at host2 that incarnates object2 which has the operation "op2",
where I create ObjectAdapter2 using the same function as above but now the EndPoints are
tcp -h * -p 10000

both Servants are using different communicators following the FileSystem example.

The client is also running at host1, and there I create two proxies using the stringToProxy function, specifying in both cases as EndPoints tcp -h ip_address_host1 -p 9000 and tcp -h ip_address_host2 -p 10000, respectively. Then I call to object1.op1() and all is ok..but when I call to object2.op2() an OperationNotExistException is triggered. I don't know what's the problem; I have reviewed the ice interfaces definition on both sides (client and server) and is ok. The client can reach the object2 but doesn't find the operation.

Could you help me with it?
Thanks

Comments

  • dwayne
    dwayne St. John's, Newfoundland
    Hi,

    The easiest way for us to help would be to post a small compilable example that demonstrates your problem. It it hard to say what is wrong with your application without seeing the actual code.

    Dwayne
  • Here it is,

    Before compiling, in Client.java it has to be replaced in the proxies declaration...

    /*host2*/ by the IP address of a remote machine
    /*host1*/ by the IP address of the same machine where is running the Client

    Thanks for your help,
    laura
  • dwayne
    dwayne St. John's, Newfoundland
    I tried your example and it worked fine for me. You might want to try running with network tracing enabled by adding --Ice.Trace.Network=2 to your command lines and ensure that connections are being made properly. Also, can you confirm what version of Ice you are using, I tested with Ice 3.3.0.

    Dwayne
  • Thank you for your help, I downloaded Ice 3.3.0 and now is running.
  • dwayne
    dwayne St. John's, Newfoundland
    That's good to hear. Out of curiosity, what version of Ice were you seeing the problem with?
  • Sorry for the late reply, I was using the previous version to the current Ice version on the machine where I was running the client and one server and the current version of Ice (Ice 3.3.0) for the other machine where was running the other server. I don´t know if the problem was due to this heterogeneus versioning within the application or if it should have worked anyway.

    laura