Original Post
If anyone is experienced with CORBA im trying to implement a struct specification in java and having a lot of trouble.. my IDL looks like the following module LMS { struct Alarm { string sensor; string zone; }; interface LMSIF { //functions and such declaared here }; }; From what i understad, a struct gets mapped directly to a java class, like the following public final class Alarm { public String sensor; public String zone; public Alarm() {} //default constructors, oublic Alarm(String _sensor, String _zone) {zone = _zone, sensor = _sensor} } Now im trying to access the values in the struct/class like so: class LMSServant extends _LMSIFImplBase { Alarm al; //functions here public LMSServant() { //this line causes the problem. al.sensor = "Sensor 1"; } } But I get constand NullPointerException errors when it hits the 'al.sensor='line. from a java point of view how does the code look? Any reason why it shouldnt be working? If anyone knows a bit of CORBA too, then again any ideas? I havent declared the class Alarm anywhere in the java files, should i be doing? I tried that but it started causing other problems..