[kepler-dev] Query Regarding Interactive Shell Actor

Christopher Brooks cxh at eecs.berkeley.edu
Mon Mar 29 19:59:07 PDT 2010


Hi Subhav,
I'm not sure how that trialSwitch.xml could run for you?
This line
     <property name="entityId" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:838:444:1">
causes a class cast exception.  "ptolemy.kernel.util.StringAttribute" should be
"org.kepler.moml.NamedObjId".

To build my try, I used

svn co https://code.kepler-project.org/code/kepler/branches/releases/release-branches/build-area-2.0 build-area
cd build-area
ant change-to -Dsuite=kepler-2.0
ant run -Dworkflow=/home/cxh/trialSwitch2.xml

/etc/issue says:

bash-3.2$ cat /etc/issue
Red Hat Enterprise Linux Client release 5.4 (Tikanga)
Kernel \r on an \m

It could be that your ~/.kepler or ~/KeplerData directories have problems,
maybe try removing those.

Other than that, I'm at a loss.

See my comments below

On 3/29/10 6:12 PM, subhav mital wrote:
> Hi Christopher,
>
> I just restarted my system and freshly checked out a new version using
> the instructions.
> The interactive shell hangs again. Just a blank screen gets shown.
The above is under Ubuntu, right?  So the problem occurs under
Ubuntu.

> This
> does not happen with the pre-alpha version in windows.

So, under Microsoft Windows, the problem does not occur?
That points to something odd about your Ubuntu installation?
What version of Java are you running?
I'm running

bash-3.2$ java -version
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_22-b03, mixed mode)

_Christopher


