Skip to main content

Hello, recently we upgraded from 2020 R2 Build 20.208.0031 to 2022 R1 Build 22.109.0023, so in this process we had some custom tables with fields without USR prefix, so we created new fields with USR prefix and published the package, we are able to successfully overcome that issue, we actually followed this link https://www.sprinterra.com/blog/users-fields-in-acumatica-erp-blog-sprinterra/. Now when we are  trying to create snapshot we are getting “An error occurred while importing data into the 'AuditHistory' table.” error.

Please have a look at below trace.
 

Error:    An error occurred while importing data into the 'AuditHistory' table.     Send
Raised At: 10/1/2022 2:02:14 AM    Screen: SM.20.35.20        
 Details:
10/1/2022 2:02:14 AM Error:
An error occurred while importing data into the 'AuditHistory' table.

System.IO.IOException: Stream was too long.
   at System.IO.MemoryStream.Write(ByteI] buffer, Int32 offset, Int32 count)
   at System.IO.BufferedStream.Flush()
   at PX.DbServices.Points.FileSystem.Adb.AdbWriter.Dispose()
   at PX.DbServices.Points.ZipArchive.ZipTableAdapter.WriteRows(IEnumerable`1 rows, Boolean exclusivelly, Action`1 transferObserver)
   at PX.BulkInsert.Provider.TransferTableTask.Executor.Start(DataTransferObserver observer)
   at PX.BulkInsert.Provider.BatchTransferExecutorSync.RunSingleTask(TransferTableTask task)
PX.Data.PXException: An error occurred while importing data into the 'AuditHistory' table. ---> System.IO.IOException: Stream was too long.
   at System.IO.MemoryStream.Write(Byte] buffer, Int32 offset, Int32 count)
   at System.IO.BufferedStream.Flush()
   at PX.DbServices.Points.FileSystem.Adb.AdbWriter.Dispose()
   at PX.DbServices.Points.ZipArchive.ZipTableAdapter.WriteRows(IEnumerable`1 rows, Boolean exclusivelly, Action`1 transferObserver)
   at PX.BulkInsert.Provider.TransferTableTask.Executor.Start(DataTransferObserver observer)
   at PX.BulkInsert.Provider.BatchTransferExecutorSync.RunSingleTask(TransferTableTask task)
   --- End of inner exception stack trace ---
   at PX.Data.Update.DtObserver.AskHowToRecoverFromError(Exception ex)
   at PX.BulkInsert.Provider.BatchTransferExecutorSync.RunSingleTask(TransferTableTask task)
   at PX.BulkInsert.Provider.BatchTransferExecutorSync.fetchAndRunNextTask()
   at PX.BulkInsert.Provider.BatchTransferExecutorSync.StartSync()
   at PX.Data.Update.DtObserver.AskHowToRecoverFromError(Exception ex)
   at PX.BulkInsert.Provider.BatchTransferExecutorSync.StartSync()
   at PX.Data.Update.PXSnapshotCreator.WriteToArchive(PointDbmsBase point, ZipArchiveWrapper zip, FileFormat readFormats, FileFormat writeFormat)
   at PX.Data.Update.PXSnapshotCreator.PrepareSnapshot(FileFormat ff)
   at PX.Data.Update.PXSnapshotCreator.Start(FileFormat format0)
   at PX.SM.CompanyMaint.<>c__DisplayClass66_0.b__0()
   at PX.Data.PXLongOperation.<>c__DisplayClass18_0.b__0()

 

 

Hey @ckwiat46 ,

We’re having the exact same issue (Stream too long) when attempting to prepare snapshots for export. If you’ve managed to solve this one since, would you please share your solution?


We have not figured out what to do here yet. Hoping someone in the Acumatica community can help us out here. 


What I can point out is, it is possible to specify certain tables to be excluded from the snapshot, e.g. have a look at how the Full except Attachments and Wiki strategy excludes those tables. 
 

 

The configuration for these options can be found at {path to instance}\App_Data\SnapshotConfigs. Each Export mode has a corresponding file. 

This is however not a proper solution to us, since there might be tables which is too large in themselves, which then causes this error. 

And agree, I’m hoping we can find a workaround from the community soon.


What I can point out is, it is possible to specify certain tables to be excluded from the snapshot, e.g. have a look at how the Full except Attachments and Wiki strategy excludes those tables. 
 

 

The configuration for these options can be found at {path to instance}\App_Data\SnapshotConfigs. Each Export mode has a corresponding file. 

This is however not a proper solution to us, since there might be tables which is too large in themselves, which then causes this error. 

And agree, I’m hoping we can find a workaround from the community soon.

@ckwiat46- As @chris49  Indicated please prepare a snapshot with our attachment and wiki,

 

I have tried this option to export snapshots. or Open a case with Acumatica

Thanks

 


Reply