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 on Mar 28, 2019
Version 6Show Document
  • View in full screen mode

Article Content

Article Number000017597
Applies ToRSA Product Set: Archer
RSA Version/Condition: All
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">
                <TraceRecord Severity="Error" xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord">
                    <Description>Unable to cast object of type 'ArcherTech.Common.Domain.SearchStatisticReport' to type 'ArcherTech.Common.Domain.SearchReport'.</Description>
                        <ExceptionType>System.InvalidCastException, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
                        <Message>Unable to cast object of type 'ArcherTech.Common.Domain.SearchStatisticReport' to type 'ArcherTech.Common.Domain.SearchReport'.</Message>
   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>

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.
  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;


    EXEC dbo.usp_delete_report_base @userToken =@userToken , @reportBaseXML = @reportBaseXML;


    SELECT 'Delete Failed';

    SELECT 'Delete Successful'

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