I am relatively new to Java (and CORBA) and am trying to write a front end client using JBuilder8 on a PC which makes a call across the network to a server written in Java on a HP Unix box using CORBA ..... and am struggling.
The error I currently get is this :
org.omg.CORBA.BAD_PARAM: minor code: 0 completed: No
at shipconsapp.Module1.ShippingHelper.narrow(ShippingHelper.java:39)
at shipconsapp.Module1.ShippingHelper.narrow(ShippingHelper.java:18)
from the following code snippet:
Properties props = new Properties();
String cl_args[] = {""};
// Set the properties for the ORB Name Service
props.setProperty("ORBInitRef","NameService=corbaname::barney:13015"
// Create and initialize the ORB
ORB orb = ORB.init(cl_args, props);
// Get the root naming context
org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService"
NamingContext ncRef = NamingContextHelper.narrow(objRef);
// Resolve the object reference in naming
NameComponent nc = new NameComponent("Shipping", ""
NameComponent[] path = {nc};
Shipping shipRef = ShippingHelper.narrow(ncRef.resolve(path));
I have removed the debug statements I had but I know it gets as far as the last line which is where the error seems to be generated from.
Am I just being bloody stupid and doing something wrong ???
Anyone able to help a distressed newbie.
Thanks
Andy
The error I currently get is this :
org.omg.CORBA.BAD_PARAM: minor code: 0 completed: No
at shipconsapp.Module1.ShippingHelper.narrow(ShippingHelper.java:39)
at shipconsapp.Module1.ShippingHelper.narrow(ShippingHelper.java:18)
from the following code snippet:
Properties props = new Properties();
String cl_args[] = {""};
// Set the properties for the ORB Name Service
props.setProperty("ORBInitRef","NameService=corbaname::barney:13015"
// Create and initialize the ORB
ORB orb = ORB.init(cl_args, props);
// Get the root naming context
org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService"
NamingContext ncRef = NamingContextHelper.narrow(objRef);
// Resolve the object reference in naming
NameComponent nc = new NameComponent("Shipping", ""
NameComponent[] path = {nc};
Shipping shipRef = ShippingHelper.narrow(ncRef.resolve(path));
I have removed the debug statements I had but I know it gets as far as the last line which is where the error seems to be generated from.
Am I just being bloody stupid and doing something wrong ???
Anyone able to help a distressed newbie.
Thanks
Andy