Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Null Pointer Exception when invoking .asOrderedSet in EOL query
Null Pointer Exception when invoking .asOrderedSet in EOL query [message #581643] Thu, 08 October 2009 12:07 Go to next message
Sajit  is currently offline Sajit Friend
Messages: 6
Registered: October 2009
Junior Member
Hello Dimitris,

The query in EOL File is:

operation InitialisationDataSet getTimeslotsNot TransmittableTo(other:InitialisationDataSet) : OrderedSet(TimeslotBlock) {
var myTxBs: OrderedSet(TimeslotBlock) := self.getTimeslotBlocks().select(b|b.isExplicitTransmit());
var allTransmittableBs: OrderedSet(TimeslotBlock) := self.getAllTimeslotsTransmittableTo(other);
myTxBs.println();
allTransmittableBs.println();
return myTxBs.reject(b|allTransmittableBs.includes(b));
}


The statement to execute query using EOL is:

timeslots := ids1.getTimeslotsNotTransmittableTo(ids2).asOrderedSet();
timeslots.println();

The above statement gives the required output. But when executed in Java it throws null pointer exception.

The code in Java is:

EolOperation getAllTimeslotsNotTransmittableTo = module.getOperations().getOperation("getAllTimeslotsNotTransmittableTo ");
List idsList = new ArrayList();
idsList.add(ids2);
EolOrderedSet timeSlots = (EolOrderedSet) getAllTimeslotNotTransmittableTo.execute(ids1, idsList, module.getContext());

The above line gives null pointer exception.

Thanks,

Sajit
Re: Null Pointer Exception when invoking .asOrderedSet in EOL query [message #581663 is a reply to message #581643] Thu, 08 October 2009 13:16 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Sajit,

Could you please check if getAllTimeslotNotTransmittableTo is null? If
so this may be due to the extra space in

getOperation("getAllTimeslotsNotTransmittableTo "); <-

Cheers,
Dimitris

Sajit wrote:
> Hello Dimitris,
>
> The query in EOL File is:
>
> operation InitialisationDataSet getTimeslotsNot
> TransmittableTo(other:InitialisationDataSet) : OrderedSet(TimeslotBlock) {
> var myTxBs: OrderedSet(TimeslotBlock) :=
> self.getTimeslotBlocks().select(b|b.isExplicitTransmit());
> var allTransmittableBs: OrderedSet(TimeslotBlock) :=
> self.getAllTimeslotsTransmittableTo(other);
> myTxBs.println();
> allTransmittableBs.println();
> return myTxBs.reject(b|allTransmittableBs.includes(b));
> }
>
>
> The statement to execute query using EOL is:
>
> timeslots := ids1.getTimeslotsNotTransmittableTo(ids2).asOrderedSet();
> timeslots.println();
>
> The above statement gives the required output. But when executed in Java
> it throws null pointer exception.
>
> The code in Java is:
>
> EolOperation getAllTimeslotsNotTransmittableTo =
> module.getOperations().getOperation("getAllTimeslotsNotTransmittableTo ");
> List idsList = new ArrayList();
> idsList.add(ids2);
> EolOrderedSet timeSlots = (EolOrderedSet)
> getAllTimeslotNotTransmittableTo.execute(ids1, idsList,
> module.getContext());
>
> The above line gives null pointer exception.
>
> Thanks,
>
> Sajit


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Previous Topic:Explicit invocation of ETL rule
Next Topic:Explicit invocation of ETL rule
Goto Forum:
  


Current Time: Fri Apr 19 20:29:50 GMT 2024

Powered by FUDForum. Page generated in 0.02588 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top