resolve_initial_references causes a SystemException

和自甴很熟 提交于 2020-01-15 06:22:42

问题


We use an ActiveX control in our client, developed with Visual C++ 6.0, in our application. We also use omniORB 2.7 to provide the connection to the server app. It's been working fine; but right now we need to run this application on a Windows 7, 64-bit PC. The ActiveX control is working; but in the C++ code, when it calls ORB's resolve_initial_references function as below:

try 
{
    // Obtain a reference to the root context of the Name service:
    CORBA::Object_var initServ;
    initServ = orb->resolve_initial_references("NameService");
}   
catch(CORBA::ORB::InvalidName& ex)
{
    FormAndOpenHataDialog("Service Required is Invalid [does not exist] !", __FILE__, __LINE__);
    return CORBA::Object::_nil();
}
catch(CORBA::SystemException & ex)
{       
    FormAndOpenHataDialog(ex.NP_RepositoryId() , __FILE__, __LINE__);
    return FALSE;
}

It throws a SystemException. It didn't do this on XP, 32-bit machines. I tried to find out the cause of the exception; but all I could get out was NP_RepositoryId(); and it prints: IDL:omg.org/CORBA/NO_RESOURCES.

I don't think it has a connection problem; because ORB's init() function works without a problem. I also don't think the allowed number of connections are being exceeded; that doesn't make sense. It just says NO_RESOURCES. I tried to print the minor code; but it comes up empty. What else can I do?

Edit: I start the server application with these: -ORBInitialHost 192.168.1.8 -ORBInitialPort 900 -BOAiiop_port 5140


回答1:


It sounds like your client is having trouble finding the initial reference to the name service. Check how you give this information to the client, i.e. omniORB config file, environment variable, command-line argument, or registry (on Windows).



来源:https://stackoverflow.com/questions/16695833/resolve-initial-references-causes-a-systemexception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!