[kepler-dev] Getting exception when using PNDirector
Ravi Kumar
ravi_kumar at persistent.co.in
Tue Jan 10 23:23:17 PST 2012
Thanks a lot Christopher
It was really helpful.
Regards,
Ravi
From: Christopher Brooks [mailto:cxh at eecs.berkeley.edu]
Sent: Monday, January 09, 2012 9:34 PM
To: Ravi Kumar
Cc: Kepler-dev at ecoinformatics.org; Shiva Kumar
Subject: Re: [kepler-dev] Getting exception when using PNDirector
Hi Ravi,
You need to call _top.preinitialize() and _top.initialize() first.
I modified CompositeProcessDirector so that if _inputBranchController is null, then an InternalErrorException is thrown:
Exception in thread "main" ptolemy.kernel.util.InternalErrorException: _inputBranchController was null\
? Perhaps initialize() was not called?
in .top.<Unnamed Object>
at ptolemy.actor.process.CompositeProcessDirector._resolveDeadlock(CompositeProcessDirector.ja\
va:701)
at ptolemy.actor.process.ProcessDirector.fire(ProcessDirector.java:259)
at ptolemy.actor.CompositeActor.fire(CompositeActor.java:458)
at test.BowtieTest.init(BowtieTest.java:65)
at test.BowtieTest.main(BowtieTest.java:18)
See ptolemy/moml/MoMLSimpleApplication.java for how to use ptolemy/actor/Manager.java to run your model:
_manager = new Manager(_toplevel.workspace(), "MoMLSimpleApplication");
_toplevel.setManager(_manager);
_toplevel.addChangeListener(this);
_manager.addExecutionListener(this);
_activeCount++;
_manager.startRun();
Thread waitThread = new UnloadThread();
// Note that we start the thread here, which could
// be risky when we subclass, since the thread will be
// started before the subclass constructor finishes (FindBugs)
waitThread.start();
waitThread.join();
if (_sawThrowable != null) {
throw _sawThrowable;
}
For information about initialize(), see Chapter 5, Designing Actors, page 178 of Volume 1 of the Ptolemy Design Docs at http://ptolemy.eecs.berkeley.edu/ptolemyII/designdoc.htm
_Christopher
On 1/9/12 5:17 AM, Ravi Kumar wrote:
Hi All,
I am trying to create and run a workflow programmatically. I have created one and able to run if I use SDF director. But not able to run this using PNDirector. When I export the workflow in xml using exportMoML() method and open the xml file in kepler, it runs properly.
Following error I am getting when trying to execute workflow programmatically using PNDirector.
Exception in thread "main" java.lang.NullPointerException
at ptolemy.actor.process.CompositeProcessDirector._resolveDeadlock(CompositeProcessDirector.java:699)
at ptolemy.actor.process.ProcessDirector.fire(ProcessDirector.java:259)
at ptolemy.actor.CompositeActor.fire(CompositeActor.java:459)
at test.BowtieTest.init(BowtieTest.java:64)
at test.BowtieTest.main(BowtieTest.java:18)
I am not able to find out root cause for this. Any help on this would be really helpful.
Regards,
Ravi
DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
_______________________________________________
Kepler-dev mailing list
Kepler-dev at kepler-project.org<mailto:Kepler-dev at kepler-project.org>
http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
--
Christopher Brooks, PMP University of California
CHESS Executive Director US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust Berkeley, CA 94720-1774
ph: 510.643.9841 (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 cell: 707.332.0670
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-dev/attachments/20120111/38dcdd5b/attachment.html>
More information about the Kepler-dev
mailing list