Bug #4682

losing reports from KARs

Added by ben leinfelder over 9 years ago. Updated over 9 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


I'm losing reports (still? again? I don't even know anymore). I'm
running r22544, with the modification to that I
e-mailed you about. I opened the tpc09 KAR (r430), and tried to
remove the <> signs (3 actors in the structure/analysis composite
actor). I deleted the <> signs, then changed the display name to put
them back. I then saved the KAR, and lost the report. The first
time, I had tried exporting a run archive (forgot about the <>
problem), then made the <> name changes and tried saving them. I then
restarted Kepler, made the same <> name changes, and then tried saving
them and lost the report a second time. I don't have time today to
try it one more time, and I wouldn't be particularly surprised if it
worked the third or fourth time. However, the console log isn't
helpful. I've attached the log and the bogus KAR. You can check out
the starting KAR, which has the report, from svn.

tpc09-plant-dynamics-woody.kar (57.6 KB) tpc09-plant-dynamics-woody.kar ben leinfelder, 01/20/2010 05:10 PM
tpc09-plant-dynamics-woody.kar (59.5 KB) tpc09-plant-dynamics-woody.kar Oliver Soong, 01/21/2010 06:21 PM


#1 Updated by Oliver Soong over 9 years ago

I lost another report. I started Kepler, loaded a KAR (that I had just been editing before restarting Kepler), added and connected 2 ports inside a composite actor, and tried to save. The console debugging output is below. The first two lines indicate when the KAR was first loaded. The 2 DEBUG and 1 WARN lines mark when I attempted to save. The subsequent INFO statements seem normal and the ERROR statements are normal for this workflow. I have attached the resulting KAR file.

Although this instance of Kepler has a UUID-based AuthNamespace, I don't think that's the problem, as I've been losing reports since before then and have successfully saved reports with this AuthNamespace.

[run] Adding dummy listener...
[run] Added.
[run] DEBUG (org.kepler.kar.handlers.ReportLayoutKAREntryHandler:save:169) save([urn:lsid:uuid:c05e28ec-850c-4b13-a31e-f9d708fd0c02:61:79], urn:lsid:uuid:c05e28ec-850c-4b13-a31e-f9d708fd0c02:87:1)
[run] DEBUG (org.kepler.kar.handlers.ReportLayoutKAREntryHandler:saveReportLayout:255) saveReportLayout(urn:lsid:uuid:c05e28ec-850c-4b13-a31e-f9d708fd0c02:61:79)
[run] WARN (org.kepler.kar.handlers.ReportLayoutKAREntryHandler:saveReportLayout:293) reportLayout is null or blank, not saving an entry to KAR
[run] done writing KAR file to C:\Documents and Settings\soong\Desktop\tpc09-plant-dynamics-woody.kar
[run] INFO (org.kepler.objectmanager.repository.RepositoryManager:&lt;init&gt;:121) adding repos localRepository
[run] INFO (org.kepler.objectmanager.repository.RepositoryManager:&lt;init&gt;:121) adding repos keplerRepository
[run] INFO (org.kepler.objectmanager.repository.RepositoryManager:&lt;init&gt;:121) adding repos keplerDevRepository
[run] INFO (org.kepler.objectmanager.repository.RepositoryManager:&lt;init&gt;:121) adding repos indusRepository
[run] ERROR ( The error in generateDBTable is bad TEXT table source file - line number: 1 java.lang.NumberFormatException: For input string: "25.00" in statement [SET TABLE T1941964836 SOURCE "urn.lsid.localdata.e305afe9.0.0;fs=,"]
[run] ERROR ( The error in generateDBTable is bad TEXT table source file - line number: 1 java.lang.NumberFormatException: For input string: "21 Combretum / Acacia nigrescens Rugged Veld" in statement [SET TABLE T1940172571 SOURCE "urn.lsid.localdata.5c61651b.0.0;fs=#x09;ignore_first=true"]
[run] ERROR ( The error in generateDBTable is bad TEXT table source file - line number: 155 java.lang.NumberFormatException: For input string: ">" in statement [SET TABLE T1940175454 SOURCE "urn.lsid.localdata.9464d179.0.0;fs=,"]
[run] Adding dummy listener...
[run] Added.

#2 Updated by Oliver Soong over 9 years ago

I'm finally able to reproduce the bug. It requires a KAR file with a report that has a local LSID (i.e., the workflow LSID's namespace is the same as your Kepler namespace) but also has a derivedFrom entry.

From a fresh Kepler, open the workflow and make a change. Saving the KAR should lose the report. Close and re-open the workflow and make the same change. Saving the KAR should now work.

The bug has two parts. When derivedFrom exists and a change is made to the workflow, WorkflowManager.changeExecuted swaps the valid report in the workflow with an invalid blank report generated for the first entry in the derivedFrom list. Secondly, changeExecuted is not being called for all changes. The first time the KAR is opened, it seems to be called and loses the report. The second time the KAR is opened, it is not called and the report remains linked.

#3 Updated by ben leinfelder over 9 years ago

I'm not seeing it called for any workflow that i open via a KAR.
It is called when I open a MOML xml file.

Something is not quite right with the NamedObj.addChangeListener(listener) that they never seem to hear or be broadcast to.

#4 Updated by Oliver Soong over 9 years ago

Technically, I think the bug is fixed as of r22615. However, the fix only addresses the swapping reports half of the problem. Issues with changeExecuted only being called the first time exist. I think this is caused by problems in having to do with addNamedObj, _namedObjs, Vector.contains and Object.equals.

#5 Updated by ben leinfelder over 9 years ago

i'm testing a Map-based ObjectManager implementation so that we don't end up with different namedObjs with the same LSID in the manager at the same time.
It looks promising, but I'm still seeing a lack of changeExecuted calls after I save a workflow as a kar (and it is opened/reopened during the same Kepler session).
Also: I can loose a report this way since the LSID changes aren't always being heard. The ReportLayoutKAREntry handler does a decent job going back 1 LSID in the derivedFrom list to get the layout, but if the LSID is changed more than once, then you are out of luck.

The best solution will be to figure out why the changeListener is not being alerted.

#6 Updated by ben leinfelder over 9 years ago

when I reopen the saved KAR I see that the model (TypedCompositeActor) NamedObj that issues the updateRevision() is actually different than the NamedObj that I added a listener to. So it's clear why the changeExecuted() call is never being caught...but does not explain the discrepancy between the object manager's model and the frame's model.

#7 Updated by ben leinfelder over 9 years ago

needed to ensure we were listening to all revisions of the named object.
reopen if the problem persists

#8 Updated by Redmine Admin about 6 years ago

Original Bugzilla ID was 4682

Also available in: Atom PDF