BizTalk WCF-SAP Adapter error: Loading property information list by namespace failed or property not found in the list. Verify that the schema is deployed properly.

BizTalk WCF-SAP Adapter error: Loading property information list by namespace failed or property not found in the list. Verify that the schema is deployed properly.

A client reported to me an error that we were getting in our BizTalk Server production environment this week. We had deployed a new orchestration and a new SAP receive port to handle a new partner, something we had done several times with success, but this time, we were getting the following warning each time we sent a message from SAP to BizTalk Server:

The adapter “WCF-Custom” raised an error message. Details “System.Exception: Loading property information list by namespace failed or property not found in the list. Verify that the schema is deployed properly.

   at Microsoft.BizTalk.Adapter.Wcf.Runtime.BizTalkAsyncResult.End()
at Microsoft.BizTalk.Adapter.Wcf.Runtime.BizTalkServiceInstance.EndOperation(IAsyncResult result)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.BizTalkServiceInstance.Microsoft.BizTalk.Adapter.Wcf.Runtime.ITwoWayAsyncVoid.EndTwoWayMethod(IAsyncResult result)
at AsyncInvokeEndEndTwoWayMethod(Object , Object[] , IAsyncResult )
at System.ServiceModel.Dispatcher.AsyncMethodInvoker.InvokeEnd(Object instance, Object[]& outputs, IAsyncResult result)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeEnd(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage7(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)”.

First, it was strange to be logged as a warning since the BizTalk Server did not receive or process the message.

Also, the message can be misleading because the “error” message says Verify that the schema is deployed properly. These types of errors typically indicate that the schema or specific schema versions are not deployed in the environment, although when that happens, the error message clearly specifies the schema name and version, which is not the case in this error message.

Cause

Official documentation states that the following exception is encountered while receiving an IDOC with the EnableBizTalkCompatibilityMode binding property set to true. And if the binding property EnableBizTalkCompatibilityMode is set to true, you must add the BizTalk property schema DLL for the SAP adapter as a resource in your BizTalk application, that is, the application in which your project is deployed.

However, our receive location didn’t have the EnableBizTalkCompatibilityMode set to true. Instead, it was set to false.

With a lack of better ideas, we decided to try to apply the same solution and add the BizTalk property schema DLL for the SAP adapter as a resource in your BizTalk application, and it solved all of our problems,

Solution

So, to solve this issue, we need to add BizTalk property schema DLL for the SAP adapter called Microsoft.Adapters.SAP.BiztalkPropertySchema.dll as a resource in our BizTalk application. This DLL can be found Microsoft BizTalk Adapter Pack folder that normally is under:

  • : Program FilesMicrosoft BizTalk Adapter Packbin

or in BizTalk Server 2020 under:

  • :Program Files (x86)Microsoft BizTalk Server

You must perform the following tasks to add this assembly as a resource in your BizTalk application:

  • Start the BizTalk Server Administration console.
  • In the console tree, expand BizTalk Group, expand Applications, and then the application to which you want to add a BizTalk assembly.
  • Expand Applications and the application to which you want to add a BizTalk assembly.
  • Right-click Resources, point to Add, and then click BizTalk Assemblies.
  • Click Add, navigate to the folder containing the BizTalk assembly file, select the BizTalk assembly file, and then click Open.
  • In Options, specify the options for installing the BizTalk assembly to the GAC, and then click OK.

Hope you find this helpful! So, if you liked the content or found it useful and want to help me write more, you can buy (or help me buy) my son a Star Wars Lego! 

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc.

He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.
View all posts by Sandro Pereira

BizTalk WCF-SAP Adapter: Could not load file or assembly ‘Microsoft.Adapters.SAP.SAPGInvoker.dll’ or one of its dependencies

BizTalk WCF-SAP Adapter: Could not load file or assembly ‘Microsoft.Adapters.SAP.SAPGInvoker.dll’ or one of its dependencies

Last week I was adding new processes to an existing and old project for a client, a project that I started a few years ago, and I was caught by surprise with the following error while trying to generate a new SAP schema from Visual Studio:

Error occurred while browsing the LOB system. Adapter Message: Could not load file or assembly ‘Microsoft.Adapters.SAP.SAPGInvoker.dll’ or one of its dependencies. The specified module could not be found.

At first sight, the cause for the error is simple, and I will explain above the main causes, but in my case, the problem was that I had all the pre-requirements for the WCF-SAP adapter to work, and again that was an existing project where I had already generated several SAP Schemas.

Cause

Normally the main reason for this error is that the pre-requirements to run the WCF-SAP adapter are not installed in the environment. Even if you see the WCF-SAP adapter present and configured in the BizTalk Server Administration console, it doesn’t mean that it is ready to work. This adapter requires you to install the following SAP resources to run the adapter in the BizTalk Server box:

  • NCo3018_Net40_x64.msi
  • NCo3018_Net40_x86.msi

You can download these resources from the SAP Service Marketplace.

It is required (mandatory) to install the x86 version of the SAP Connector for Microsoft .NET. However, if you want to run the adapter under a 64-bit Host Instance, you need to install both the x86 and x64 versions of the SAP Connector for Microsoft .NET (recommended).

But once again, I knew that I had all these resources installed, and I doubled check that they were installed.

In my case, for some unknown reason, some of these DLLs got corrupted, and for that reason, I was getting this error.

Solution

To fix this issue, the solution is quite simple:

  • Reinstall the x86 and x64 versions of the SAP Connector for Microsoft .NET.
    • NCo3018_Net40_x64.msi
    • NCo3018_Net40_x86.msi
  • When asked, repair the installation of the components.

After that, I was once again able to generate SAP Schemas from my BizTalk Server Visual Studio project.

This applies to:

  • BizTalk Server 2020
  • BizTalk Server 2016
BizTalk Server 2020: Step-by-Step WCF-SAP Adapter installation guide

BizTalk Server 2020: Step-by-Step WCF-SAP Adapter installation guide

There was a lot of inconsistent and incorrect information about the BizTalk WCF-SAP Adapter installation process and how it works, especially in old versions of the adapter where there was a need to use the classic RFC library to connect to SAP.

Fortunately for us, this process is now simpler and more direct, and this is due specifically to two points:

  • The Classic RFC Library has been discontinued and is no longer supported (support ended on March 21, 2016). All customers should, if not already using, the “new” SAP .NET Connector (NCo) 

Notice that the BizTalk Adapter Pack WCF-SAP adapter has been re-engineered to use SAP .NET Connector instead of the classic SAP RFC SDK. The SAP .NET Connector is available through the ConnectorType property within the WCF-SAP binding. This feature is available from BizTalk Server 2013 and above.

  • On BizTalk Server 2020, the Microsoft BizTalk Adapter Pack x86 and x64 are now installed with the default installation process. That means that the WCF-SAP adapter is already registered on the server and present on the BizTalk Server Administration Console.

However, that does not mean that everything is ready for you to be able to use this adapter. Unfortunately, you still need to install the SAP Connector for Microsoft .NET available for you to download through the SAP Service Marketplace.

Notice that, like any other adapter, the 64-bit version of the SAP Connector for Microsoft .NET is optional, but if you have a 64-bit BizTalk environment and you want to run it under a 64-bit Host Instance, then you need to also install both versions of the SAP Connector for Microsoft .NET.

BizTalk Server 2020: Step-by-Step WCF-SAP Adapter installation guide

By reading this whitepaper, decision-makers should have more information on the following areas:

  • Pre-requirements resources that are necessary and how to install them
  • Register the adapter in BizTalk Server Administration Console

Where can I download it?

You can download the whitepaper here:

WCF-SAP Adapter error:  The parameter Program Id required for SAP Inbound Handler was not specified

WCF-SAP Adapter error: The parameter Program Id required for SAP Inbound Handler was not specified

Recently while I was testing an integration solution on a client that uses a WCF-SAP adapter to receive an IDOC from the SAP system I got the following error:

The Messaging Engine failed to add a receive location “IN_IDOC_SAP” with URL “sap://CLIENT=003;LANG=EN;@a/ip-addres/00?ListenerGwHost=ip-address&ListenerGwServ=sapgw00&ListenerProgramId=name” to the adapter “WCF-SAP”. Reason: “Microsoft.ServiceModel.Channels.Common.ConnectionException: The parameter Program Id required for SAP Inbound Handler was not specified.

I knew I had this error in the past. Still, I couldn’t remember the reason immediately ? – this is one of the main reasons I often blog about the errors I face and solutions I found, my blog serves as my notes, and I’m one of the primary consumers of my blog.

Cause

Of course, and as always, there may be several reasons to face this problem, but in my case, the reason was quite simple.

If you pay attention to the URI on the error message and that highlight below:

  • sap://CLIENT=003;LANG=EN;@a/ip-addres/00?ListenerGwHost=ip-address&ListenerGwServ=sapgw00&ListenerProgramId=name

You will see that we are using the ampersand as an HTML entity (&) and we cannot in this case we need to use only the character &.

Solution

To solve this issue, you need to fix the URI to use the character &, instead of the HTML entity (&):

  • sap://CLIENT=003;LANG=EN;@a/ip-addres/00?ListenerGwHost=ip-address&ListenerGwServ=sapgw00&ListenerProgramId=name

The post WCF-SAP Adapter error: The parameter Program Id required for SAP Inbound Handler was not specified appeared first on SANDRO PEREIRA BIZTALK BLOG.