Folder not found in library index
I wasn't able to get any assistance with this on IRC, and this has occurred multiple times. I haven't yet been able to reliably replicate this, but all I've been doing is creating reports, saving them into a local repository, and opening them back up again. It may have to do with overwriting an existing KAR file, as that's what I was doing here. After these errors, attempting to open the KAR (by navigating through the local repository folder tree and right clicking on the KAR entry) causes an Open Archive dialog to pop up, rather than opening the KAR.
The behavior is able to survive an ant clean-kar and the deletion of the configuration folder, InstanceAuthNamespace, and LastObjectID. A clean-all seems to be able to fix it, though. If it occurs again, I'll try a clean-cache.
This was on the console:
done writing KAR file to C:\Documents and Settings\soong\Desktop\kruger\workflows\tpc01-buffalo-tb\tpc01-buffalo-tb.kar
ERROR (org.kepler.objectmanager.library.LibraryManager:addKAR:878) Folder not found in library index: C:\Documents and Settings\soong\Desktop\kruger\workflows\tpc01-buffalo-tb
java.lang.Exception: Folder not found in library index: C:\Documents and Settings\soong\Desktop\kruger\workflows\tpc01-buffalo-tb
ERROR (org.kepler.kar.handlers.ActorMetadataKAREntryHandler:open:235) error opening the workflow: null
#1 Updated by Oliver Soong over 9 years ago
I've confirmed that this occurs when you try to save over the archive that is currently opened. Create a KAR archive and open it. Make some changes and Save Archive again to the same file. Now restart Kepler and attempt to re-open the archive by right-clicking in the components tree.
Also, ant clean-cache will fix the problem, but some sort of save vs. save as facility needs to be sorted out.
#2 Updated by Oliver Soong over 9 years ago
I should add that I've only been able to reliably observe this with a specific Kruger TPC workflow (I haven't really tried other workflows) and only using the SVN checkout as the Kepler local repository. This is complicated by bugs 4521 (http://bugzilla.ecoinformatics.org/show_bug.cgi?id=4521) and 4527 (http://bugzilla.ecoinformatics.org/show_bug.cgi?id=4527).
The procedure is as follows (note I run ant from kepler\build-area):
1. SVN checkout the workflows folder from https://code.ecoinformatics.org/code/kruger/trunk/workflows. I usually put it into a folder called kruger.
2. Copy kruger\tpc01-buffalo-tb\InstanceAuthNamespace into the kepler folder and clean-cache.
3. Add the kruger folder to the components sources list. I usually set it as the default save repository and turn off saving to any remote repository as well. This will trigger a large number of data errors, which can be ignored.
4. From the components tree, open kruger\tpc01-buffalo-tb\tpc01-buffalo-tb.kar.
5. File->Save Archive (KAR) to the same location, no semantic type. The folder not found in library error should show up on the console, as well as more data errors. In the components tree, kruger\tpc01-buffalo-tb should now be empty.
6. Restart Kepler and attempt to open the KAR by right-clicking in the components tree. An Open Archive dialog should appear.
This error seems to only work consistently with this particular setup. Other combinations of folders, sub-folders, and local repositories don't seem to trigger the error. I'm not exactly sure why.