>
> Thanks.
>
>
> On Mon, Mar 29, 2010 at 9:08 PM, subhav mital <mital.subhav at gmail.com
> <mailto:mital.subhav at gmail.com>> wrote:
>
>     Hi Christopher,
>
>     Following is configuration I use:
>
>     - Ubuntu 9.10
>     -I followed instructions given here:
>     http://mercury.nceas.ucsb.edu/kepler/pipermail/kepler-dev/2010-February/017445.html
>     - I run it from command line. (Terminal)
>
>     Thanks.
>
>
>     On Mon, Mar 29, 2010 at 9:06 PM, subhav mital
>     <mital.subhav at gmail.com <mailto:mital.subhav at gmail.com>> wrote:
>
>         Hi Chad,
>
>         -I am using Ubuntu 9.10
>         -I exactly followed instructions here:
>         http://mercury.nceas.ucsb.edu/kepler/pipermail/kepler-dev/2010-February/017445.html
>         - I am running it from command line. (Terminal)
>
>         Thanks.
>
>
>         On Mon, Mar 29, 2010 at 9:02 PM, Christopher Brooks
>         <cxh at eecs.berkeley.edu <mailto:cxh at eecs.berkeley.edu>> wrote:
>
>             Hi Subhav,
>
>             Before we go much further, could you answer these questions:
>
>              >     If you are getting different behavior, then let me know:
>              >     1) What operating system are you running?  I'm
>             assuming it is Ubuntu
>              >     9.10
>              >     2) How did you build the release?  I'm assuming you
>             built Kepler 2.0
>              >     from sources.
>              >     3) Are you running from within Eclipse or from the
>             Command line?
>
>
>             When I try to open the trialSwitch.xml model in either the
>             Kepler-2.0-rc1 candidate or a devel version of the
>             Kepler-2.0 head, I get:
>
>             ptolemy.kernel.util.IllegalActionException: No Kepler ID was
>             or could be assigned to model: java.lang.ClassCastException:
>             ptolemy.kernel.util.StringAttribute
>                     at
>             org.kepler.gui.frame.KeplerGraphTableau.<init>(KeplerGraphTableau.java:152)
>                     at
>             org.kepler.gui.frame.KeplerGraphTableau$Factory.createTableau(KeplerGraphTableau.java:227)
>                     at
>             ptolemy.actor.gui.PtolemyTableauFactory.createTableau(PtolemyTableauFactory.java:100)
>                     at
>             ptolemy.actor.gui.TableauFactory.createTableau(TableauFactory.java:127)
>                     at
>             ptolemy.actor.gui.Configuration.createPrimaryTableau(Configuration.java:569)
>                     at
>             ptolemy.actor.gui.Configuration.openModel(Configuration.java:875)
>                     at
>             ptolemy.actor.gui.Configuration.openModel(Configuration.java:783)
>                     at
>             ptolemy.actor.gui.TableauFrame._read(TableauFrame.java:987)
>                     at ptolemy.gui.Top._open(Top.java:801)
>                     at
>             ptolemy.gui.Top$FileMenuListener.actionPerformed(Top.java:1207)
>                     at
>             org.kepler.gui.MenuMapper$1.actionPerformed(MenuMapper.java:361)
>                     at
>             javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882)
>                     at
>             javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202)
>                     at
>             javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
>                     at
>             javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
>                     at
>             javax.swing.AbstractButton.doClick(AbstractButton.java:334)
>                     at
>             apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:95)
>                     at
>             java.awt.MenuItem.processActionEvent(MenuItem.java:597)
>                     at java.awt.MenuItem.processEvent(MenuItem.java:556)
>                     at
>             java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:298)
>                     at
>             java.awt.MenuComponent.dispatchEvent(MenuComponent.java:286)
>                     at
>             java.awt.EventQueue.dispatchEvent(EventQueue.java:466)
>                     at
>             java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
>                     at
>             java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
>                     at
>             java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
>                     at
>             java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
>                     at
>             java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
>
>             When I run it in my Ptolemy II devel tree, it opens fine.
>
>
>
>             On 3/29/10 4:14 PM, subhav mital wrote:
>
>                 Thanks a lot for trying this and running me through
>                 these options in detail.
>                 My question is that should it not pop-open a different
>                 display window,
>                 since thats really the functionality I desire.
>
>
>             I don't understand the above, I get only one display.
>
>                 Could you please try this
>
>                 with the current attached workflow?
>
>                 Display is just an example. In reality, I am trying to
>                 launch programs
>                 using external execution. Would this mimic the
>                 functionality you
>                 described?  (Each time an option is selected, it
>                 launches a different
>                 instance of the program)
>
>                 Please try the following:
>
>                 1) Start the workflow
>                 2) Enter 1, five times.
>                 3) "Operation on the Second Branch" should appear five
>                 times in the same
>                 run. Each output appears in a different display window.
>                 Hence five
>                 display windows with the message, in the same run.
>                 (without stopping the
>                 workflow)
>
>
>             Under Mac OS X, I get one display window with "Operation on
>             the Second Branch" 5 times.
>             This sounds different from what you are getting, which would
>             be 5 different
>             display windows?
>             I also tried this on a Linux box, but I got the same result.
>
>             I suggest rebuilding from scratch and then trying a
>             different machine.
>             You could also try running just the Ptolemy II 8.0.beta
>             release, see
>             http://ptolemy.eecs.berkeley.edu/ptolemyII
>
>             _Christopher
>
>
>                 Please verify, if this is working for you?
>
>                 Thanks..
>
>
>
>
>                 On Mon, Mar 29, 2010 at 3:59 PM, Christopher Brooks
>                 <cxh at eecs.berkeley.edu <mailto:cxh at eecs.berkeley.edu>
>                 <mailto:cxh at eecs.berkeley.edu
>                 <mailto:cxh at eecs.berkeley.edu>>> wrote:
>
>                     Hi Subhav,
>                     When I open the attached LoopTry.xml model in a
>                 Kepler-2.0 release
>                     candidate
>                     under Mac OS X, I can type the same character into
>                 the Interactive
>                     Shell Actor
>                     and it appears in the output.  See the attached
>                 screen shot.
>
>                     One interesting thing is that the focus moves from
>                 the Interactive
>                     Shell to
>                     the Display, but this happens only the first time I
>                 run the model.
>
>                     More precisely, what I do is:
>
>                     1) Start up Kepler-2.0
>                     2) File->Open File, Browse to LoopTry.xml select it
>                 and hit open
>                     3) In the new graph editor, hit the run button
>                     4) In the ".LoopTry.InteractiveShell" window, type a 1
>                     5) A ".LoopTry.Display" window appears that has the
>                 focus and that
>                        window has a 1 in it.  I dragged the display
>                 window to a
>                        location adjacent to the InteractiveShell window.
>
>                     6) Click on the ".LoopTry.InteractiveShell" window
>                 and type a 1
>                     7) In the Display window, a 1 appears, but the focus
>                 remains in
>                        the InteractiveShell window.
>                     8) In the ".LoopTry.InteractiveShell" window, type a 1
>                     9) Same behavior as step 7
>
>
>                     If you are getting different behavior, then let me know:
>                     1) What operating system are you running?  I'm
>                 assuming it is Ubuntu
>                     9.10
>                     2) How did you build the release?  I'm assuming you
>                 built Kepler 2.0
>                     from sources.
>                     3) Are you running from within Eclipse or from the
>                 Command line?
>
>                     You might try a reboot or try a different machine to
>                 see if the
>                     problem is specific to your machine.  Doing a new
>                 build might also
>                     help.
>
>                     _Christopher
>
>
>
>
>
>                     On 3/28/10 11:31 PM, subhav mital wrote:
>
>                         Any suggestions on where I could be going wrong?
>                         Thanks for your help.
>
>
>                         On Mon, Mar 29, 2010 at 12:06 AM, Edward A. Lee
>                 <eal at eecs.berkeley.edu <mailto:eal at eecs.berkeley.edu>
>                 <mailto:eal at eecs.berkeley.edu
>                 <mailto:eal at eecs.berkeley.edu>>
>                 <mailto:eal at eecs.berkeley.edu
>                 <mailto:eal at eecs.berkeley.edu>
>                 <mailto:eal at eecs.berkeley.edu
>                 <mailto:eal at eecs.berkeley.edu>>>>
>
>                         wrote:
>
>
>                             Works for me... :-)
>
>                             Edward
>
>
>
>                             On 3/28/10 1:31 PM, subhav mital wrote:
>
>                                 Hi,
>
>                                 While using the interactive shell actor,
>                 I realized that
>                         it does not
>                                 accept the same value twice. Any idea why?
>                                 Eg: If I enter 1 it gets displayed.
>                 Again if I enter 1
>                         on the
>                                 prompt,
>                                 nothing happens.
>
>                                 My use case is implementing a switch
>                 case which can
>                         iterate over
>                                 cases
>                                 as prompted from the user. Eg: Case 1: 5
>                 times, Case 2:
>                         3 times.
>
>                                 Attached is a simple workflow to try this.
>
>                                 Please offer suggestions if anyone has
>                 implemented a similar
>                                 functionality.
>
>                                 Thanks.
>
>
>
>
>                   _______________________________________________
>                                 Kepler-dev mailing list
>                 Kepler-dev at kepler-project.org
>                 <mailto:Kepler-dev at kepler-project.org>
>                 <mailto:Kepler-dev at kepler-project.org
>                 <mailto:Kepler-dev at kepler-project.org>>
>                 <mailto:Kepler-dev at kepler-project.org
>                 <mailto:Kepler-dev at kepler-project.org>
>                 <mailto:Kepler-dev at kepler-project.org
>                 <mailto:Kepler-dev at kepler-project.org>>>
>
>                 http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
>
>
>
>
>                         _______________________________________________
>                         Kepler-dev mailing list
>                 Kepler-dev at kepler-project.org
>                 <mailto:Kepler-dev at kepler-project.org>
>                 <mailto:Kepler-dev at kepler-project.org
>                 <mailto:Kepler-dev at kepler-project.org>>
>                 http://mercury.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 fax:510.642.2718
>                 (Office: 545Q Cory)
>                     home: (F-Tu) 707.665.0131 cell: 707.332.0670
>
>
>
>             --
>             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 fax:510.642.2718             (Office: 545Q
>             Cory)
>             home: (F-Tu) 707.665.0131 cell: 707.332.0670
>
>
>
>

-- 
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 fax:510.642.2718	      (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 cell: 707.332.0670


More information about the Kepler-dev mailing list