This discussion is archived
6 Replies Latest reply: Aug 2, 2013 7:36 AM by Trey RSS

6.1.1.1 4,5 should would put a ticket in?

dmccall Newbie
Currently Being Moderated
  1. System.ServiceModel.FaultException`1[[System.ServiceModel.ExceptionDetail, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]: Attached container (and thus state) does not match input parameter

Generated: Mon, 29 Jul 2013 16:07:16 GMT

 
System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Attached container (and thus state) does not match input parameter (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
Xeno.Prodika.Common.AssertionException: Attached container (and thus state) does not match input parameter
   at Xeno.Prodika.Common.Assert.True(Boolean value, String msg)
   at Xeno.Prodika.StructureManagement.ExtendedAttributeSectionStructureHandler.IsChangeAcceptable(Object container, EnumStructureChanges change, IXDataObject parentObject, IXDataObject targetObject, Int32 currentRowSequence)
   at Xeno.Prodika.ExtendedAttributeSections.Service.ExtendedAttributeSectionInstanceService.ValidateAgainstMediator(EnumStructureChanges structureChanges, IXDataObject parentObject, IXDataObject targetObject, Int32 currentRowSequence)
   at Xeno.Prodika.ExtendedAttributeSections.Service.ExtendedAttributeSectionInstanceService.RemoveRow(String instancePKID, String instanceRowPKID)
   at Tyson.Pdm.Extensions.Core.Mapping.Trade.TradeSpecExtensionsService.MapToIExtendedAttributeSectionInstanceDo(IEnumerable`1 customSections, ...).
               

Server Variables

  • 1. Re: 6.1.1.1 4,5 should would put a ticket in?
    Ron M Pro
    Currently Being Moderated

    Is this happening when calling one of your own custom web services?

    If so, then this probably wouldn't be a bug - it is more likely how you are using it. Manipulating Custom Sections is not easy. What specifically are you trying to do?

  • 2. Re: 6.1.1.1 4,5 should would put a ticket in?
    Trey Explorer
    Currently Being Moderated

    Update: We also applied the 3.3.2 EP patch.

    Ron, we got past the the container error by re- initializing the _extendedAttributeSectionInstanceService.

    Now we get this error only on a New Issue _specificationService.CreateNewIssue();. It works fine on Create New.

     

    Here is the Call: highlighted is where we blow up.  Based on the code, there is no possible way we are passing a null into the highlighted method call.

    IExtendedAttributeSectionInstanceService _extendedAttributeSectionInstanceService;

    _extendedAttributeSectionInstanceService = (IExtendedAttributeSectionInstanceService) AppPlatformHelper.ServiceManager[typeof (IExtendedAttributeSectionInstanceService).FullName];

    _extendedAttributeSectionInstanceService.Initialize();

    var query = @"select pkid from COMMONEASECTIONTEMPLATE where ID = '{0}'".F(sectionId);

    using (var dr = ExecuteSql( query ))

    {

    var templatePkid = dr.Read() ? dr[0].ToString() : "";

    }

    if (_extendedAttributeSectionInstanceService.ContainsSectionInstanceByTemplate(templatePkid) == false)

    {

          _extendedAttributeSectionInstanceService.CreateSectionInstance(templatePkid);

    }

     

    Here is the error Stack: Highlighted is the matching method call from above

     

    Xeno.Prodika.Common.AssertionException: Value cannot be null
       at Xeno.Prodika.Common.Assert.NotNull(Object value)
       at Xeno.Prodika.ExtendedAttributeSections.Service.ExtendedAttributeSectionInstanceService.get_TemplatePKIDToSectionInstanceDictionary()
       at Xeno.Prodika.ExtendedAttributeSections.Service.ExtendedAttributeSectionInstanceService.ContainsSectionInstanceByTemplate(String sectionTemplatePKID)
       at Tyson.Pdm.Extensions.Core.Mapping.Trade.TradeSpecExtensionsService.MapToIExtendedAttributeSectionInstanceDo(IEnumerable`1 customSections, Int32[] customSectionIdsToRemoveIfPresentOnCopy, Int32[] customerSectionIdsToMaintainNullForAll) in c:\PDMProjects\Prodika.Extensions\Dev\Trunk\Tyson.Pdm.Extensions.Core\Mapping\Trade\TradeSpecExtensionsService.cs:line 182
       at Tyson.Pdm.Extensions.Core.Mapping.Trade.TradeSpecExtensionsService.MergeWithIGSMTradeSpecDO(TradeSpec tradeSpec, Boolean saveOnly) in c:\PDMPro...).
  • 3. Re: 6.1.1.1 4,5 should would put a ticket in?
    Ron M Pro
    Currently Being Moderated

    Calling Initialize will clear out the Container property, which most of the methods depend on. You can try to set the Container property with the current specification data object after Initialize and see if that addresses this issue.

  • 4. Re: 6.1.1.1 4,5 should would put a ticket in?
    Trey Explorer
    Currently Being Moderated

    How do we do that and why do we have to do that now for a New Issue?

  • 5. Re: 6.1.1.1 4,5 should would put a ticket in?
    Ron M Pro
    Currently Being Moderated

    When you call _extendedAttributeSectionInstanceService.Initialize(), you are clearing out the Container property, which holds the specification object in the service. You are likely calling Initialize so that you can use the new spec data object created by the CreateNewIssue(), so you are clearing out the Container property, but not setting it to the new spec object. You didn't have to do this on Saves of an existing spec, since the service was already initialized and held onto the specification you were saving (so do not call Initialize() if you are not doing a new issue or copy).

     

    The Container property should be set after the Initialize() for new issues, something like the following:

    _extendedAttributeSectionInstanceService.Container = (IExtendedAttributeSectionContainer)_specificationService.Current;


    Give this a try and see if that gets you moving forward.


  • 6. Re: 6.1.1.1 4,5 should would put a ticket in?
    Trey Explorer
    Currently Being Moderated

    Thanks Ron. Our developers figured it out. They implemented what you suggested.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points