createObjectAdapter() question

in Help Center
I am writing a .NET application (in c#) to connect to a java server side process. In my attempt to write the c# code (I'm not a .NET programmer by any stretch of the imagination), I've come across the following error:
at Ice.ObjectAdapterI..ctor(Instance instance, Communicator communicator, Obj
ectAdapterFactory objectAdapterFactory, String name, String endpointInfo, Router
Prx router, Boolean noConfig)
at IceInternal.ObjectAdapterFactory.createObjectAdapter(String name, String e
ndpoints, RouterPrx router)
at Ice.CommunicatorI.createObjectAdapter(String name)
at
...
The cause of this error is on the line:
communicator.createObjectAdapter(name + ".Callback.Client");
If I change this to createObjectAdapterWithEndpoints the call appears to succeed. (I'm attempting to use a bi-directional connection so I shouldn't really need to add the endpoints.) Does anyone have an idea of what may be the issue in the createObjectAdapter(string name) case? Is there anything I can do to debug this issue more? (I am using Ice version 3.2.0 on a windows XP machine)
Thanks,
Mayer
at Ice.ObjectAdapterI..ctor(Instance instance, Communicator communicator, Obj
ectAdapterFactory objectAdapterFactory, String name, String endpointInfo, Router
Prx router, Boolean noConfig)
at IceInternal.ObjectAdapterFactory.createObjectAdapter(String name, String e
ndpoints, RouterPrx router)
at Ice.CommunicatorI.createObjectAdapter(String name)
at
...
The cause of this error is on the line:
communicator.createObjectAdapter(name + ".Callback.Client");
If I change this to createObjectAdapterWithEndpoints the call appears to succeed. (I'm attempting to use a bi-directional connection so I shouldn't really need to add the endpoints.) Does anyone have an idea of what may be the issue in the createObjectAdapter(string name) case? Is there anything I can do to debug this issue more? (I am using Ice version 3.2.0 on a windows XP machine)
Thanks,
Mayer
0
Comments
If you call "ToString()" on the exception, you should get a more meaningful error message.
If you want to create an object adapter without any property (e.g. one that you associate with a connection for bi-dir communications), this adapter's name must be the empty string ("").
This is a simple check to ensure that when you give a name to your object adapter, you don't mistype the associated property names. For example:
// code (adapter name mispelled)
adapter = createObjectAdapter("AccountManagment");
# config
AccountManagement.Endpoints=tcp
would detect the typo.
Best regards,
Bernard
Thanks again,
Mayer
Yes, this object-adapter name behavior/check is new in Ice 3.2, and is the same in all language mappings.
Best regards,
Bernard