You are viewing limited content. For full access, please sign in.

Question

Question

There was an error decompressing the briefcase. The briefcase file may be corrupt, the disk may be out of space, or another I/O error occurred. [9265]

SDK
asked on June 6, 2024

Hello all

I am using SDK to create a briefcase

  BriefcaseExporter bExp = new BriefcaseExporter(branchSession);
 bExp.AddEntry(currentEntry);

 bExp.BeginExport(brifcaseFullPath, importstatus, true);
 while (true)
 {
     int percent = bExp.GetPercentComplete();
     if (percent == 100)
     {
         break;
     }
 }

and got error for some of one 

 

------------ Technical Details: ------------

LFCommonDialogs110.dll (11.0.2102.83):
    Call Stack: (Current)
        CBriefcaseImporter::ImportBriefcase
        CImport::ImportBriefcase
    Call History:
          GetDatabaseDisplayName
          ChangeNumberHelper::GetObjectW
          ChangeNumberHelper::CacheObject
          WriteOptionString ([Settings]BriefcaseVolume)
           SetProfileValue
            AddProfile
             UpdateProfile
         CBriefcaseImporter::ImportBriefcase

 

0 0

Replies

replied on June 6, 2024

BeginExport starts an asynchronous export job. Since you are only looping until it completes, you might as well use the synchronous Export function instead. I'm guessing that the export isn't fully done when it reports 100%, and so you are losing some bytes off the end. Correct usage of the .Net BeginX/EndX pattern involves passing the IAsyncResult returned by the first function into the second.

2 0
replied on June 9, 2024 Show version history

Hello, I guess this is the exact reason ,

so, I changed my code as below 

 but not working never to get true always false

var result= bExp.BeginExport(brifcaseFullPath,null,null); 
if(result.CompletedSynchronously)
{
....
}

but the below is working good 

var result= bExp.BeginExport(brifcaseFullPath,null,null);                
                   
 while (true)
 {

 if (result.IsCompleted)
 {
     break;
 }

}

what do you think?

0 0
replied on June 10, 2024

CompletedSynchronously is not in general a useful thing to check if what you care about is if the work is complete or not. Especially in this case where you have called a method that explicitly performs the work asynchronously. The second example is better, but it is missing something crucial. It's still not following the .Net pattern - if you call BeginXXX you must finish by calling EndXXX. In this case, by not calling EndExport you are not informed of any errors. IsCompleted will be true if the export completed successfully or unsuccessfully. But all of this is more complicated than it needs to be. Using BeginExport/EndExport is useful if you want to show a progress bar or do other work on the current thread. Your code examples don't do that, and would be a lot simpler and more correct if they just called Export().

1 0
replied on June 6, 2024

What version of RepositoryAccess and DocumentServices DLLs are you using?

Do any Briefcases exported with your code import or do they all fail?

How does the size of the Briefcase compare if you export the same content through the client?

0 0
replied on June 6, 2024

RepositoryAccess: 10.4.0.0

Interop.LFSO104Lib: 10.4.0.0

No, most of all exported working fine , that's i wonder sometimes get one has error .

- Different in Size: by code: 4336 KB and by client: 4845

 

 

0 0
replied on June 6, 2024

Since you are already using LFSO104Lib, you may try using DocumentProcessor104 to export to briefcase.

In the past, I had a similar issue creating Briefcases with RepositoryAccess 9.2.0 and had to switch to LFSO to reliably export to Briefcase.

        // Create BriefcaseExporter object
        LFBriefcaseExporter exporter = LFDB.GetBriefcaseExporter();
        // Add the Entry
        exporter.AddEntry(LFDB.GetEntryByID(iEntryID));
        // Export
        exporter.Export(System.IO.Path.Combine(sWinPath, sEntryName + ".lfb"));
        // Clean up
        exporter.Close();
        exporter.Dispose();

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.