[kepler-dev] CloneNotSupportedException

Chad Berkley berkley at nceas.ucsb.edu
Tue Apr 19 15:18:21 PDT 2005


Hi,

Lately, we've been compiling kepler with the CVS version of PTII instead 
of release 4.0.1.  We've started seeing errors (see bottom of email) 
with a lot of our actors saying that a port cannot be cloned because the 
variable name does not match the port name passed to the constructor. 
I'm wondering why this suddenly started happening and why this should be 
illegal behavior to begin with.  It seems reasonable to me to have a 
declaration like

TypedIOPort inputPort = new TypedIOPort(this, "a nice descriptive port 
name", true, false);

The error message seems to strictly forbid this.  On top of this, 
sometimes the variable name *does* match the constructor name and it 
still throws this exception.

My questions are: Does anyone know why this suddenly started happening 
and why is this a problem in the first place?  Is there anyway to fix 
this, short of changing the variable names in all of our actors?

thanks,
chad

java.lang.CloneNotSupportedException: Problem cloning 'outputLog'
      [java]     at ptolemy.kernel.Entity.clone(Entity.java:224)
      [java]     at 
ptolemy.kernel.ComponentEntity.clone(ComponentEntity.java:125)
      [java]     at ptolemy.actor.AtomicActor.clone(AtomicActor.java:121)
      [java]     at 
org.ecoinformatics.seek.sms.AnnotationEngine.buildTreeModel(AnnotationEngine.java:426)
      [java]     at 
org.ecoinformatics.seek.sms.AnnotationEngine.buildTreeModel(AnnotationEngine.java:442)
      [java]     at 
org.ecoinformatics.seek.sms.AnnotationEngine.buildTreeModel(AnnotationEngine.java:442)
      [java]     at 
org.ecoinformatics.seek.sms.AnnotationEngine.buildDefaultActorLibrary(AnnotationEngine.java:377)
      [java]     at 
org.kepler.gui.TabbedLibraryPane.<init>(TabbedLibraryPane.java:108)
      [java]     at 
org.kepler.gui.TabbedLibraryPane$Factory.createLibraryPane(TabbedLibraryPane.java:268)
      [java]     at 
org.kepler.gui.LibraryPaneFactory.createLibraryPane(LibraryPaneFactory.java:121)
      [java]     at 
ptolemy.vergil.basic.BasicGraphFrame.<init>(BasicGraphFrame.java:351)
      [java]     at 
ptolemy.vergil.basic.ExtendedGraphFrame.<init>(ExtendedGraphFrame.java:98)
      [java]     at 
ptolemy.vergil.actor.ActorGraphFrame.<init>(ActorGraphFrame.java:122)
      [java]     at 
ptolemy.vergil.actor.ActorGraphTableau.<init>(ActorGraphTableau.java:103)
      [java]     at 
ptolemy.vergil.actor.ActorGraphTableau$Factory.createTableau(ActorGraphTableau.java:159)
      [java]     at 
ptolemy.actor.gui.PtolemyTableauFactory.createTableau(PtolemyTableauFactory.java:101)
      [java]     at 
ptolemy.actor.gui.TableauFactory.createTableau(TableauFactory.java:123)
      [java]     at 
ptolemy.actor.gui.Configuration.createPrimaryTableau(Configuration.java:202)
      [java]     at 
ptolemy.actor.gui.TableauFrame$1.actionPerformed(TableauFrame.java:369)
      [java]     at 
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
      [java]     at 
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
      [java]     at 
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
      [java]     at 
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
      [java]     at 
javax.swing.AbstractButton.doClick(AbstractButton.java:289)
      [java]     at 
javax.swing.AbstractButton.doClick(AbstractButton.java:269)
      [java]     at 
javax.swing.plaf.basic.BasicMenuUI$MenuKeyHandler.menuKeyPressed(BasicMenuUI.java:589)
      [java]     at 
javax.swing.JMenuItem.fireMenuKeyPressed(JMenuItem.java:608)
      [java]     at 
javax.swing.JMenuItem.processMenuKeyEvent(JMenuItem.java:499)     [java] 
     at javax.swing.JMenuItem.processKeyEvent(JMenuItem.java:458)
      [java]     at 
javax.swing.MenuSelectionManager.processKeyEvent(MenuSelectionManager.java:417)
      [java]     at 
javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper.keyPressed(BasicPopupMenuUI.java:1057)
      [java]     at java.awt.Component.processKeyEvent(Component.java:5058)
      [java]     at 
javax.swing.JComponent.processKeyEvent(JComponent.java:2388)
      [java]     at java.awt.Component.processEvent(Component.java:4909)
      [java]     at java.awt.Container.processEvent(Container.java:1569)
      [java]     at 
java.awt.Component.dispatchEventImpl(Component.java:3615)
      [java]     at 
java.awt.Container.dispatchEventImpl(Container.java:1627)
      [java]     at java.awt.Component.dispatchEvent(Component.java:3477)
      [java]     at 
java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1713)
      [java]     at 
java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:627)
      [java]     at 
java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:831)
      [java]     at 
java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:741)
      [java]     at 
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:592)
      [java]     at 
java.awt.Component.dispatchEventImpl(Component.java:3506)
      [java]     at 
java.awt.Container.dispatchEventImpl(Container.java:1627)
      [java]     at java.awt.Window.dispatchEventImpl(Window.java:1606)
      [java]     at java.awt.Component.dispatchEvent(Component.java:3477)
      [java]     at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
      [java]     at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
      [java]     at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
      [java]     at 
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
      [java]     at 
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
      [java]     at 
java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
      [java] Caused by: ptolemy.kernel.util.IllegalActionException: 
Could not find a port named 'outputLog' or 'outputLogPort'. This can 
occur when the name of the variable does not match the name passed to 
the constructor of the actor.
      [java] Right:
      [java]     outputLog = new TypedIOPort(this, "outputLog", true, 
false);
      [java] Right:
      [java]     outputLog = new TypedIOPort(this, "outputLogPort", 
true, false);     [java] Wrong:
      [java]     outputLog = new TypedIOPort(this, "foo", true, false);
      [java]   in .configuration.actor library.Wmsd Actor
      [java]     at ptolemy.kernel.Entity.clone(Entity.java:199)
      [java]     ... 52 more



More information about the Kepler-dev mailing list