000017597 - Error occurs when generating an RSA Archer Package: Package export failed. Please review the error log

Document created by RSA Customer Support Employee on Jun 14, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 5Show Document
  • View in full screen mode

Article Content

Article Number000017597
Applies ToRSA Product Set: Archer
RSA Version/Condition: 5.4, 5.5
IssueWhile trying to generate a Package, it fails with the error: Package <package name> export failed. Please review the error log.  Other packages work fine in the environment.
Log snippet:
<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
    <ApplicationData>
        <TraceData>
            <DataItem>
                <TraceRecord Severity="Error" xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord">
                    <TraceIdentifier>Archer.Packaging</TraceIdentifier>
                    <UserId>183</UserId>
                    <Description>Unable to cast object of type 'ArcherTech.Common.Domain.SearchStatisticReport' to type 'ArcherTech.Common.Domain.SearchReport'.</Description>
                   
<AppDomain>ArcherTech.JobFramework.Job.exe</AppDomain>
                    <Exception>
                        <ExceptionType>System.InvalidCastException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
                        <Message>Unable to cast object of type 'ArcherTech.Common.Domain.SearchStatisticReport' to type 'ArcherTech.Common.Domain.SearchReport'.</Message>
                       
<Source>ArcherTech.Kernel</Source>
                        <StackTrace>
   at ArcherTech.Kernel.DataSource.Db.SearchReportDataSource.Get(Int32 reportId, SearchReportBase&amp; reportBase, Nullable`1&amp; filterId)
   at ArcherTech.Kernel.Brokers.SearchReportBroker.GetSearchReport(Int32 reportId, SearchReportBase&amp; searchReportBase, Nullable`1&amp; filterId)
   at ArcherTech.Kernel.Brokers.SearchReportBroker.Get(Int32 reportId, Boolean checkPermissioning)
   at ArcherTech.Kernel.Managers.SearchReportManager.Get(SessionContext sessionContext, Int32 reportId)
   at ArcherTech.Packaging.Actions.Generation.GeneratePackage.&lt;&gt;c__DisplayClass132.&lt;GenerateReports&gt;b__12d(GenerateContext context, ExecuteActions`1 ignored)
   at ArcherTech.Packaging.Actions.ActionExecutor`1.ActionExecutorLoop(IEnumerable`1 actions)
   at ArcherTech.Packaging.Actions.Generation.GeneratePackage.&lt;&gt;c__DisplayClassa.&lt;GetGenerateActions&gt;b__1(GenerateContext executeContext, ExecuteActions`1 executor)</StackTrace>
                    </Exception>
                </TraceRecord>
            </DataItem>
        </TraceData>
    </ApplicationData>
</E2ETraceEvent>

 
CauseThis error typically happens due to a broken Report in one of the applications that you are packaging. You need to identify the broken report and delete the report using the following script.
Resolution
  1. Perform a SQL Backup of the Instance database.
  2. Identify the broken report
    SELECT  rbt.report_base_id parentReportID
          , rbt.report_name parentReportName
          , rbt2.report_base_id childReportID
          , rbt2.report_name ChildStatsReportName
          , rt.report_type_desc ReportType
          , u.user_display_name CreatedBy
    FROM    dbo.tblReportBase rb
    JOIN    dbo.tblReportBaseTranslation rbt ON rbt.report_base_id = rb.report_base_id
    JOIN    dbo.tblReportBase rb2 ON rb.drill_in_report_base_id = rb2.report_base_id
    JOIN    dbo.tblReportBaseTranslation rbt2 ON rbt2.report_base_id = rb2.report_base_id
    JOIN    dbo.tblReportType rt ON rt.report_type_id = rb.report_type_id
    JOIN    dbo.tblUser u ON u.user_id = rb.create_login
    WHERE   rb.drill_in_report_base_id IS NOT NULL
            AND rb2.drill_in_report_base_id IS NOT NULL;

  3. If Report can't be deleted in the Web UI, delete the report using the following script replacing the 0 in the first statement with the parentReportID from the query above..
    DECLARE @reportID INT = 0;
    DECLARE @reportBaseXML XML;
    DECLARE @userToken NVARCHAR(128);
    SET @reportBaseXML = '<ROOT><V a="' + CAST(@reportID AS VARCHAR(20)) + '"/></ROOT>';
    SELECT TOP ( 1 )
    @userToken = s.sessionId
    FROM dbo.tblSession s;
    BEGIN TRAN;
    BEGIN TRY
    EXEC dbo.usp_delete_report_base @userToken =@userToken , @reportBaseXML = @reportBaseXML;
    END TRY
    BEGIN CATCH
    ROLLBACK;
    SELECT 'Delete Failed';
    RETURN;
    END CATCH;

    SELECT 'Delete Successful'
    COMMIT;

  4. After the Report is deleted, try to generate the package. The package generation should work fine now.
Legacy Article IDa66091

Attachments

    Outcomes