Project

General

Profile

Bug #4929

cannot add composite actor to canvas

Added by Daniel Crawl over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
actors
Target version:
Start date:
04/05/2010
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
4929

Description

When I place a composite actor, or composite subclass, on the canvas, I get the attached exception (both 2.0 and trunk).


Related issues

Blocks Kepler - Bug #4916: Save Archive gives an errorResolved03/30/2010

History

#1 Updated by Derik Barseghian over 10 years ago

Based on error message this looks like another manifestation of bug#4916

#2 Updated by Christopher Brooks over 10 years ago

Under Kepler devel head
1. Search for "sinewave".
2. Under Trigonometric Operation, drag Sinewave into the canvas
3. The following stack trace appears

com.microstar.xml.XmlException: Cannot create entity without a class name. in [external stream] at line 2 and column 18
at ptolemy.moml.MoMLParser._checkForNull(MoMLParser.java:3792)
at ptolemy.moml.MoMLParser._createEntity(MoMLParser.java:3973)
at ptolemy.moml.MoMLParser.startElement(MoMLParser.java:2493)
at com.microstar.xml.XmlParser.parseElement(XmlParser.java:921)
at com.microstar.xml.XmlParser.parseContent(XmlParser.java:1104)
at com.microstar.xml.XmlParser.parseElement(XmlParser.java:924)
at com.microstar.xml.XmlParser.parseContent(XmlParser.java:1104)
at com.microstar.xml.XmlParser.parseElement(XmlParser.java:924)
at com.microstar.xml.XmlParser.parseDocument(XmlParser.java:481)
at com.microstar.xml.XmlParser.doParse(XmlParser.java:159)
at com.microstar.xml.XmlParser.parse(XmlParser.java:132)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1402)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1374)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1530)
at ptolemy.moml.MoMLChangeRequest._execute(MoMLChangeRequest.java:289)
at ptolemy.kernel.util.ChangeRequest.execute(ChangeRequest.java:171)
at ptolemy.kernel.util.NamedObj.executeChangeRequests(NamedObj.java:732)
at ptolemy.kernel.util.NamedObj.requestChange(NamedObj.java:1757)
at ptolemy.actor.CompositeActor.requestChange(CompositeActor.java:1594)
at ptolemy.vergil.basic.EditorDropTarget$DTListener.drop(EditorDropTarget.java:450)
at java.awt.dnd.DropTarget.drop(DropTarget.java:430)
at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTargetContextPeer.java:500)
at sun.awt.dnd.SunDropTargetContextPeer.access$800(SunDropTargetContextPeer.java:53)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(SunDropTargetContextPeer.java:812)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTargetContextPeer.java:736)
at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:29)
at java.awt.Component.dispatchEventImpl(Component.java:3926)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:4007)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3861)
at java.awt.Container.dispatchEventImpl(Container.java:2054)
at java.awt.Window.dispatchEventImpl(Window.java:1801)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
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)

Also, this text appears on stdout:

[run] The class name you entered was either not found in classpath or could not be instantiated:
[run] ptolemy.actor.lib.Sinewave
[run] Note that this class must be in the classpath from which you launched this program.
[run] ptolemy.actor.lib.Sinewave
[run] Error in 'getMetadata' of ActorCacheObject: Error in parsing actor metadata: null
[run] Error inside GetMomlFromLSID.getMoml(): empty error message
[run] Error creating alternateGetMoml!

Also, searching for Composite and dragging it in results.

