Problem:
- Product Name: VisiBroker
- Product Version: 5.2.1
- Product Component: irep
- Platform Version: All
- JDK/Compiler Version: N.A
VBC 5.2.1: BAD_PARAM exception encountered when trying to insert StructDef into irep.
Resolution:
The main issue with the BAD_PARAM exception encountered when trying to insert StructDef into irep is actually spec compliance. The CORBA specs say that type code of the StructMember must be set to TC_void. So VisiBroker's irep is correct to enforce this requirement. Please refer to CORBA specs V2.5 p10.5.10.2 for more details.
Therefore, changing the code from:--
sm[0] = new StructMember("MemberName0", ir.get_primitive(org.omg.CORBA.PrimitiveKind.pk_long).type(), ir.get_primitive(org.omg.CORBA.PrimitiveKind.pk_long));
--to--
sm[0] = new StructMember("MemberName0", ir.get_primitive(org.omg.CORBA.PrimitiveKind.pk_void).type(), ir.get_primitive(org.omg.CORBA.PrimitiveKind.pk_long));
will resolve the issue.
#VisiBroker
#irep
#Security