2

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

Halo
  • 1,524
  • 3
  • 24
  • 39
  • Do you have your client application configured correctly to find the name service? Usually you set `InitRef` in your omniORB config file, e.g. `InitRef = NameService=corbaname::host1.example.com`. – Brian Neal May 22 '13 at 17:43
  • Currently the client uses from the registry ORBInitialHost and ORBInitialPort info. – Halo May 23 '13 at 06:56
  • Just tried deleting these registry entries in a working machine; and I got the same error. So it's now clear that this new PC for some reason cannot acquire the host and port information from the registry – Halo May 23 '13 at 07:26
  • Config is in the registry, at ORL/omniORB/2.0; as ORBInitialHost and ORBInitialPort. This is how we've used the client until now. – Halo May 23 '13 at 07:29
  • Ok, man thanks; it's solved. Yes; the problem was that the client couldn't find the host info from the registry. ORL key should be under the Wow6432Node key for a 32-bit application. When I moved the key under there it worked. – Halo May 23 '13 at 07:57
  • Cool, I wrote up an after-the-fact answer. :) – Brian Neal May 23 '13 at 13:05

1 Answers1

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).

Brian Neal
  • 31,821
  • 7
  • 55
  • 59
  • I'll rewrite it here: For a 32-bit omniORB, if you're getting the initial references from the registry; in a 64-bit PC, the registry info, e.g ORL/omniORB/2.0, should reside under the key Wow6432Node. That's where the app looks for initial refs. – Halo May 27 '13 at 08:21