Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / CORBA / September 2006

Tip: Looking for answers? Try searching our database.

NullPointerException when sending a struct in an any object

Thread view: 
piltrafeta@gmail.com - 07 Sep 2006 09:22 GMT
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!


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.