I'm trying to send a struct defined by an IDL. What I do is:
rg.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init();
Any val = orb.create_any();
Property prop= new Property();
prop.pName="pName";
prop.pValue="pValue";
PropertyHelper.insert(val, prop);
Parameter[] params = new Parameter[1];
params[0] = new Parameter("prop", val);
BOMonitoringSet boMonitoringSet = (BOMonitoringSet)
BOMonitoringSetHelper.narrow (_msFactoryMgr.create("Property",
params));
Where _msFactoryMgr is a FactoryManager, a CORBA object, and PRoperty
is an structure defined in an IDL.
When I execute my code, I have got this error when I do the create:
[java] java.lang.NullPointerException
[java] at
com.sun.corba.se.internal.corba.AnyImpl.write_value(AnyImpl.java:581)
[java] at
org.jacorb.orb.CDROutputStream.write_any(CDROutputStream.java:602)
[java] at
com.airbus.aspic.ParameterHelper.write(ParameterHelper.java:46)
[java] at
com.airbus.aspic.SequenceParametersHelper.write(SequenceParametersHelper.java:55)
[java] at
com.airbus.aspic._GenericFactoryStub.create(_GenericFactoryStub.java:78)
[java] at
com.airbus.framework.alf.FactoryManager.create(FactoryManager.java:59)
I'm blocked.. help!
Thanks!
Nick Cross - 07 Sep 2006 15:42 GMT
Hi,
What version of JacORB? How are you running your application? It looks
like you're calling onto Sun internal classes there? May I suggest you
post questions regarding JacORB to the jacorb-developer mailing list.
Cheers
Nick

Signature
Nick Cross nick.cross@prismtech.com
OpenFusion CORBA & OpenSplice DDS http://prismtech.com/middleware
> I'm trying to send a struct defined by an IDL. What I do is:
>
[quoted text clipped - 32 lines]
> I'm blocked.. help!
> Thanks!