Bug #4659
closed
Importing run gives a ClassCastException
Added by Derik Barseghian almost 15 years ago.
Updated almost 15 years ago.
Category:
workflow run manager
Description
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(ObjectManager.java:516)
at org.kepler.objectmanager.ObjectManager.assignIdTo(ObjectManager.java:490)
The could be from my fix to bug #4547
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=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.
MoMLParser.setMoMLFilters(BackwardCompatibility.allFilters());
3) Run through all the Kepler models and update StringParameter
BTW - Is there a test that illustrates this problem?
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
fixed in r22486.
problem was in WorkflowRun convertStringToWorkflowRun -- derivedFrom attribute was being created as a StringAttribute instead of NamedObjIdReferralList
Original Bugzilla ID was 4659
Also available in: Atom
PDF