problem with addwithuuid, got objectnotexistexception

in Help Center
My problem is creates proxy with addwithuuid, I got objectnotexistexception but when I use add(myservant, iceidentity) it works.
What I want to do just obtaining proxy by invoking operations.
At server side code is something like this:
At client side when invoke operation on object servant a (eg: a.getName()),
it works well when I use adapter's add method but i got objectnotexistexception when I use addwithUUID.
"Module.A" is string qualified name of my servant, I'm using C#.
My service deploy on icebox server node, and using Glacier2
What I want to do just obtaining proxy by invoking operations.
At server side code is something like this:
public override APrx getA(string name, Ice.Current current__) { A a = new A(name); Ice.ObjectPrx objPrx = current__.adapter.addWithUUID(a); //Ice.ObjectPrx objPrx = current__.adapter.add(a, new Ice.Identity("Module.A", "")); APrx aPrx = APrxHelper.uncheckedCast(objPrx); return aPrx; }
At client side when invoke operation on object servant a (eg: a.getName()),
it works well when I use adapter's add method but i got objectnotexistexception when I use addwithUUID.
"Module.A" is string qualified name of my servant, I'm using C#.
My service deploy on icebox server node, and using Glacier2
0
Comments
Can you post the code from your client where you obtain the proxy on the A object and where you invoke the getName method?
Cheers,
Benoit.
Thank you for your replay,
Here I post my example code:
slice file
server side
client side
config at client
What I do on client is obtain proxy by stringified first (ExamplePrx proxy) then on that proxy invoke operation to get APrx and than using APrx I call my method getName().
Cheers,
Benoit.
Yes I use IceGrid for deployment my service.
here is the output in the client for code snippet:
output from scenario 1 using add method:
ice_getAdapterId : Noeaing.ReplicaGroup
ice_getIdentity : Module.A
Hello : My Name
output from scenario 2 using addwithuuid method:
ice_getAdapterId : Noeaing.ReplicaGroup
ice_getIdentity : <uuid value>
Ice.ObjectNotExistException is thrown here
In the server, can you try creating the proxy with createIndirectProxy(identity) and see if it fixes the problem?
For example:
If it works, this indicates that you have several replicas deployed and your client was invoking the getName method on the wrong replica. The proxy returned by addWithUUID contains the replica group ID so potentially the call can go to any of the replicas. However, only one replica has an instance of the Ice object so if it calls on the wrong replica the Ice.ObjectNotExistException is expected.
The proxy created with createIndirectProxy doesn't contain the replica group ID, it contains the adapter id instead, so it identifies the specific object adapter where the Ice object was added.
Cheers,
Benoit.
I've done trying creating the proxy with createIndirectProxy(identity) but it still raise Ice.ObjectNotExistException.
client output:
I don't understand why you get this ObjectNotExistException here. Could you send us a small test case? You can try to modify the IceGrid demo to reproduce the problem for example.
Cheers,
Benoit.
Ok, thank for your guidance. I'll doing as you suggested, asap I update if there're any progress about this.