Home dynamics ax, others, ssrs, windows server [ax2012] compiling layer conflict -> aos crash!
dynamics axothersssrswindows server

[ax2012] compiling layer conflict -> aos crash!

It was a sunny day, no user aware that day would be the hardest day as an ax administrator, it was a crash day for AOS (application object server)

We were uploading a custom class modification (RPTRFP_DP class) using a CUS layer, while we’re import it, there was a layer conflict (USR vs CUS), we tried to remove the USR layer and reuploaded the CUS layer

problem was, the real class (USR layer version) did not exactly removed, and after we reuploaded the CUS layer, it shows an error, layer conflict, and the class was already exists

and the troubles begin, the SSRS shows an error

after that, all uses shows another errors

so I decided to restart the AOS, but the problem was not solved

while I restarted the AOS, it shows another error messages

Object Server 01:  System.OperationCanceledException: AIF service group not activated.  Service group: UserSessionService.  Error: Duplicate type with name 'Dynamics.Ax.Application.RptRFP_DP' in assembly 'Dynamics.Ax.Application, Version=6.3.5000.138, Culture=neutral, PublicKeyToken=null'. ---> System.BadImageFormatException: Duplicate type with name 'Dynamics.Ax.Application.RptRFP_DP' in assembly 'Dynamics.Ax.Application, Version=6.3.5000.138, Culture=neutral, PublicKeyToken=null'.
   at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
   at System.Signature..ctor(IRuntimeFieldInfo fieldHandle, RuntimeType declaringType)
   at System.Reflection.RtFieldInfo.get_FieldType()
   at System.ServiceModel.Description.TypeLoader.CreateTypedMessageDescription(Type typedMessageType, ICustomAttributeProvider returnAttrProvider, XmlName returnValueName, String defaultNS, String action, MessageDirection direction)
   at System.ServiceModel.Description.TypeLoader.CreateMessageDescription(MethodInfo methodInfo, Boolean isAsync, Boolean isTask, Type taskTResult, XmlName returnValueName, String defaultNS, String action, XmlName wrapperName, String wrapperNamespace, MessageDirection direction)
   at System.ServiceModel.Description.TypeLoader.CreateOperationDescription(ContractDescription contractDescription, MethodInfo methodInfo, MessageDirection direction, ContractReflectionInfo reflectionInfo, ContractDescription declaringContract)
   at System.ServiceModel.Description.TypeLoader.CreateOperationDescriptions(ContractDescription contractDescription, ContractReflectionInfo reflectionInfo, Type contractToGetMethodsFrom, ContractDescription declaringContract, MessageDirection direction)
   at System.ServiceModel.Description.TypeLoader.CreateContractDescription(ServiceContractAttribute contractAttr, Type contractType, Type serviceType, ContractReflectionInfo& reflectionInfo, Object serviceImplementation)
   at System.ServiceModel.Description.TypeLoader.LoadContractDescriptionHelper(Type contractType, Type serviceType, Object serviceImplementation)
   at System.ServiceModel.Description.ContractDescription.GetContract(Type contractType, Type serviceType)
   at System.ServiceModel.ServiceHost.CreateDescription(IDictionary`2& implementedContracts)
   at System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses)
   at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses)
   at Microsoft.Dynamics.Ax.Services.AifHelper.PublishServices(String serviceGroupName)
   --- End of inner exception stack trace ---
   at Microsoft.Dynamics.Ax.Services.AifHelper.PublishServices(String serviceGroupName)
   at Microsoft.Dynamics.Ax.Services.AifHelper.PublishAllServiceGroups(Dictionary`2 faultedServices)

the error will cause all the SSRS failed to communicate to AOS server

after I looking for this evidence, I found that, compiling in conflicting layer will cause an exception in compiled apps.

how to solve it:

  • make sure that all user are log off and quit from the application
  • restart the aos
  • find the rptrfp_dp class (in this case, this class that causes the havoc)
  • delete the rptrfp_dp class
  • generate full CIL
  • wait for 30-60 minutes for generate full CIL (remember, to make sure that all user are already quit from ax client)
  • restart the AOS
  • go to system administrator -> setup -> services and application integration framework -> inbound ports,  check that if BIServices is activate or not
  • restart the SSRS Server if the BIServices is not active, and restart the AOS
  • re upload the rpfRFP_DP class, recompile it, and generate full CIL (again, yes again)

 

that’s it

 

 

 

Author

Ronny

Leave a Reply