Archived

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

OperationNotExists

I've checked everything and when I connect to my method, it says the operation doesn't exist. I've built the slice definitions over and over. And, I've cleaned my project over and over. I can't figure this one out. Here's the generated code ....

static const ::std::string __omero__api__IRepositoryInfo__getUsedSpaceInKilobytes_name = "getUsedSpaceInKilobytes";

..

::Ice::Long
IceProxy::omero::api::IRepositoryInfo::getUsedSpaceInKilobytes(const ::Ice::Context* __ctx)
{
int __cnt = 0;
while(true)
{
::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
try
{
__checkTwowayOnly(__omero__api__IRepositoryInfo__getUsedSpaceInKilobytes_name);
__delBase = __getDelegate();
::IceDelegate::omero::api::IRepositoryInfo* __del = dynamic_cast< ::IceDelegate::omero::api::IRepositoryInfo*>(__delBase.get());
return __del->getUsedSpaceInKilobytes(__ctx);
}
catch(const ::IceInternal::LocalExceptionWrapper& __ex)
{
__handleExceptionWrapperRelaxed(__delBase, __ex, __cnt);
}
catch(const ::Ice::LocalException& __ex)
{
__handleException(__delBase, __ex, __cnt);
}
}
}

And, here's my usage ...

omero::api::IRepositoryInfoPrx repoInfo = omero.getRepositoryInfoService(ctx);

/* method use */
Ice::Long used = repoInfo->getUsedSpaceInKilobytes();

I am able to get the service. The code fails calling the method.

Thanks,

David

Comments

  • marc
    marc Florida
    Most likely your client and server do not use the same Slice definitions, i.e., the Slice used by the client has the operation, but the Slice used by the server does not have it. If you can't figure out the problem, please attach a (very) small, self-contained example that demonstrates the problem.
  • Marc:

    Thanks. It was namespace confusion ...

    public IUpdatePrx getUpdateService(Ice.Current current) {
    synchronized (updateKey) {
    Ice.Identity id = getIdentity(current, updateKey);
    String key = Ice.Util.identityToString(id);

    Ice.ObjectPrx prx = servantProxy(id, current);
    if (prx == null) {
    _IUpdateOperations ops = createServantDelegate(
    _IUpdateOperations.class, IUpdate.class, key);
    _IUpdateTie servant = new _IUpdateTie(ops);
    prx = registerServant(servant, current, id);
    }
    return IUpdatePrxHelper.uncheckedCast(prx);
    }
    }

    public IRepositoryInfoPrx getRepositoryInfoService(Ice.Current current) {
    synchronized (updateKey) { // here it needed to be "repoKey"
    Ice.Identity id = getIdentity(current, updateKey);
    String key = Ice.Util.identityToString(id);

    Ice.ObjectPrx prx = servantProxy(id, current);
    if (prx == null) {
    _IRepositoryInfoOperations ops = createServantDelegate(
    _IRepositoryInfoOperations.class, IRepositoryInfo.class, key);
    _IRepositoryInfoTie servant = new _IRepositoryInfoTie(ops);
    prx = registerServant(servant, current, id);
    }
    return IRepositoryInfoPrxHelper.uncheckedCast(prx);
    }
    }