Bug #4659

Importing run gives a ClassCastException

Added by Derik Barseghian over 12 years ago. Updated over 12 years ago.

workflow run manager
Target version:
Start date:
Due date:
% Done:


Estimated time:


If you try to Open Archive a KAR containing a workflow run that needs to be added to provenance, you get a ClassCastException:

java.lang.ClassCastException: ptolemy.kernel.util.StringAttribute
at org.kepler.objectmanager.ObjectManager.assignIdTo(
at org.kepler.objectmanager.ObjectManager.assignIdTo(


#1 Updated by Christopher Brooks over 12 years ago

The could be from my fix to bug #4547

The change is that DocAttribute.description was changed from a StringParameter
to a StringAttribute.

There are several fixes:
1) I could back out these changes and someone could look at why the problem
occurs in Kepler but not in Ptolemy.

2) There's no stack trace attached, but the code should probably be using the MoMLFilter capability:

// Create a parser to use.
_parser = new MoMLParser();
// We set the list of MoMLFilters to handle Backward Compatibility.

3) Run through all the Kepler models and update StringParameter

BTW - Is there a test that illustrates this problem?

#2 Updated by Derik Barseghian over 12 years ago

I don't think it's related, but I'll keep that in mind when I look into this.

To replicate:
- change-to and launch the wrp suite
- open and execute a workflow
- change to the Report Designer view, Export Archive the run from the Workflow Run Manager, save the kar into the default Workflows folder.
- delete the run from the Workflow Run Manager
- File=>Open Archive the kar you just saved

The mentioned ClassCastException then happens in ObjectManager, when trying to NamedObjIdReferralList

#3 Updated by Derik Barseghian over 12 years ago

fixed in r22486.
problem was in WorkflowRun convertStringToWorkflowRun -- derivedFrom attribute was being created as a StringAttribute instead of NamedObjIdReferralList

#4 Updated by Redmine Admin over 9 years ago

Original Bugzilla ID was 4659

Also available in: Atom PDF