Problem:
Product Name: VisiBroker C
Product Version: 6.0 and above
Product Component: POA
Platform/OS Version: All supported platforms.
Getting CORBA::BAD_PARAM exception when trying to run the server in VBC 6.5, but it runs fine in VBC 5.2.1.
Resolution:
The bank_agent example in VBC 6.5 will throw CORBA::BAD_PARAM exception when the ObjectId "managerId" is not initialised, but it did not do so in VBC 5.2.1 on HP-UX. On other platforms, it would core dump for VBC 5.2.1. The piece of code where it is initialised is below.
PortableServer::ObjectId_var managerId = PortableServer::string_to_ObjectId("BankManager");
poa->activate_object_with_id(managerId, impl);
This check was added from VBE 6.0 release, where user will get BAD_PARAM exception if they pass NULL id.
Hence, the ObjectId cannot be left uninitialised starting from VBE 6.0.
An alternative to "activate_object_with_id" method would be "activate_object" which does not need an ObjectId. Here, the system generates the ObjectId.
#Security
#BAD_PARAM
#VisiBroker
#C
#POA
#c




