none
AS2 Status Reporting - Data Retrieve Error RRS feed

  • Question

  • I have setup AS2 Status Reporting successfully and have been receiving messages for a couple of hours. I enabled AS2 status reporting in the AS2 properties of my AS2 party and also enabled all of the store inbound/outbound messages on the Sender and Receiver pages of the AS2 properties.

     

    In the report called "AS2 Message and Correlated MDN Status" I have lots of data showing up so I right-click on one of the results and try to open "View Message Wire Format" or "View Message Decoded Format" and most of the time I get an error. Here is the copied error message:

     

    ===================================

    Invalid attempt to read when no data is present. (System.Data)

    ------------------------------
    Program Location:

       at System.Data.SqlClient.SqlDataReader.GetValue(Int32 i)
       at System.Data.SqlClient.SqlDataReader.get_Item(String name)
       at Microsoft.BizTalk.Administration.StatusReports.MessageContentStorage.LoadMessageContent(Guid contentKey, Stream content, ContentType& messageContentType)
       at Microsoft.BizTalk.Administration.StatusReports.MessageContentStorage.GetMessageContent(String contentKey)
       at Microsoft.BizTalk.Administration.StatusReports.EdiInt.BaseMessageContentViewMenuAction.OnClick(ResultSelection selection, BtsGroupInfo btsGroupInfo)
       at Microsoft.BizTalk.Administration.SnapIn.Forms.GroupHub.Components.ContextMenuActions.ActionMenuItem.PluginContextMenuItem_Click(Object sender, EventArgs e)

    So I used Reflector to look at the assembly Microsoft.BizTalk.Administration.StatusReports as found in the BizTalk program files folder and this stack trace brought me to the stored procedure edi_ReadNrrMessageContentStream in the DTA database.

     

    Could someone tell me if this is a BizTalk bug or if I need to configure BizTalk differently so that the EDI messages can be received and saved correctly?

     

    Thanks,

    Thursday, October 30, 2008 5:25 PM
    Moderator

Answers

  • I was able to resolve the issue simply by configuring the following SQL Agent job: DTA Purge and Archive (BizTalkDTADb).  I usually have the job configured but didn't think it would have anything to do with ensuring the message content would get written to the EdiMessageContent table in the Tracking database.  I just thought the job was for purging and archiving the Tracking database. It is possible I've overlooked something, but configuring and enabling the DTA job appears to be what solved my problem.  Please refer to the code I used (below) to purge (without archiving) the Tracking database.  This is only recommended for non-production environments.

    declare @now datetime
    set @now = getutcdate()
    exec dtasp_PurgeTrackingDatabase 0, 30, 40, @now

    Tuesday, November 9, 2010 3:16 PM