ptolemy.kernel.util.IllegalActionException: Cannot find class: CompositeActor
Because:
-- /Users/cxh/src/kepler/CompositeActor.xml (No such file or directory)
-- XML file not found relative to classpath.
-- /Users/cxh/src/kepler/CompositeActor.xml
/Users/cxh/src/kepler/CompositeActor.xml (No such file or directory)
in file:/Users/cxh/src/kepler/ at line 1 and column 71
at ptolemy.moml.MoMLParser._createEntity(MoMLParser.java:3877)
at ptolemy.moml.MoMLParser.startElement(MoMLParser.java:2493)
at com.microstar.xml.XmlParser.parseElement(XmlParser.java:921)
at com.microstar.xml.XmlParser.parseDocument(XmlParser.java:481)
at com.microstar.xml.XmlParser.doParse(XmlParser.java:159)
at com.microstar.xml.XmlParser.parse(XmlParser.java:132)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1418)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1374)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1517)
at org.kepler.objectmanager.ActorMetadata.lookForMoml(ActorMetadata.java:1492)
at org.kepler.objectmanager.ActorMetadata.getActorClass(ActorMetadata.java:1550)
at org.kepler.objectmanager.ActorMetadata.<init>(ActorMetadata.java:288)
at org.kepler.objectmanager.cache.ActorCacheObject.getMetadata(ActorCacheObject.java:269)
at org.kepler.moml.GetMomlFromLSID.getMoml(GetMomlFromLSID.java:91)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at ptolemy.vergil.basic.EditorDropTarget$DTListener.drop(EditorDropTarget.java:396)
at java.awt.dnd.DropTarget.drop(DropTarget.java:430)
at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTargetContextPeer.java:500)
at sun.awt.dnd.SunDropTargetContextPeer.access$800(SunDropTargetContextPeer.java:53)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(SunDropTargetContextPeer.java:812)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTargetContextPeer.java:736)
at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:29)
at java.awt.Component.dispatchEventImpl(Component.java:3926)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:4007)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3861)
at java.awt.Container.dispatchEventImpl(Container.java:2054)
at java.awt.Window.dispatchEventImpl(Window.java:1801)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
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)
Caused by: com.microstar.xml.XmlException: -- /Users/cxh/src/kepler/CompositeActor.xml (No such file or directory)
-- XML file not found relative to classpath.
-- /Users/cxh/src/kepler/CompositeActor.xml
/Users/cxh/src/kepler/CompositeActor.xml (No such file or directory)
in file:/Users/cxh/src/kepler/ at line 1 and column 71
at ptolemy.moml.MoMLParser.fileNameToURL(MoMLParser.java:1176)
at ptolemy.moml.MoMLParser._findOrParse(MoMLParser.java:4778)
at ptolemy.moml.MoMLParser._attemptToFindMoMLClass(MoMLParser.java:3649)
at ptolemy.moml.MoMLParser._createEntity(MoMLParser.java:3872)
... 39 more
Caused by: com.microstar.xml.XmlException: -- /Users/cxh/src/kepler/CompositeActor.xml (No such file or directory)
-- XML file not found relative to classpath.
-- /Users/cxh/src/kepler/CompositeActor.xml
/Users/cxh/src/kepler/CompositeActor.xml (No such file or directory)
in file:/Users/cxh/src/kepler/ at line 1 and column 71
at ptolemy.moml.MoMLParser.fileNameToURL(MoMLParser.java:1176)
at ptolemy.moml.MoMLParser._findOrParse(MoMLParser.java:4778)
at ptolemy.moml.MoMLParser._attemptToFindMoMLClass(MoMLParser.java:3649)
at ptolemy.moml.MoMLParser._createEntity(MoMLParser.java:3872)
at ptolemy.moml.MoMLParser.startElement(MoMLParser.java:2493)
at com.microstar.xml.XmlParser.parseElement(XmlParser.java:921)
at com.microstar.xml.XmlParser.parseDocument(XmlParser.java:481)
at com.microstar.xml.XmlParser.doParse(XmlParser.java:159)
at com.microstar.xml.XmlParser.parse(XmlParser.java:132)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1418)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1374)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1517)
at org.kepler.objectmanager.ActorMetadata.lookForMoml(ActorMetadata.java:1492)
at org.kepler.objectmanager.ActorMetadata.getActorClass(ActorMetadata.java:1550)
at org.kepler.objectmanager.ActorMetadata.<init>(ActorMetadata.java:288)
at org.kepler.objectmanager.cache.ActorCacheObject.getMetadata(ActorCacheObject.java:269)
at org.kepler.moml.GetMomlFromLSID.getMoml(GetMomlFromLSID.java:91)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at ptolemy.vergil.basic.EditorDropTarget$DTListener.drop(EditorDropTarget.java:396)
at java.awt.dnd.DropTarget.drop(DropTarget.java:430)
at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTargetContextPeer.java:500)
at sun.awt.dnd.SunDropTargetContextPeer.access$800(SunDropTargetContextPeer.java:53)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(SunDropTargetContextPeer.java:812)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTargetContextPeer.java:736)
at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:29)
at java.awt.Component.dispatchEventImpl(Component.java:3926)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:4007)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3861)
at java.awt.Container.dispatchEventImpl(Container.java:2054)
at java.awt.Window.dispatchEventImpl(Window.java:1801)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
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)

I get similar errors from the kepler 2.0 branch.
I do not get these errors in Kepler-2.0 rc1. So, it must be a change
since 2.0rc1

I do not get these errors in Vergil in the ptII tree outside of Kepler.

I do not get these errors running Vergil from the ptolemy-8.0 directory
in the Kepler 2.0 svn branch:
java -classpath ../ptolemy-8.0/target/classes:../ptolemy-8.0/src ptolemy.vergil.VergilApplication

So, the problem is likely somewhere in Kepler from a change between 2.0rc1
and now. The change could be caused by changes to MoMLParser.

#3 Updated by Derik Barseghian over 10 years ago

I believe this was fixed when bug#4916 was fixed, with r23572 (2.0) and 23571 (trunk). It's working for me on trunk and on 2.0.

#4 Updated by Redmine Admin over 7 years ago

Original Bugzilla ID was 4929

Also available in: Atom PDF