All replies

  • Hi Ben Cline,

     It seems to be a Bug. Does it happen for all incoming messages or happen only for some selected messages?

     

     

    Thanks,

    Bhola

     

    Friday, October 31, 2008 7:45 AM
  • I am getting this for almost every AS2 message. I tried for about 30 minutes yesterday and only got one to open up for wire format. I have access to a production system with this issue if you would like to diagnose it.

     

    Thanks,

     

    Friday, October 31, 2008 2:50 PM
    Moderator
  • Hi Ben,

    Can you provide a little more details about the environment in which are you seeing this?
    We are not able to repro this issue in a clean install. Is this an upgrade from R2? Anything else that might make this different from a clean install?

    We might have to take a look at the machine in case we are not able to diagnose it.

    Thanks,
    Mithun



    Tuesday, November 4, 2008 6:14 PM
  • This is not an upgrade. The environment was BizTalk Server 2006 R2, 32-bit on Windows Server 2003 R2. It was a multi-server install, one server for BizTalk, one for SQL Server. It is deployed in a domain. SQL is 2005. I am pretty sure the issue does not have to do with these details so I will give more on the database and AS2 details.

     

    All of the BizTalk jobs are running successfully. Due to some recent database growth the databases were shrunk using dbcc shrinkdatabase with truncate_only. I am not sure if this is relevant.  

     

    The AS2 use involves GXS as a VAN with approximately 6 trading partners. All of the AS2 status reports are from GXS and for multiple EDI message types including 855 and 997s. The AS2 trading partner is enabbled to respond with an MDN asynchronously using a signed and encrypted MDN. As for the AS2 status reports, all of the status report options are checked. The tracking options do not include tracking message bodies due to an issue Jeff Lynch reported with this (http://www.topxml.com/BizTalk-Server/rn-293465_AS2-Async-MDN-failing.aspx).

     

    Please let me know if you need any other information or need to access the machine.

     

    Thanks,

    Tuesday, November 4, 2008 7:27 PM
    Moderator
  • Hi Ben,

     

    Thanks for clarifying the environment.

     

    The link at topxml.com you provided did not work. I am not aware of any such limitations. Is there an alternate link?

     

    I think access to this machine or back up of BAMPrimaryImport and BizTalkDTADb databases would be very helpful in debugging this issue. Please let me know how I can secure that. Mail to mithun[dot]arora[at]microsoft[dot]com.

     

    Thanks,

    Mithun

     

     

    Monday, November 17, 2008 12:11 PM
  • I will have access to the server where the error is occuring in a few weeks and can get a copy of these backups to you then. I will let you know I have copies ready before sending them. The backups are quite large so I may need to put them on an FTP site for downloading. I will post back here when I have the files.

     

    Thanks,

     

    Monday, November 17, 2008 6:42 PM
    Moderator
  • Thanks! It might also be a good idea to work with the PSS on this issue as well. They may have special insights on this. Also, if you need a fix of this issue, you would need to request for one through them with business justification, etc. Let me know if you need help in understanding the process for that.

    Thanks,
    Mithun
    Wednesday, November 19, 2008 2:28 PM
  • I can open a support request soon for the issue. The issue is not a high priority with the client so I am not that worried about it. I was reporting it because I had not seen anyone else report it on the web. It would be interesting to know the process of business justification for a fix. Feel free to email me outside the forum.

     

    Thanks,

     

     

    Wednesday, November 19, 2008 3:41 PM
    Moderator
  • (I got folks asking me about this issue. Here is something that might help debug the issue.)

     

    We save the message content in the BiztalkDTADb (EdiMessageContent table) with a GUID. In the bam activity corresponding to this message (AS2MessageActivity in BAMPrimaryImport) we save this GUID. The UI looks at the BAM activity. If it sees that a GUID is stored for this message, it exposes “view message” option in the UI. Looks like the guid is getting saved but we are not able to query the message using it.

     

    We need to understand how come the message is not in the DTADb.


    Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, December 4, 2009 9:15 AM
  • Unfortunately, I no longer have access to the server where this was occuring. It was a client that deployed to production, and I support them occasionally.

    I think I remember having tracking enabled but there was not a specific BAM tracking profile deployed for this. The view message option was enabled and so I tried to click on it and got the error.

    If another customer has the problem, I guess try to get a copy of the DTADb.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Friday, December 4, 2009 11:14 PM
    Moderator
  • I currently have a client who is experiencing the problem discussed above.  This is my first EDI project using BizTalk 2009.  I had previously used the EDI functionality with 2006 R2.  I was able to use 2006 R2's EDI Reporting without any issues.  I am confident the EDI Reporting issue(s) I am experiencing is caused by problems in the Tracking database.  I will explore this further.  Please let me know if anyone has already identified a resolution.  Thanks.
    Monday, November 8, 2010 8:03 PM
  • I was able to resolve the issue simply by configuring the following SQL Agent job: DTA Purge and Archive (BizTalkDTADb).  I usually have the job configured but didn't think it would have anything to do with ensuring the message content would get written to the EdiMessageContent table in the Tracking database.  I just thought the job was for purging and archiving the Tracking database. It is possible I've overlooked something, but configuring and enabling the DTA job appears to be what solved my problem.  Please refer to the code I used (below) to purge (without archiving) the Tracking database.  This is only recommended for non-production environments.

    declare @now datetime
    set @now = getutcdate()
    exec dtasp_PurgeTrackingDatabase 0, 30, 40, @now

    Tuesday, November 9, 2010 3:16 PM
  • Hey, glad it is working for you. I am going to mark David's as the answer - it is the only workaround I have heard about.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Tuesday, November 9, 2010 4:13 PM
    Moderator