Quantcast
Channel: Errors and Warnings Causes and Solutions – SANDRO PEREIRA BIZTALK BLOG
Viewing all 95 articles
Browse latest View live

Backup BizTalk Server job failed: The job failed. The Job was invoked by Schedule 9 (MarkAndBackupLogSched). The last step to run was step 2 (BackupFull).

$
0
0

After writing my last post I remembered that in the past I got a related error to this problem but with a different cause and solution. So I decided to emulate the error in my lab environment and make a second part of this topic.

I remember that on occasion, in order to be faster, I copied all the job configuration text from of my blog and pasted in the BackupFull step job window. However when I try to run I got a similar error:

SQL Server Scheduled Job ‘Backup BizTalk Server (BizTalkMgmtDb)’ (0x4020953E49DEFA43B8FEC18D6AD9B062) – Status: Failed – Invoked on: 2013-11-11 17:45:00 – Message: The job failed. The Job was invoked by Schedule 9 (MarkAndBackupLogSched). The last step to run was step 2 (BackupFull).

Backup-BizTalk-Server-job-error-message-MarkAndBackupLogSched

Again the error message doesn’t help us much, so what you should do is go to the Backup BizTalk Server job history:

  • Right click in “Backup BizTalk Server (BizTalkMgmtDb)” job and select “View History” option

And try so see if you can obtain more information about the error.

Unlike the event viewer and the error that I put in the previous post, in this case the log history show as much more information:

Date 11/11/2013 17:45:00
Log Job History (Backup BizTalk Server (BizTalkMgmtDb))
Step ID 2
Job Name Backup BizTalk Server (BizTalkMgmtDb)
Step Name BackupFull
Message
Executed as user: NT SERVICE\SQLSERVERAGENT. Incorrect syntax near ‘´’. [SQLSTATE 42000] (Error 102) Unclosed quotation mark after the character string ‘ /* location of backup files */ ‘. [SQLSTATE 42000] (Error 105). The step failed.

Backup-BizTalk-Server-job-error-history-Unclosed-quotation-mark

CAUSE

The copy of the text from my blog brought a wrong ASCII format transforming the single quotation mark character in an accent (´).

All the parameter of the sp_BackupAllFull_Schedule must be placed between single quotation marks:

  • Frequency: 'd', 'w' and so on
  • Name: 'BTS'
  • Location of backup files: 'c:\backups'

SOLUTION

Fix the job to ensure that all the parameters of the sp_BackupAllFull_Schedule is between single quotation marks.



Backup BizTalk Server job failed: The job failed. The Job was invoked by User domain\user. The last step to run was step 3 (MarkAndBackupLog). The job was requested to start at step 1 (Set Compression Option).

$
0
0

Now I’m playing a little with this topic hehehe… but be with me, this have a final goal that I will reveal soon (probably two weeks from now since next week I will be away in the MVP Summit and BizTalk Summit in Seattle). Until then let’s try to find some of the “basic” possible errors that you can find in the Backup BizTalk Server job.

In my previous posts (here and here), I have explained two possible errors that you can find when trying to run this job, today we will talk about this one:

SQL Server Scheduled Job ‘Backup BizTalk Server (BizTalkMgmtDb)’ (0x4020953E49DEFA43B8FEC18D6AD9B062) – Status: Failed – Invoked on: 2013-11-12 08:50:46 – Message: The job failed. The Job was invoked by User BTS2013LAB01\Administrator. The last step to run was step 3 (MarkAndBackupLog). The job was requested to start at step 1 (Set Compression Option).

 

 

Backup-BizTalk-Server-job-warning-message-MarkAndBackupLog

Although the execution of job ‘Backup BizTalk Server (BizTalkMgmtDb)’ failed, no error is register in the event viewer only the warning showed above. This probably happens because the main task of this job: “BackupFull” responsible for performing a full database backups of the BizTalk Server databases, is properly executed. You can validate this in the tables “adm_BackupSettings” and “adm_BackupHistory”, or on the file system where the backup files are saved.

However, and as the message states, the job was not entirely performed and there is a problem in the third task: MarkAndBackupLog. Again the error message doesn’t help us much, so what you should do is go to the Backup BizTalk Server job history to try so see if you can obtain more information’s. In this case the log history show as much more information:

Log Job History (Backup BizTalk Server (BizTalkMgmtDb))
Step ID 3
Job Name Backup BizTalk Server (BizTalkMgmtDb)
Step Name MarkAndBackupLog
Sql Severity 15
Sql Message ID 105
Message
Executed as user: NT SERVICE\SQLSERVERAGENT. Incorrect syntax near ‘´’. [SQLSTATE 42000] (Error 102) Unclosed quotation mark after the character string ‘ /* location of backup files */ ‘. [SQLSTATE 42000] (Error 105). The step failed.

Backup-BizTalk-Server-job-error-history-MarkAndBackupLog

 

CAUSE

The MarkAndBackupLog step is responsible for marking the logs for backup, and then backing them up. This step execute the “sp_MarkAll” stored procedure that accepts two mandatory parameters:

  • @MarkName: Log mark name is part of the naming convention for backup files
  • @BackupPath:. You must change the destination path this to a valid one. It may be local or a UNC path to another server

And one optional parameter:

  • @UseLocalTime: This is an extra parameter that you can also add that tells the procedure to use local time

The mandatory parameters (MarkName and BackupPath) must be placed between single quotation marks:

  • MarkName: 'BTS', 'BTS2013LAB01' and so on
  • BackupPath: 'c:\backups'

The problem here is that for some reason I’m not using a single quotation mark:

exec [dbo].[sp_MarkAll] ‘BTS’ /* Log mark name */, C ….’ …

SOLUTION

Fix the job to ensure that all the parameters of the sp_MarkAll is between single quotation marks.

 

Another error that you can find in the Job history is:

Log Job History (Backup BizTalk Server (BizTalkMgmtDb))
Step ID 3
Job Name Backup BizTalk Server (BizTalkMgmtDb)
Step Name MarkAndBackupLog
Sql Severity 16
Sql Message ID 3013
Message
Executed as user: NT SERVICE\SQLSERVERAGENT. Cannot open backup device ‘K:\Backups\BizTalk Database\Logs\BTS2013LAB01_BAMAlertsApplication_Log_BTS_2013_11_12_17_51_07_990.bak’. Operating system error 3(The system cannot find the path specified.). [SQLSTATE 42000] (Error 3201) BACKUP LOG is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.

In this case you also get one or several errors in the Event Viewer:

BackupDiskFile::CreateMedia: Backup device ‘K:\Backups\BizTalk Database\Logs\BTS2013LAB01_BAMAlertsApplication_Log_BTS_2013_11_12_17_51_07_990.bak’ failed to create. Operating system error 3(The system cannot find the path specified.).

Backup-BizTalk-Server-job-error-message-MarkAndBackupLog

CAUSE

If you check the parameters of the “sp_MarkAll” stored procedure you will see that the second parameter is the location of backup files and this location must exist in the file system.

SOLUTION

You must remember that you need to ensure that all the paths specified in the BizTalk jobs must exist in the file system. In my case, we create the folder on the file system and run the job again with success.


BAM Portal configuration error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (Configuration)

$
0
0

Last week while making a simple BizTalk Server 2013 multi-computer environment (1 SQL Server and 1 BizTalk Server both running Windows Server 2012) configuration I faced several issues to properly configure BAM Portal, this was the first one.

I was able to properly configure all the features: Enterprise SSO, Group, BizTalk Runtime, Business Rules Engine, BizTalk EDI/AS2 Runtime and even BAM Tools without any kind of problem, however every time I tried to configure BAM Portal I was getting the following error:

BAM Portal: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (Configuration)

Unexpected-exception-occurred-while-configuring-BAM-Portal

When checking the BizTalk Server Configuration log file, we were able to see something like the following message:

[datetime … Error Configuration Framework] Feature: [BAM Portal] Failed to configure with error message [<Exception Message="Unexpected exception occurred while configuring [BAM Portal].” Source=”" HelpID=”"><Exception Message=”Attempted to read or write protected memory. This is often an indication that other memory is corrupt.” Source=”Configuration” HelpID=”" /></Exception>]

However this is the generic message and doesn’t give us the real cause and doesn’t help us tracking the problem.

Suggestion: When this appends, don’t get stuck in that line, you should continue to read the log file because you will find useful and valid information’s!

In this case the real problem was:

[datetime … Error ConfigHelper] Cannot alter the role ‘NSSubscriberAdmin’, because it does not exist or you do not have permission.

CAUSE

The BizTalk Server Configuration Tool is trying to add the “BAM Management Web Service user” that was specify in the BAM Portal section into a database role called “NSSubscriberAdmin”, which doesn’t exist in the BAM Alert Application Database (BAMAlertsApplication) and for that reason it raises this exception.

SOLUTION

There are some known issue in the BizTalk Server 2013 release that was fixed in the Cumulative Update 1 specially this one regarding BAM Tools: KB article 2832137 – FIX: BAM tools cannot be configured in a multi-node BizTalk Server 2013 environment. I know is not exactly the same error, nevertheless , I advise that before you try to configure BizTalk Server 2013 you should apply the CU’s available.

However in my case to solve the problem you must manually add “NSSubscriberAdmin” Database Role to BAM Alert Application Database (BAMAlertsApplication) by:

  • Expand a server group, and then expand a server.
  • Expand “Databases”, and then expand the BAMAlertsApplication database
  • Expand “Roles”. Right-click over “Roles” and select “New Database Role” option.

Add-SQL-NSSubscriberAdmin-Database-Role

  • In the Name box, enter the following name: “NSSubscriberAdmin”.
  • Click “OK”.

Alternative you can use the following SQL Query:

USE BAMAlertsApplication
CREATE ROLE NSSubscriberAdmin AUTHORIZATION dbo
GO

Fortunately I was able to find this problem in the BizTalk Server: List of Errors and Warnings, Causes, and Solutions TechNet Wiki article which led me to René Brauwers solution.


Microsoft.BizTalk.Bam.Management.BamManagerException: Encountered error while executing command on SQL Server "servername". —> System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object ‘bam_Metadata_GetProperty’, database ‘BAMPrimaryImport’, schema ‘dbo’

$
0
0

Last week while making a simple BizTalk Server 2013 multi-computer environment (1 SQL Server and 1 BizTalk Server both running Windows Server 2012) configuration I faced several issues to properly configure BAM Portal, this was the first one was described in my previous blog post. This is the second one:

By solving the problem described in my previous post I was able to properly configure all the features in BizTalk Server: Enterprise SSO, Group, BizTalk Runtime, Business Rules Engine, BizTalk EDI/AS2 Runtime, BAM Tools and BAM Portal without any more problems, however we notice that the BAMAlerts service was logging several errors in the Event Viewer and was constantly stopping.

BAMAlerts-Service-stopped

When we check the Event Viewer we were able to see the following messages:

Encountered error while executing command on SQL Server “server name”.
Event ID 0

Of course this was the generic message and doesn’t give us the real cause and doesn’t help us tracking the problem but we were able to get more details in the rest of the logs registered in the Event Viewer:

at Microsoft.BizTalk.Bam.AlertHost.Utility.GetProperty(String dbServer, String dbName, String propertyName, String scope)
at Microsoft.BizTalk.Bam.AlertHost.AlertHost.GetBAMMetadataProperties()
at Microsoft.BizTalk.Bam.AlertHost.AlertHost.Run()

Unhandled exception caught. Stoppping the service.

And finally:

Microsoft.BizTalk.Bam.Management.BamManagerException: Encountered error while executing command on SQL Server “servername”. —> System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object ‘bam_Metadata_GetProperty’, database ‘BAMPrimaryImport’, schema ‘dbo’.

at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteScalar()
at Microsoft.BizTalk.Bam.Management.SqlHelper.ExecuteScalar(String cmdText, CommandType cmdType)

When looking at the “bam_Metadata_GetProperty” stored procedure in the database “BAMPrimaryImport” database, we found that no role were defined:

bam_Metadata_GetProperty-stored-procedure-permissions

CAUSE

These problems occurs because the BizTalk Server Configuration Tool didn’t properly configure the right permissions in this stored procedure.

As I described in my previous post, there are some known issue in the BizTalk Server 2013 release that was fixed in the Cumulative Update 1 specially this one regarding BAM Tools: KB article 2832137 – FIX: BAM tools cannot be configured in a multi-node BizTalk Server 2013 environment. I know is not exactly the same error, nevertheless, I think these problems are related to this configuration issue. So again I advise that before you try to configure BizTalk Server 2013 you should apply the CU’s available.

SOLUTION

Again I advise that before you try to configure BizTalk Server 2013 you should apply the CU’s available.

However in my case to solve the problem I had to manually configure the correct permissions on this stored procedure, luckily I have other environments where I can check to see the correct permissions, so to solve this you need to:

  • Expand a server group, and then expand a server.
  • Expand “Databases”, expand the BAMPrimaryImport database, and then expand “Programmability”.
  • Expand “Stored Procedures”, right-click in the “bam_Metadata_GetProperty” procedure to grant permissions on, and then select “Properties” option.
  • From Stored Procedure Properties, select the “Permissions” page.
  • And to grant permissions to a user, database role, or application role you must click “Search” button.
    • In this case we need to give execution privileges to the database role “BAM_ManagementNSReader”

bam_Metadata_GetProperty-stored-procedure-right-permissions

  • Click “OK”.

Alternative you can use the following SQL Query:

USE BAMPrimaryImport
GRANT EXECUTE ON OBJECT::bam_Metadata_GetProperty
    TO BAM_ManagementNSReader;
GO

Unable to create binding configuration element for editing. Check the values of the bindyingType and BindingConfiguration properties.

$
0
0

I have a BizTalk Server 2010 Test Environment that was working properly for some time, all the adapters from BizTalk Server Adapter Pack 2010 were installed with the last cumulative updates and also working properly, in this environment we use the SQL Server Adapter.

However the last time the team try to configure the receive location present in the application they unexpected got the following error:

“Unable to create binding configuration element for editing. Check the values of the bindyingType and BindingConfiguration properties. (Microsoft.BizTalk.Adapter.Wcf.Converters.CreateBindingException) Unable to get binding type for binding extension “sqlBinding”. Verify the binding extension is registered in the machine.config.”

WCF-Custom-Transport-Properties-Error

Also every time they try to enable the Receive Location they automatically become disabled again. When I checked the Event Viewer I also found this two errors:

“The Messaging Engine failed to add a receive location “WcfReceiveLocation_SqlAdapterBinding_TypedPolling ” with URL “mssql://SERVER:PORT/INSTANCE/DB?InboundId=id” to the adapter “WCF-Custom”. Reason: “Microsoft.BizTalk.Adapter.Wcf.Converters.CreateBindingException: Unable to get binding type for binding extension “sqlBinding”. Verify the binding extension is registered in machine.config.”

“The receive location “WcfReceiveLocation_SqlAdapterBinding_TypedPolling ” with URL ” mssql://SERVER:PORT/INSTANCE/DB?InboundId=id ” is shutting down. Details:”The Messaging Engine failed while notifying an adapter of its configuration. “.”

 

WCF-Custom-Ports-disabled

Suspecting the problem but curious to understand the problem I try to create a new Receive Location and I found out that the SQL binding was not present:

WCF-Custom-Transport-Properties-list-bindings-without-sql

CAUSE

The SQL Database adapter (also the Oracle Adapter or the Oracle E-Business Suite) is a WCF custom binding, which is registered under System.ServiceModel in the machine.config file.

Important note: A 64-bit platform has two machine.config files, one used by the 32-bit applications and the other used by the 64-bit applications. Actually they have several machine.config for different .NET Frameworks, however in this case we are talking about the last .NET Framework v4.0.30319 normally present in BizTalk Server 2010 environment which you can find in the following folders:

  • 32-bits: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config
  • 64-bits: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config

When you install the 64-bit version of the BizTalk Adapter Pack, the setup wizard registers the bindings in the 64-bit version of the machine.config file. However, BizTalk Server Administration console runs as a 32-bit process and hence when you configure a port for the adapter, it checks for the bindings in the 32-bit version of the machine.config file and fails giving an error. This is also the reason why you should always installed 32 and 64 bits version of the adapters.

However in my particular case that wasn’t the problem because I had both version of the adapter installed and they were working properly. So in my case the problem started to happen because one of the members installed a new .NET Framework version (4.5.2) in the BizTalk Server machines and then uninstalled. After this all the adapters present in the BizTalk Adapter Pack stopped to work.

SOLUTION

It depends on the configuration of your environment.

Solution 1:

If 32-bit versions of the BizTalk Adapter Pack are note installed in your machine you should:

  • Install both the 32-bit and 64-bit versions of the BizTalk Adapter Pack on a 64-bit WCF LOB Adapter SDK installation.
    • Note: You must only have a 64-bit WCF LOB Adapter SDK installation. Side-by-side installation of 32-bit and 64-bit WCF LOB Adapter SDK on a single computer is not supported.

Solution 2

Otherwise you should check in the machine.config if the custom binding extension are configured properly in both 32 and 64-bit files.

To check or register the adapter bindings or the .NET Framework Data Providers:

  • Navigate to the machine.config file on the computer.
  • Open the file using a text editor or using the SvcConfigEditor.exe util to edit the config file. It is easy to add the binding extensions in this utility otherwise with a common text editor like notepad is very easy to make errors while editing the config file.
  • Check if there are present the adapter bindings otherwise you should register them:
    • Search for the element “<client>” under “<system.serviceModel>”:

machine-config-system-serviceModel-client

      • If not present add the following line under it:
<client>
   <endpoint binding="sapBinding" contract="IMetadataExchange" name="sap" />
   <endpoint binding="siebelBinding" contract="IMetadataExchange" name="siebel" />
   <endpoint binding="oracleDBBinding" contract="IMetadataExchange" name="oracleDb" />
   <endpoint binding="oracleEBSBinding" contract="IMetadataExchange" name="oracleEBS" />
   <endpoint binding="sqlBinding" contract="IMetadataExchange" name="mssql" />
</client>
    • Search for the element “<bindingElementExtensions>” under “<system.serviceModel><extensions>”

machine-config-system-serviceModel-extensions

      • Look for the missing adapter binding and if they are not present add the following lines under the “<bindingElementExtensions>” node:
<add name="sqlAdapter" type="Microsoft.Adapters.Sql.SqlAdapterBindingElementExtensionElement, Microsoft.Adapters.Sql, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="sapAdapter" type="Microsoft.Adapters.SAP.SAPAdapterExtensionElement, Microsoft.Adapters.SAP, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="oracleDBAdapter" type="Microsoft.Adapters.OracleDB.OracleDBAdapterExtensionElement, Microsoft.Adapters.OracleDB, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="oracleEBSAdapter" type="Microsoft.Adapters.OracleEBS.OracleEBSBindingElementExtensionElement, Microsoft.Adapters.OracleEBS, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="siebelAdapter" type="Microsoft.Adapters.Siebel.SiebelAdapterExtensionElement,Microsoft.Adapters.Siebel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
  • To check and register the .NET Framework Data Providers:
    • Search for the element “<DbProviderFactories>” under the “<system.data>” node.
    • Look for the missing .NET Framework Data Providers. Add the following sections under the “<DbProviderFactories>” node, depending on the missing provider. You must register all the providers if the setup wizard fails to register any.
<add name="SAPClient Data Provider" invariant="Microsoft.Data.SAPClient" description=".NET Framework Data Provider for mySAP Business Suite" type="Microsoft.Data.SAPClient.SAPClientFactory,Microsoft.Data.SAPClient, Version=<version>, Culture=neutral, PublicKeyToken=<public key>" />
<add name="SiebelClient Data Provider" invariant="Microsoft.Data.SiebelClient" description=".NET Framework Data Provider for Siebel eBusiness Applications" type="Microsoft.Data.SiebelClient.SiebelProviderFactory,Microsoft.Data.SiebelClient, Version=<version>, Culture=neutral, PublicKeyToken=<public key>" />
  • Save and close the machine.config file.

After I edit and fixed the machine.config file the WCF-SQL adapter started to work again.

WCF-Custom-Transport-Properties-list-bindings

WCF-Custom-Ports-enabled


BizTalk Could not load file or assembly ‘Oracle.DataAccess, Version=2.111.7.0, Culture=neutral, PublicKeyToken=89b483f429c47342′ or one of its dependencies. The system cannot find the file specified.

$
0
0

Recently I work in a project when I need to communicate with Oracle database in which I encountered some platform configuration problems. In general, communicate with Oracle is very simple and somewhat similar to SQL Server.

In development phase I didn’t have any problem, but notice that before you start developing you need to make sure that you have BizTalk Adapter Pack installed and Oracle client (or at least Oracle Data Access Components (ODAC) – 32 and 64 bits) installed to use BizTalk Adapter for Oracle in your BizTalk environment.

The BizTalk Adapter Pack consists of the following adapters:

  • Microsoft BizTalk Adapter for Oracle Database (Oracle Database adapter).
  • Microsoft BizTalk Adapter for Oracle E-Business Suite (Oracle E-Business adapter).
  • Microsoft BizTalk Adapter for mySAP Business Suite (SAP adapter). This also includes the .NET Framework Data Provider for mySAP Business Suite (Data Provider for SAP).
  • Microsoft BizTalk Adapter for Siebel eBusiness Applications (Siebel adapter). This also includes the .NET Framework Data Provider for Siebel eBusiness Applications (Data Provider for Siebel).
  • Microsoft BizTalk Adapter for SQL Server (SQL adapter).

And you can found more information how to install it here: BizTalk 2013 Installation and Configuration – Installing BizTalk Adapter Pack (Part 12)

The Microsoft BizTalk Adapter for Oracle Database is a Windows Communication Foundation (WCF) custom binding. This binding contains a single custom transport binding element that enables communication with an Oracle database.

The following figure shows part of “BizTalk Oracle Adapter Architecture”:

BizTalk-Oracle-Adapter-Architecture

According to BizTalk official documentation, the support version of Oracle are:

  • Oracle database version 11.1,
  • Oracle database version 10.2,
  • Oracle database version 10.1,
  • Oracle database version 9.2

And supported client versions:

  • Oracle Data Access Components for Oracle Client 11.1.0.6 with Patch Set 11.1.0.7,
  • Oracle Data Access Components for Oracle Client 11.1.0.7

You can read more on how to install Oracle client here:

As I said earlier, I didn’t had any problem in development phase however in runtime I catch the following error:

The adapter failed to transmit message going to send port “SEND_Oracle” with URL “oracledb://connection”. It will be retransmitted after the retry interval specified for this Send Port. Details:”System.IO.FileNotFoundException: Could not load file or assembly ‘Oracle.DataAccess, Version=2.112.1.2, Culture=neutral, PublicKeyToken=89b483f429c47342′ or one of its dependencies. The system cannot find the file specified.

File name: ‘Oracle.DataAccess, Version=2.112.1.2, Culture=neutral, PublicKeyToken=89b483f429c47342′ —> System.IO.FileNotFoundException: Could not load file or assembly ‘Oracle.DataAccess, Version=2.111.7.0, Culture=neutral, PublicKeyToken=89b483f429c47342′ or one of its dependencies. The system cannot find the file specified.
File name: ‘Oracle.DataAccess, Version=2.111.7.0, Culture=neutral, PublicKeyToken=89b483f429c47342′
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.

So I tried to check in the GAC if the correct assemblies were there and I realized that the client add installed a different version of the Oracle Client: Oracle 11g R2.

BizTalk-Oracle-Client-GAC-dll

CAUSE

When installing the Oracle WCF Adapter for BizTalk there is a design time requirement to use Oracle.DataAccess Version 2.111.7.0.

Official the Oracle 11g R2 is not supported and again according to official documentation I should use one of the supported clients. However my client only had access to this version and did not want to use another. Although not officially supported you can connect to Oracle 11g R2 database and use Oracle 11g R2 client with minor configuration adjustments.

SOLUTION

One possible solution to fix this problem is configuring Assembly Binding Redirection in the machine configuration file (Machine.config):

  • 32-bit: c:\Windows\Microsoft.NET\Framework\[version]\config\machine.config
  • 64-bit: c:\Windows\Microsoft.NET\Framework64\[version]\config\machine.config

Note: You should apply this in both 32 and 64-bit machine configuration files.

By using the <assemblyBinding> Element for <runtime> that will contain all the information about assembly version redirection and the locations of assemblies.

In this case you should apply the following configurations:

<runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
        <assemblyIdentity name="Oracle.DataAccess"
          publicKeyToken="89b483f429c47342" />
 
        <bindingRedirect oldVersion="2.111.7.0" newVersion="2.112.1.2" />
      </dependentAssembly>
       </assemblyBinding>
</runtime>

Just to be sure, I add this configuration in both 32 and 64-bit in .NET Framework 2.0 and 4.0 machine configuration files.


Visual Studio fail to imported project while migrating BizTalk Project: Unable to read the project file. The project file could not be loaded. Root element is missing

$
0
0

In the last few weeks I have been doing BizTalk project migrations successfully from BizTalk Server 2006 and Visual Studio 2005 to recent version: BizTalk Server 2010/VS 2010 or BizTalk Server 2013/VS2012. In most of the scenario this is a simple task and regarding to Visual Studio we basically just need to open the “old” solution with the “new” Visual Studio and it will try to convert the solution using the Visual Studio Conversion Wizard tool, check more details in one of my previous post: BizTalk 2010 – Migrate an old BizTalk Visual Studio solution to Visual Studio 2010.

Of course this part is just the Visual Studio project migration, and in some cases we need to make adjustments to our solution.

However recently I face a strange problem when I was trying to convert the Visual Studio solution, every time I tried it gave me the following error:

“Unable to read the project file “…\MyProject.btproj.user”. The project file could not be loaded. Root element is missing.”

The-imported-project-file-could-not-be-loaded-Root-element-is-missing

CAUSE

“*.btproj.user” file. This is a XML file that contains not only the BizTalk deployment Settings but also several personal user settings like References path, test file names and so on.

I’m not sure what did happen with this file while copying the project to the new server, or during it’s time life in the former development server. However when I check the file system for this file I noticed that the file was empty:

MyProject-btproj-user-file

SOLUTION

To solve this problem you just need to delete this User configuration file (*.btproj.user) from the file system and try to import de project or convert the solution again.

BizTalk-Solution-imported-successfully


BAM Portal configuration error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (Configuration)

$
0
0

Last week while making a simple BizTalk Server 2013 multi-computer environment (1 SQL Server and 1 BizTalk Server both running Windows Server 2012) configuration I faced several issues to properly configure BAM Portal, this was the first one.

I was able to properly configure all the features: Enterprise SSO, Group, BizTalk Runtime, Business Rules Engine, BizTalk EDI/AS2 Runtime and even BAM Tools without any kind of problem, however every time I tried to configure BAM Portal I was getting the following error:

BAM Portal: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (Configuration)

Unexpected-exception-occurred-while-configuring-BAM-Portal

When checking the BizTalk Server Configuration log file, we were able to see something like the following message:

[datetime … Error Configuration Framework] Feature: [BAM Portal] Failed to configure with error message [<Exception Message=”Unexpected exception occurred while configuring [BAM Portal].” Source=”” HelpID=””><Exception Message=”Attempted to read or write protected memory. This is often an indication that other memory is corrupt.” Source=”Configuration” HelpID=”” /></Exception>]

However this is the generic message and doesn’t give us the real cause and doesn’t help us tracking the problem.

Suggestion: When this appends, don’t get stuck in that line, you should continue to read the log file because you will find useful and valid information’s!

In this case the real problem was:

[datetime … Error ConfigHelper] Cannot alter the role ‘NSSubscriberAdmin’, because it does not exist or you do not have permission.

CAUSE

The BizTalk Server Configuration Tool is trying to add the “BAM Management Web Service user” that was specify in the BAM Portal section into a database role called “NSSubscriberAdmin”, which doesn’t exist in the BAM Alert Application Database (BAMAlertsApplication) and for that reason it raises this exception.

SOLUTION

There are some known issue in the BizTalk Server 2013 release that was fixed in the Cumulative Update 1 specially this one regarding BAM Tools: KB article 2832137 – FIX: BAM tools cannot be configured in a multi-node BizTalk Server 2013 environment. I know is not exactly the same error, nevertheless , I advise that before you try to configure BizTalk Server 2013 you should apply the CU’s available.

However in my case to solve the problem you must manually add “NSSubscriberAdmin” Database Role to BAM Alert Application Database (BAMAlertsApplication) by:

  • Expand a server group, and then expand a server.
  • Expand “Databases”, and then expand the BAMAlertsApplication database
  • Expand “Roles”. Right-click over “Roles” and select “New Database Role” option.

Add-SQL-NSSubscriberAdmin-Database-Role

  • In the Name box, enter the following name: “NSSubscriberAdmin”.
  • Click “OK”.

Alternative you can use the following SQL Query:

USE BAMAlertsApplication
CREATE ROLE NSSubscriberAdmin AUTHORIZATION dbo
GO

Fortunately I was able to find this problem in the BizTalk Server: List of Errors and Warnings, Causes, and Solutions TechNet Wiki article which led me to René Brauwers solution.



Microsoft.BizTalk.Bam.Management.BamManagerException: Encountered error while executing command on SQL Server "servername". —> System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object ‘bam_Metadata_GetProperty’, database ‘BAMPrimaryImport’, schema ‘dbo’

$
0
0

Last week while making a simple BizTalk Server 2013 multi-computer environment (1 SQL Server and 1 BizTalk Server both running Windows Server 2012) configuration I faced several issues to properly configure BAM Portal, this was the first one was described in my previous blog post. This is the second one:

By solving the problem described in my previous post I was able to properly configure all the features in BizTalk Server: Enterprise SSO, Group, BizTalk Runtime, Business Rules Engine, BizTalk EDI/AS2 Runtime, BAM Tools and BAM Portal without any more problems, however we notice that the BAMAlerts service was logging several errors in the Event Viewer and was constantly stopping.

BAMAlerts-Service-stopped

When we check the Event Viewer we were able to see the following messages:

Encountered error while executing command on SQL Server “server name”.
Event ID 0

Of course this was the generic message and doesn’t give us the real cause and doesn’t help us tracking the problem but we were able to get more details in the rest of the logs registered in the Event Viewer:

at Microsoft.BizTalk.Bam.AlertHost.Utility.GetProperty(String dbServer, String dbName, String propertyName, String scope)
at Microsoft.BizTalk.Bam.AlertHost.AlertHost.GetBAMMetadataProperties()
at Microsoft.BizTalk.Bam.AlertHost.AlertHost.Run()

Unhandled exception caught. Stoppping the service.

And finally:

Microsoft.BizTalk.Bam.Management.BamManagerException: Encountered error while executing command on SQL Server “servername”. —> System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object ‘bam_Metadata_GetProperty’, database ‘BAMPrimaryImport’, schema ‘dbo’.

at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteScalar()
at Microsoft.BizTalk.Bam.Management.SqlHelper.ExecuteScalar(String cmdText, CommandType cmdType)

When looking at the “bam_Metadata_GetProperty” stored procedure in the database “BAMPrimaryImport” database, we found that no role were defined:

bam_Metadata_GetProperty-stored-procedure-permissions

CAUSE

These problems occurs because the BizTalk Server Configuration Tool didn’t properly configure the right permissions in this stored procedure.

As I described in my previous post, there are some known issue in the BizTalk Server 2013 release that was fixed in the Cumulative Update 1 specially this one regarding BAM Tools: KB article 2832137 – FIX: BAM tools cannot be configured in a multi-node BizTalk Server 2013 environment. I know is not exactly the same error, nevertheless, I think these problems are related to this configuration issue. So again I advise that before you try to configure BizTalk Server 2013 you should apply the CU’s available.

SOLUTION

Again I advise that before you try to configure BizTalk Server 2013 you should apply the CU’s available.

However in my case to solve the problem I had to manually configure the correct permissions on this stored procedure, luckily I have other environments where I can check to see the correct permissions, so to solve this you need to:

  • Expand a server group, and then expand a server.
  • Expand “Databases”, expand the BAMPrimaryImport database, and then expand “Programmability”.
  • Expand “Stored Procedures”, right-click in the “bam_Metadata_GetProperty” procedure to grant permissions on, and then select “Properties” option.
  • From Stored Procedure Properties, select the “Permissions” page.
  • And to grant permissions to a user, database role, or application role you must click “Search” button.
    • In this case we need to give execution privileges to the database role “BAM_ManagementNSReader”

bam_Metadata_GetProperty-stored-procedure-right-permissions

  • Click “OK”.

Alternative you can use the following SQL Query:

USE BAMPrimaryImport
GRANT EXECUTE ON OBJECT::bam_Metadata_GetProperty
    TO BAM_ManagementNSReader;
GO

Where are my functoids in the grip page? The giant Adamastor… I reached and went over the end of the world

$
0
0

I’m not much of a historian and I don’t read too many history books but from what I can remember from my school days… (please be open mind and do not think I’m completely crazy…the story will have a context and meaning at the end)

The Story

A few hundred years ago many cultures around the world still believe that the planet Earth was flat disk or a square, rather than a sphere, at the edge there were infinite length cliffs straight down into the darkest depths.

Myths of the age of discovery, where the Portuguese ships, then Spanish, were the first to set sail to discover a world, leaving the coastal waters of the Old World and embarked on their adventure on the vast "green sea of darkness said that Europe sat in the middle of the circle, with the other continents scattered about the fringes, and parts of Africa hanging over the edge and the oceans lapped against the sides of the Earth, and in places ran over, creating currents that would pull over the edge ships that ventured too far out to sea.

End-of-the-world-sailor

Luís de Camões, considered the Portuguese language’s greatest poet, has created a mythical figure: the giant Adamastor (Northwind), as a symbol of the forces of nature Portuguese navigators had to overcome during their discoveries and more specifically of the dangers Portuguese sailors faced when trying to round the Cape of Storms, in Africa and supposedly one of the edge of the earth. A giant creature that appears to them, walking in the depth of the sea; his head reaches to the clouds; the storms, the winds, the thunders, and the lightning’s hang about him; his arms are extended over the waves.

The-Giant-Adamastor

It seems once again that a Portuguese sailor (me) found the giant Adamastor… this time inside BizTalk Mapper Editor! Tormenting me and not letting me go further and my FunctoIds vanished into the hell darkest depths.

PROBLEM (the story meaning and context)

Over the last weeks I’ve been busy performing BizTalk projects migrations from BizTalk Server 2006 R2 to 2013 R2 and, unintentionally, it seems that I can pick up and detect all the “bugs”, problems or limitations that you might imagine… or not, this is one of the case. The problem that I faced today it is the most crazy behavior that I found in the BizTalk Mapper Editor, and made me remember this story and that I reached and went over to the edge of “flat Earth”, in this case to the end of the grid page world!

In a global picture: migrating a map is straightforward and quite simple operation, there is no rock science behind it! Most of the times you don’t need to touch them, they are compatible.

However it was a big surprise to me, when I was in the process of optimizing one of the maps, I found out in one of the grid pages that I could not reach, and even see, some of the FunctoIds present, although I was able to see their existence through the links in the grid page

BizTalk-Mapper-grid-overview.bottom

I know what you may think… zoom out the grid and/or collapse the tree view… nothing!

BizTalk-Mapper-grid-overview.bottom-zoom-out

Ok… check the “Grid preview”… still nothing!

BizTalk-Mapper-grid-overview.bottom-grid-preview

Believe me I try everything that I could remember including restart Visual Studio and so on…

So, just to be sure that I wasn’t insane, I went to Visual Studio 2005 to open the BizTalk Server 2006 R2 version of the project, to check what was in that particular part of the grid page and voilà… I found 6 FunctoIds that were making conditional transformations

BizTalk-Mapper-2006-grid-overview-bottom

CAUSE - So, where are my FunctoIds in the grip page?

Before I explain the problem and the solution (or workaround) I like to say that this is not a runtime bug, which means, if I had deploy this map to my BizTalk environment everything would work fine. Instead this is a “bug”/”limitation” of the BizTalk Server SDK, that will turn your life into hell, it will drive you crazy, if you’d like to change that part of the map.

What I found out is that the configurations of working area (space) of the grid page, at least since BizTalk Server 2013, have changed. Now the working are of the grid page is in a square format and previous it has in a rectangle format, as you can see below:

BizTalk-Mapper-grid-page-workplace

Despite this change, I never thought that this would affect the development and maintenance of my maps… but it affects!

SOLUTION (workaround)

When I check the old version of the project inside Visual Studio 2005, I realize that the FunctoIds that I was trying to reach were at the bottom right corner at the very end of the working area of the grid page, with a large space gap for the remaining FunctoIds present in the middle of the grid page working area

BizTalk-Mapper-2006-grid-overview-right-bottom

To solved this problem I dragged the FunctoIds from the bottom right corner into the middle of the grid page working area, narrowing down the space gap between them, but most important, placing all the FunctoIds near the center of grid page working area:

BizTalk-Mapper-2006-grid-overview-middle

Then you just need to save this version of the map (Visual Studio 2005), take the “.btm” file and you only need to overlay this map to the existing one in your Visual Studio 2013/BizTalk Server 2013 R2 solution.

BizTalk-Mapper-2013-R2-Visual_Studio-2103-grid-overview

Finally my FunctoIds are visible! And once again the giant Adamastor was defeated.


BizTalk Mapper tips and tricks: How to solve prefix problems (Exception Caught: ‘ns1′ is an undeclared prefix) in inline XSLT scripts

$
0
0

Back again to one of my favorites topics: transformations. This is something that several people asked me for help in the past but I never found time to reply… until now.

A quite note: if you want to know more about BizTalk Maps transformation check out my free book available at BizTalk360 website: BizTalk Mapping Patterns & Best Practices

While migrating an older BizTalk Map transformation, from a custom schema to a SAP IDOC schema, from an entire custom XSLT file to BizTalk Mapper (don’t get me wrong, I only made this migration because the source schema changed so I had the need to change the entire XSLT code, otherwise I would have used the existing external file), I had the need to implement some part of the transformation in an Inline XSLT code (using a Scripting Functoid) and I only used inline XSLT because I was transforming a flat structure from the source schema to a recursive node in the target schema base on some conditions (otherwise I would have used the Table Lopping Functoid)

BizTalk-Mapper-inline-scriptin-functoid-with-prefix

<ns1:E2EDKA1003>
  <ns1:DATAHEADERCOLUMN_SEGNAM>E2EDKA1003</ns1:DATAHEADERCOLUMN_SEGNAM>
  <ns1:PARVW>LF</ns1:PARVW>
  <ns1:PARTN>0000100000</ns1:PARTN>
</ns1:E2EDKA1003>

<ns1:E2EDKA1003>
  <ns1:DATAHEADERCOLUMN_SEGNAM>E2EDKA1003</ns1:DATAHEADERCOLUMN_SEGNAM>
  <ns1:PARVW>ZC</ns1:PARVW>
  <ns1:PARTN>
    <xsl:choose>
      <xsl:when test="@Transportation='1'">
        <xsl:value-of select="'0000100001'" />
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="'0000100009'" />
      </xsl:otherwise>
    </xsl:choose>
  </ns1:PARTN>
</ns1:E2EDKA1003>

Note that I’m using the prefix “ns1” on the element because the schemas is expecting that, and it should work because both the schema and the transformation file (XSL) contains the namespace

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:msxsl="urn:schemas-microsoft-com:xslt"
     …
     xmlns:s1="http://unicer.pt/OrderUnigest01.xsd"
     xmlns:ns1="http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/3/ORDERS01//700"
     xmlns:userCSharp="http://schemas.microsoft.com/BizTalk/2003/userCSharp">

BizTalk-Mapper-xslt-prefix-namespace

You can validate that by:

However, when you either compile the map or validate it, we get the following error message:

Validate the map or compile it, I get the following error:

Exception Caught: ‘ns1′ is an undeclared prefix. Line …, position …

 

CAUSE

Well unfortunately BizTalk Mapper Editor doesn’t like prefixes in inline XSLT code, although they exist he is not able to understand them without additional information in the code, which makes our work a little more difficult or we need to use a different strategy in our XSLT code.

Luckily, we can easily fix this strange behavior of the editor.

SOLUTION

The cleanest way to solve this strange behavior is to use the <xsl:element> element or <xsl:attribute> element to create the records, elements and attributes required, instead of manually create them <ns1:E2EDKA1003></ns1:E2EDKA1003> without the <xsl:element> element:

<xsl:element name="ns1:E2EDKA1003">
  <xsl:element name="ns1:DATAHEADERCOLUMN_SEGNAM">E2EDKA1003</xsl:element>
  <xsl:element name="ns1:PARVW">LF</xsl:element>
  <xsl:element name="ns1:PARTN">0000100000</xsl:element>
</xsl:element>

<xsl:element name="ns1:E2EDKA1003">
  <xsl:element name="ns1:DATAHEADERCOLUMN_SEGNAM">E2EDKA1003</xsl:element>
  <xsl:element name="ns1:PARVW">ZC</xsl:element>
  <xsl:element name="ns1:PARTN">
    <xsl:choose>
      <xsl:when test="@Transportation='1'">
        <xsl:value-of select="'0000100001'" />
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="'0000100009'" />
      </xsl:otherwise>
    </xsl:choose>
  </xsl:element>
</xsl:element>

If you don’t want to use the <xsl:element> element or <xsl:attribute> element, then you need to declare the prefix namespace in the record:

<ns1:E2EDKA1003 xmlns:ns1="http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/3/ORDERS01//700">
  <ns1:DATAHEADERCOLUMN_SEGNAM>E2EDKA1003</ns1:DATAHEADERCOLUMN_SEGNAM>
  <ns1:PARVW>LF</ns1:PARVW>
  <ns1:PARTN>0000100000</ns1:PARTN>
</ns1:E2EDKA1003>

<ns1:E2EDKA1003 xmlns:ns1="http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/3/ORDERS01//700">
  <ns1:DATAHEADERCOLUMN_SEGNAM>E2EDKA1003</ns1:DATAHEADERCOLUMN_SEGNAM>
  <ns1:PARVW>ZC</ns1:PARVW>
  <ns1:PARTN>
    <xsl:choose>
      <xsl:when test="@Transportation='1'">
        <xsl:value-of select="'0000100001'" />
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="'0000100009'" />
      </xsl:otherwise>
    </xsl:choose>
  </ns1:PARTN>
</ns1:E2EDKA1003>

In any of the case that you decide to implement, if then you try to compile or validate the map, everything will work fine and the error will disappear.


The adapter "WCF-SAP" raised an error message. Details "System.ServiceModel.CommunicationObjectFaultedException: The communication object, Microsoft.Adapters.Internal.LayeredChannelBindingElement.LayeredInboundChannel cannot be used for communication because it is in the Faulted state.

$
0
0

In the last few weeks I have been playing around with WCF-SAP adapter, I have many thing to write about it in terms of installation, configuration, communication and so on but I will start with this topic/problem.

While trying to create a WCF-SAP Receive port to be able to listener incoming IDOC from SAP system and despite the receive location be and stay enable in the BizTalk Administration Console I soon realized that the documents were not being picked up by BizTalk.

When I consulted the Event Viewer to check if there were additional information about the causes that were happening I found this three warning messages:

“The adapter "WCF-SAP" raised an error message. Details "System.ServiceModel.CommunicationObjectFaultedException: The communication object, Microsoft.Adapters.Internal.LayeredChannelBindingElement.LayeredInboundChannel`1[System.ServiceModel.Channels.IReplyChannel], cannot be used for communication because it is in the Faulted state.
at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Close()
at System.ServiceModel.Dispatcher.ErrorHandlingReceiver.Close()".

“The adapter "WCF-SAP" raised an error message. Details "The WCF service host at address "sap://CLIENT=[SAPClientID];LANG=[LANG];@A/[SAPServer]/[SystemID]?ListenerGwServ=[GWServer]&ListenerGwHost=[GwHost]&ListenerProgramId=[ProgID]&RfcSdkTrace=True&AbapDebug=False" has faulted and as a result no more messages can be received on the corresponding receive location. To fix the issue, BizTalk Server will automatically attempt to restart the service host."

“The adapter "WCF-SAP" raised an error message. Details "Microsoft.Adapters.SAP.RFCException: Details: ErrorCode=RFC_FAILURE. AdapterErrorMessage=An exception has occurred on the listener while executing RfcWaitForRequest..
at Microsoft.ServiceModel.Channels.Common.Design.AdapterAsyncResult.End()
at Microsoft.ServiceModel.Channels.Common.Channels.AdapterReplyChannel.EndTryReceiveRequest(IAsyncResult result, RequestContext& requestContext)
at Microsoft.Adapters.Internal.LayeredChannelBindingElement.LayeredInboundChannel`1.
System.ServiceModel.Channels.IReplyChannel.EndTryReceiveRequest(IAsyncResult result, RequestContext& context)
at System.ServiceModel.Dispatcher.ReplyChannelBinder.EndTryReceive(IAsyncResult result, RequestContext& requestContext)”

BizTalk-WCF-SAP-Adapter-Event-Viewer-warnings

CAUSE

Well. unfortunately this errors are generic error messages and does not provide what is really the problem.

So my advice is to first check all the port configurations for any possible configuration mistakes. After that you should use external network tools that let you dig deep into network traffic and inspect individual packets, for example Wireshark.

On this particular case I found that the BizTalk Server didn’t have the proper authorization to connect with that particular SAP program id:

ERR*.1.registration of tp [PROGRAM ID] from host [BIZTALK SERVER] not allowed.720.SAP-Gateway.721.2.gwxxrd.c.3644..Thu Feb  5 18:46:11 2015….33844.SAP-Gateway on host [SAP SERVER] / [GWServer]…..*ERR*.

BizTalk-WCF-SAP-Adapter-wireshark-monitoring

SOLUTION

Unfortunately, I’m not a SAP expert and I don’t know exactly what to do in SAP, what I can tell you is that there is nothing wrong in your configuration, this is not a BizTalk problem Smile. What I could see in one of the SAP tools was that BizTalk was trying to connect but it was straight away disconnected.

So to solve this problem you must contact your SAP team to proper configure the access. Once is done everything will work fine, at least in this case it solved my problems.


Visual Studio: Where is the ‘Deploy Solution’ option in my BizTalk Solution??

$
0
0

Is nothing new that in the last weeks I been busy performing BizTalk projects migrations from BizTalk Server 2006 R2 to 2013 R2 and, unintentionally, it seems that I can pick up and detect all the “bugs”, problems or limitations that you might imagine… or not. The good news is that I have several topics to write about it in my blog, as you may have noticed by my recent posts.

As a BizTalk Developer when you create a new BizTalk Solution, or open an existing one, you are used to have the BizTalk solution deploy option, of course in your development environment, which will allow you to easily deploy the entire BizTalk Solution directly from Visual Studio to your BizTalk Server runtime:

BizTalk-Server-2013-R2-Visual-Studio-2013-Deploy-Solution

During these weeks I notice that when I migrated an old BizTalk Solution from Visual Studio 2005 (BizTalk Server 2006 R2 Solution) to Visual Studio 2013 (BizTalk Server 2013 R2 Solution), I will soon talk about this topic in my blog – project migration, I realized that the “Deploy Solution” option did not appear in the context menu of my Visual Studio Solution:

BizTalk-Server-2013-R2-Visual-Studio-2013-without-Deploy-Solution

CAUSE

Visual Studio allow you to store different configurations of solution and project properties to use in different kinds of builds. To create, select, modify, or delete a configuration, you can use the Configuration Manager option present in the solution context menu.

A solution configuration specifies how projects in the solution are to be built and deployed. And by default when you create a new BizTalk Solution, or add a new BizTalk project to an existent solution, the “Build” and “Deploy” options are selected for the new project.

BizTalk-Server-2013-R2-Visual-Studio-2013-solution-configuration

However, sometimes when we update (migrate) an old Visual Studio Solution to a newer one, in this case Visual Studio 2005 to Visual Studio 2013, some of this configurations may disappear, or may not be present. The curious thing is that:

  • if the “Build” option is not select in the solution configuration, the “Build Solution” option continues to appear in the solution context menu, but it does do anything;
  • But if the “Deploy” option is not select in the solution configuration, the “Deploy Solution” doesn’t appear in the solution context menu;

BizTalk-Server-2013-R2-Visual-Studio-2013-solution-Configuration-Manager

SOLUTION

To solve this problem you must select the Deploy option in your solution configuration, for that you must:

  • In Visual Studio, right-click in your BizTalk Solution and select “Configuration Manager…” option from the context menu

BizTalk-Server-2013-R2-Visual-Studio-2013-solution-Configuration-Manager-option

  • On the “Configuration Manager” window, in the “Project contexts” pane, for every project, select the Configuration and Platform you want, and select whether to Build it and whether to Deploy it.
    • In this case make sure that “Deploy” is selected

BizTalk-Server-2013-R2-Visual-Studio-2013-solution-Configuration-Manager-deploy-option

Right-click in your BizTalk Solution and the “Deploy Solution” will now be available.

BizTalk-Server-2013-R2-Visual-Studio-2013-Deploy-Solution-final


The adapter "WCF-SAP" raised an error message. The communication object…. cannot be used for communication because it is in the Faulted state (Part II)

$
0
0

A few days ago I wrote a post about these same warning messages from WCF-SAP Adapter: The adapter "WCF-SAP" raised an error message. Details "System.ServiceModel.CommunicationObjectFaultedException: The communication object, Microsoft.Adapters.Internal.LayeredChannelBindingElement.LayeredInboundChannel cannot be used for communication because it is in the Faulted state.

The adapter "WCF-SAP" raised an error message. Details "Microsoft.Adapters.SAP.RFCException: Details: ErrorCode=RFC_INVALID_HANDLE. AdapterErrorMessage=An exception has occurred on the listener while executing RfcWaitForRequest..

The adapter "WCF-SAP" raised an error message. Details "The WCF service host at address "sap://CLIENT=[SAPClientID];LANG=[LANG];@A/[SAPServer]/[SystemID]?ListenerGwServ=[GWServer]&ListenerGwHost=[GwHost]&ListenerProgramId=[ProgID]&RfcSdkTrace=True&AbapDebug=False" has faulted and as a result no more messages can be received on the corresponding receive location. To fix the issue, BizTalk Server will automatically attempt to restart the service host."

The adapter "WCF-SAP" raised an error message. Details "System.ServiceModel.CommunicationObjectFaultedException: The communication object, Microsoft.Adapters.Internal.LayeredChannelBindingElement.LayeredInboundChannel`1[System.ServiceModel.Channels.IReplyChannel], cannot be used for communication because it is in the Faulted state.

I told at the time that this are generic error messages and does not provide what is really the problem.

These warnings occurs, normally, when BizTalk is trying to connect to a SAP system to receive the IDOC and, again, most of the times these are related with connectivity issue or permissions between BizTalk and SAP.

CAUSE

Normally, the reason for these warnings could be any of the following options:

  • There may be a problem with the SAP system.
  • Maybe BizTalk Server don’t have the proper authorization to connect with that particular SAP program id
    • Check my previous post here
  • Also some times is a configuration problem in the Receive Location in your BizTalk Server

There are some options for you to try to find more details about this warnings:

  • You can use external tools, like Wireshark, to dig deep into network traffic and inspect individual packets for clues
  • You may enable the RfcSdkTrace in the WCF-SAP port configuration to be able to see all the traces.
  • Or another useful option is to setup WCF tracing to see the underlying error.

But what I realized today is that sometimes this warnings may occur and none of the assumptions described above fit into the actual problem.

While I was migrating and configuring one BizTalk solution, I forgot to start the incoming IDOC subscriber (in this case an orchestration) which caused my messages to stay Suspended in a Non-resumable way, raising a “no subscribers were found” error

The Messaging engine failed to process a message submitted by adapter:WCF-SAP Source URL: sap://CLIENT=[SAPClientID];LANG=[LANG];@A/[SAPServer]/[SystemID]?ListenerGwServ=[GWServer]&ListenerGwHost=[GwHost]&ListenerProgramId=[ProgID]&RfcSdkTrace=True&AbapDebug=False. Details: The published message could not be routed because no subscribers were found. This error occurs if the subscribing orchestration or send port has not been enlisted, or if some of the message properties necessary for subscription evaluation have not been promoted. Please use the Biztalk Administration console to troubleshoot this failure.

And as you can see in the print screen bellow this error will generate also the appearance of the WCF-SAP warnings in the event viewer… although there is no problem in connectivity between BizTalk and SAP, and all the messages (IDOC) are being received and reached BizTalk

BizTalk-Server-2013-R2-WCF-SAP-Warnings-Event-Viewer-why

SOLUTION

In this particular case the solution is really simple, just create, or set correctly, one subscribe (Orchestration or send port with a filter) for the incoming IDOCs.


Error while retrieving or generating the WSDL. Adapter message: Details: ErrorCode=RFC_EXCEPTION. ErrorGroup=RFC_ERROR_APPLICATION_EXCEPTION. SapErrorMessage=SEGMENT_UNKNOWN. AdapterErrorMessage=Error returned by RfcCallReceiveEx while calling RFC: IDOCTYPE_READ_COMPLETE

$
0
0

Last week while trying to generate from Visual Studio 2013 a schema of a custom SAP IDOC by:

  • Right-click your BizTalk Server project, and then choose “Add | Add Generated Items | Consume Adapter Service”.
  • In the “Consume Adapter Service” Add-in screen, select the sap adapter binding.
  • You should set the connection URI to SAP server and after that click “Connect
  • From the “Select contract type” drop-down list, select “Service (Inbound operations)” option
  • In the “Select a category” box, expand the IDOC node and select the IDOC that you want to retrieve, to see the IDOC message types in the “Available categories and operations” box.
  • From the “Available categories and operations”, add the “Receive” operation to the "Added categories and operations" by selecting the operation and click the “Add” button
  • And finally click “Ok” to generate the IDOC SAP schema

I got the following error:

“Error while retrieving or generating the WSDL. Adapter message: Details: ErrorCode=RFC_EXCEPTION. ErrorGroup=RFC_ERROR_APPLICATION_EXCEPTION. SapErrorMessage=SEGMENT_UNKNOWN. AdapterErrorMessage=Error returned by RfcCallReceiveEx while calling RFC: IDOCTYPE_READ_COMPLETE..

Microsoft.Adapters.SAP.RFCException: Details: ErrorCode=RFC_EXCEPTION. ErrorGroup=RFC_ERROR_APPLICATION_EXCEPTION. SapErrorMessage=SEGMENT_UNKNOWN. AdapterErrorMessage=Error returned by RfcCallReceiveEx while calling RFC: IDOCTYPE_READ_COMPLETE..”

Server stack trace:

at Microsoft.Adapters.SAP.RFCException.HelperThrow(Int32 retCode, String additionalErrorMessage)
at Microsoft.Adapters.SAP.RfcOutboundInvoker.Invoke()
at Microsoft.Adapters.SAP.InternalIdocMetadata..ctor(String idocType, String cimType, String release, String version, MetadataLookup metadataLookup, SAPConnection sapConnection, TimeoutHelper timeoutHelper)
at Microsoft.Adapters.SAP.SAPMetadataContract.ResolveTypeMetadata(String typeId, TimeSpan timeout, TypeMetadataCollection& extraTypeMetadataResolved)
at Microsoft.ServiceModel.Channels.Common.Design.MetadataCache.GetTypeMetadata(String uniqueId, Guid clientId, TimeSpan timeout)
at Microsoft.ServiceModel.Channels.Common.MetadataLookup.GetTypeDefinition(String typeId, TimeSpan timeout)
at Microsoft.Adapters.SAP.SapIdocMetadata..ctor(String absName, String idocType, String cimType, String release, String version, SAPConnection sapConnection, Boolean generateFlatFileCompatibleIdocSchema, Boolean segmentTypeInFlatFileAnnotation, MetadataLookup metadataLookup, TimeoutHelper timeoutHelper)
at Microsoft.Adapters.SAP.SAPMetadataContract.ResolveTypeMetadata(String typeId, TimeSpan timeout, TypeMetadataCollection& extraTypeMetadataResolved)
at Microsoft.ServiceModel.Channels.Common.Design.MetadataCache.GetTypeMetadata(String uniqueId, Guid clientId, TimeSpan timeout)
at Microsoft.ServiceModel.Channels.Common.MetadataLookup.GetTypeDefinition(String typeId, TimeSpan timeout)
at Microsoft.Adapters.SAP.IdocOperationMetadata.ExportXmlSchema(XmlSchemaExportContext schemaExportContext, MetadataLookup metadataLookup, TimeSpan timespan, OperationParameterDirection direction)
at Microsoft.Adapters.SAP.IdocOperationMetadata.ExportInputXmlSchema(XmlSchemaExportContext schemaExportContext, MetadataLookup metadataLookup, TimeSpan timespan)
at Microsoft.ServiceModel.Channels.Common.Design.WsdlBuilderHelper.AddOperationSchema(OperationMetadata operationMetadata, TimeSpan timeout)
at Microsoft.ServiceModel.Channels.Common.Design.WsdlBuilder.SearchBrowseNodes(MetadataRetrievalNode[] nodes, WsdlBuilderHelper helper, TimeoutHelper timeoutHelper)
at Microsoft.ServiceModel.Channels.Common.Design.WsdlBuilder.GenerateOperationSchemas(WsdlBuilderHelper helper, MetadataRetrievalNode[] nodes, TimeSpan timeout)
at Microsoft.ServiceModel.Channels.Common.Design.WsdlBuilder.GetWsdl(MetadataRetrievalNode[] nodes, Uri uri, TimeSpan timeout)
at Microsoft.Adapters.SAP.SapCustomWsdlRetrieval.GetWsdl(MetadataRetrievalNode[] nodes, Uri uri, TimeSpan timeout)
at Microsoft.ServiceModel.Channels.Common.Design.MetadataExchanger.ProcessMetadataGet(Message message, Uri target, TimeSpan timeout, MetadataLookup metadataLookup)
at Microsoft.ServiceModel.Channels.Common.Design.MetadataExchanger.ProcessMetadataMessage(Message message, Uri target, TimeSpan timeout, MetadataLookup metadataLookup, Message& replyMessage)
at Microsoft.ServiceModel.Channels.Common.Channels.AdapterRequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.ServiceModel.Channels.IMetadataRetrievalContract.GetMetadata(MetadataRetrievalNode[] nodes)
at Microsoft.ServiceModel.Channels.Tools.MetadataSearchBrowse.MetadataPanel.GetWsdl(MetadataRetrievalNode[] nodes)
at Microsoft.ServiceModel.Channels.Tools.MetadataSearchBrowse.MetadataUserControl.GetWsdl()

BizTalk-Generating-SAP-schema-Error-while-retrieving-generating-WSDL

CAUSE

The SAP adapter uses the IDOCTYPE_READ_COMPLETE RFC to retrieve the metadata for the Receive operation for an IDOC. Invoking this RFC requires specific user permissions in the SAP system. To generate metadata, if you have connected to the SAP system using a credential that does not have permission to invoke the IDOCTYPE_READ_COMPLETE RFC, the SAP adapter gives an error.

So in order to demystify problems you should:

  • Make sure that your connection URI are well set
  • And you should try to import a schema from a standard IDOC, like INVOIC01, STATUS or ORDER01

If you are unable to import the schemas then you have a different problem from what I’m addressing here and you probably need to contact your SAP team to try to diagnose the problem, it probably may be lack of permissions. But normally in this cases you will receive a:

  • SapErrorMessage= OBJECT_UNKNOWN.

In my case I was able to import all the standard IDOC from SAP, however as I stated before I was trying to import the schema from a custom SAP IDOC created by my customer and I got instead a:

  • SapErrorMessage=SEGMENT_UNKNOWN

Which means, that while importing the IDOCTYPE_READ_COMPLETE RFC was not properly identifying some segments of the IDOC.

After validating with my SAP team we realize that some segments were not in the state “released” in SAP, this may not be the correct SAP interface logic but just to give you an idea here are some SAP print screens:

SAP-Set-release-custom-segment

Note: that all custom segments used in the IDOC must be released in SAP before you can import and use them in BizTalk Server.

SOLUTION

Well the only solution is to contact you SAP team and they must be sure that all segments of the IDOC that you are trying to import are released correctly.

Unfortunately we don’t have the segment information in question, but more likely it is some custom segment that they created.



Receiving a RNIF exception: UNP.SCON.VALERR: A failure occurred while validating the service content while you are extending Microsoft BizTalk Accelerator for RosettaNet (BTARN) with a new Partner Interface Process (PIP) schema.

$
0
0

In my opinion there are a lack of documentation, or good documentation and many of the existing one is obsolete, regarding some topics/feature of BizTalk Server – Microsoft BizTalk Accelerator for RosettaNet is one of them.

Today while I was trying to extend Microsoft BizTalk 2013 Accelerator for RosettaNet (BTARN) with a new receive Partner Interface Process (PIP) schema I was receiving the following error in the event log:

Source module:
RNDisAssembler

Correlation information:

Description:
Receive pipeline rejected incoming message due to the following RNIF exception:
UNP.SCON.VALERR: A failure occurred while validating the service content.

Details:
The document specification <MyNamespace.MyPIP> from assembly <MyAssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=…> failed to load. Verify the schema for this document specification is deployed and is in the Global Assembly Cache.

Note: this same error can occur in previous or new versions of BizTalk Server.

Based on the received error and according to a possible cause described by Microsoft at Troubleshooting: Microsoft BizTalk Accelerator for RosettaNet Issues and Resolutions either the document namespace or the root node property the deployed schema for the instance that you are trying to extend is incorrect.

In fact this could be the issue but I found really odd because in the error details my DLL, containing the schema that I was trying to extend, was being properly referenced, nevertheless I confirmed that it was properly deployed… But as I suspected this wasn’t my problem.

Note: this behavior does not happen with PIP that include out-of-the-box with BTARN (in the Microsoft.Solutions.BTARN.Schemas.RNPIPs dll) only with new ones and only in the incoming process.

Microsoft-Solutions-BTARN-Schemas-RNPIPs

Fortunately for us we have an extended BizTalk Server: List of Errors and Warnings, Causes, and Solutions at TechNet Wiki, I usually update with some frequency and that I used as a reference, which gave me some clues to the final solution. Nick Heppleston mention in his blog that:

“RN Disassembler does in-fact attempt to validate the message contained within the Service Content against a deployed schema just like the standard XmlDisassembler. The message that our trading partner was sending did not validate and hence the RosettaNet Accelerator threw this error message; once we had corrected the schema and redeployed, the error went away.

This is certainly one to be aware of if you are developing custom PIP’s to use with the RosettaNet Accelerator: ensure that the message in the Service Content validates against your custom PIP schema”

Again this isn’t my problem, because the Schema was properly deployed in the system, I only mention this because is important for understanding how the BTARN engine/processes works.

CAUSE

By default BTARN App Pool Settings are configured to use .NET framework 2.0, doesn’t enable 32-bit applications and the application pool is in Classic mode

BTARN-App-Pool-default-Settings

Important for you to know is that the accelerator requires both an in-process and out of process host, both of which must be marked as "Authentication Trusted" and "32-bit only".

To run the BTARN End to End scenario you need two important things:

  • Enable the BTARN Application Pools for 32 bit.
  • Add a HTTP Handler for *.dll refering the IsapiModule Filters.

But what I found today is that when you want to extend BTARN with new incoming PIP’s, the artifacts generated are going to be .NET 4.0/4.5 unless Visual Studio is configured to do otherwise, which we really cannot control using BizTalk projects:

re-targeting-Visual-Studio-BizTalk-Projects-error

This means along with setting the application pools for the 32-bit the .NET setting must be set to match.

SOLUTION

To solve this issue you must:

  • Type “Internet Information Services (IIS) Manager” or “IIS” in the Windows Start screen and click in “Internet Information Services (IIS) Manager” option on Apps menu.
  • Expand the server and click on “Application Pools” to display available application pools in center panel.
  • Right-click on “BTARNAppPool” and select “Advanced Settings”.
  • On the “Advanced Settings” window:
    • Change the value of “.NET Framework version” from “v2.0” to “v4.0”.
  • Change the value of “Enable 32-bit Applications” from “False” to “True”.
  • And then click “OK”.

BTARN-App-Pool-correct-Settings

Advice: you should do the same for the “BTARNHttpReceivePool” application pool

After I fix these configurations I was able to successfully receive the PIP message from my external Partner.

Credits to LemMotlo – BTARN App Pool Settings for BizTalk 2010


BizTalk WCF-SQL Adapter: The columns “…” are either duplicated or not in a sequence. Each column can only be selected one time, and columns must be selected in sequence

$
0
0

This week while migrating a demo, that I will present in BizTalk Summit 2015 – London event, from BizTalk Server 2013/Visual Studio 2012 to BizTalk Server 2013 R2/Visual Studio 2013 I found a strange behavior.

This is a simple demo where I have canonical schemas that will be transformed into different Schemas in order to perform 3 types of operations: Insert, Delete and Select in a custom SQL database using the WCF-SQL adapter and receive back the response.

However when I tried the demo I got the following exception in the Select operation:

“Microsoft.ServiceModel.Channels.Common.XmlReaderGenerationException: The columns FullName and Address are either duplicated or not in a sequence. Each column can only be selected one time, and columns must be selected in sequence.
at Microsoft.Adapters.Sql.SelectBodyWriter.OnWriteBodyContents(XmlDictionaryWriter writer)”

WCF-SQL-columns-are-either-duplicated-or-not-in-a-sequence

Nevertheless, everything was working fine in the old environment (BizTalk Server 2013). The select statement transformation is what we normally use daily in our projects, by just putting a "*" in the Columns element of the SQL Table Operation Select Schema

WCF-SQL-Select-Statement-transformation

CAUSE

The error message is clear and we can easily identify the problem but the reason why this strange behavior happens is not, and I really don’t know why or how it happened, but when I checked and compare the SQL Table Operation SelectResponse Schemas in both projects I realize that for some reason during the project migration Visual Studio changed the order of elements inside SelectResult as you can see in the picture bellow:

WCF-SQL-SelectResponse-Schemas-Comparation

And, of course, the SELECT * statement is respecting the correct order of the columns in the database witch is the order that we have in the left side in the picture above.

WCF-SQL-columns-are-either-duplicated-or-not-in-a-sequence-SQL-Table-Sctructure

SOLUTION

You have two options to solve this problem:

  • You can either rectify the order of the elements in your schema to respect the order that exist in the database
  • Or you need to change the value that you are passing to the Columns element inside your map to return the result in the right order of your schema.
    • In this case you need to change the value “*” with the following string value:
      • Email, Address, CitizenCard, ZipCode, PhoneNumber, FullName

WCF-SQL-Select-Statement-transformation-fixed


BizTalk WCF-SAP Adapter: RFC IDOC_INBOUND_ASYNCHRONOUS could not be resolved against SAP system because its metadata could not be obtained

$
0
0

Recently one of my clients migrated one of their SAP systems and after that intervention the BizTalk receive location that was listening in a specific Program ID started to failed with the following error message present in the event viewer: “RFC IDOC_INBOUND_ASYNCHRONOUS could not be resolved against SAP system because its metadata could not be obtained

Full error message:

The adapter "WCF-Custom" raised an error message. Details "Microsoft.ServiceModel.Channels.Common.MetadataException: RFC IDOC_INBOUND_ASYNCHRONOUS イ楸 could not be resolved against SAP system because its metadata could not be obtained. —> Microsoft.Adapters.SAP.RFCException: Details: ErrorCode=RFC_EXCEPTION. ErrorGroup=RFC_ERROR_APPLICATION_EXCEPTION. SapErrorMessage=EXCEPTION FU_NOT_FOUND RAISED. AdapterErrorMessage=An error occurred while determining the function interface of the RFC IDOC_INBOUND_ASYNCHRONOUS イ楸.
at Microsoft.Adapters.SAP.RFCException.HelperThrow(Int32 retCode, String additionalErrorMessage)
at Microsoft.Adapters.SAP.RfcClientConnection.GetRfcFunctionInterface(String rfcName)
at Microsoft.Adapters.SAP.InternalRfcMetadata..ctor(String originalRfcName, SAPConnection sapConnection)
at Microsoft.Adapters.SAP.SAPMetadataContract.ResolveOperationMetadata(String operationId, TimeSpan timeout, TypeMetadataCollection& extraTypeMetadataResolved)
at Microsoft.ServiceModel.Channels.Common.Design.MetadataCache.GetOperationMetadata(String uniqueId, Guid clientId, TimeSpan timeout)
at Microsoft.Adapters.SAP.SapFunctionMetadata.ResolveOperationMetadataUsingSdk(String absoluteName, String displayName, String funcName, String operationNamespace, SAPConnection sapConnection, Boolean isTrfc, MetadataLookup metadataLookup, TimeoutHelper timeoutHelper)
— End of inner exception stack trace —
at Microsoft.ServiceModel.Channels.Common.Design.AdapterAsyncResult.End()
at Microsoft.ServiceModel.Channels.Common.Channels.AdapterReplyChannel.EndTryReceiveRequest(IAsyncResult result, RequestContext& requestContext)
at System.ServiceModel.Dispatcher.ReplyChannelBinder.EndTryReceive(IAsyncResult result, RequestContext& requestContext)
at System.ServiceModel.Dispatcher.ErrorHandlingReceiver.EndTryReceive(IAsyncResult result, RequestContext& requestContext)".

Of course followed by the generic warning messages:

The adapter "WCF-Custom" raised an error message. Details "Microsoft.Adapters.SAP.RFCException: Details: ErrorCode=RFC_INVALID_HANDLE. AdapterErrorMessage=An exception has occurred on the listener while executing RfcWaitForRequest..".

The adapter "WCF-Custom" raised an error message. Details "System.ServiceModel.CommunicationObjectFaultedException: The communication object, Microsoft.ServiceModel.Channels.Common.Channels.AdapterReplyChannel, cannot be used for communication because it is in the Faulted state.".

The adapter "WCF-SAP" raised an error message. Details "The WCF service host at address "sap://CLIENT=[SAPClientID];LANG=[LANG];@A/[SAPServer]/[SystemID]?ListenerGwServ=[GWServer]&ListenerGwHost=[GwHost]&ListenerProgramId=[ProgID]&RfcSdkTrace=True&AbapDebug=False" has faulted and as a result no more messages can be received on the corresponding receive location. To fix the issue, BizTalk Server will automatically attempt to restart the service host."

However this time Wireshark didn’t provide me additional information to help me diagnose and solve the problem.

CAUSE

Well I’m not an “SAP expert” neither I have the intension to become, I only want to know and understand the basic, so I can properly diagnose and resolve the different problems that may arise.

In this case, and sorry if I’m not giving all the precise technical details, the root cause of this problem is related to the Encoding type of the RFC Connection – Non-Unicode or Unicode (you may see the differences between them here)

Additional you can found some useful information in this two forum threads:

SOLUTION

You should keep this SAP transaction names in mind: SALE, SM59, WE20, WE21 and WE02 As my dear friend Nino Crudele mention in one of his posts, “in SAP exist thousands of transactions, the most important for us are, SALE, SM59, WE20, WE21, WE02.”

In this particular problem you should use SM59 transaction to check if all the configuration are set correctly like the: message type, program id, the channel and so on… but in special the Unicode settings

For that you should the following macro steps

  • Launch SAPGUI and login in the SAP System.
  • Execute the SM59 (Display and maintain RFC destinations) transaction
  • Select TCP/IP Connections option and pick RFC destination that we are using
    • Go to special options and check the "Character Width in Target System" in the Unicode tab.

SAPGUI-SM59-RFC-destination-TCP-IP-Connections-Unicode

Make sure the Unicode option is selected, otherwise to contact your SAP team and they must ensure that the RFC Connection is properly configured to use Unicode.

In my case, by changing the RFC Connection from non-unicode to unicode solved the problem that we were facing.


WCF-SAP Adapter: Finding the document specification by message type [IDOC Message Type] failed. Verify the schema deployed properly.

$
0
0

In the sequence of my last post, and following the result obtained while trying to solve the problems that had been originated by the SAP system migration to a newer version, I end up receiving another error. This time the connectivity problem with SAP was overcome, however without any reason I started to receive an error saying that the schema was not known

I got the following error:

“There was a failure executing the receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Receive Port: "IN_IDOC_PORT" URI: "sap://CLIENT=[SAPClientID];LANG=[LANG];@A/[SAPServer]/[SystemID]?ListenerGwServ=[GWServer]&ListenerGwHost=[GwHost]&ListenerProgramId=[ProgID]&RfcSdkTrace=True&AbapDebug=False" Reason: Finding the document specification by message type "http://Microsoft.LobServices.Sap/2007/03/Idoc/3/IDOC_NAME//740/Receive#Receive&quot; failed. Verify the schema deployed properly.”

It was strange to receive this kind of error because the process was in testing stage, for about a month, and working properly.

CAUSE

After the SAP System migration to a newer version the process started also to use a newer version of the IDOC Schema. I really don’t know if the SAP team change anything in the SAP side or it had to do with the migration itself, however when I checked the source code I noticed that we were using the 711 version of the schema:

And now the SAP system process was using and sending the 740 version of the schema:

SOLUTION

The solution is very simple, you just need to generate and import the newest version of IDOC schema (740) to your BizTalk Solution, make all the necessary changes and redeploy all the required artifacts (schemas, orchestrations, maps, and so on)


BizTalk Accelerator for RosettaNet runtime feature failed to configure: Failed to add member ‘user’ to NT Group IIS_WPG Error code: -2147022676

$
0
0

Every time I try to configure the BizTalk Accelerator for RosettaNet in BizTalk Server 2013 or BizTalk Server 2013 R2 of course using Windows Server 2012 or Windows Server 2012 R2 I encounter this error in the configuration logfile

[2015-05-14 16:37:40:0043 Error ConfigHelper] Failed to add member ‘user’ to NT Group IIS_WPG Error code: -2147022676
[2015-05-14 16:37:40:0043 Error ConfigHelper] The group name could not be found

BTARN-The-group-name-could-not-be-found

CAUSE

When, basically this is a bug that has not been fixed yet. BizTalk Accelerator for RosettaNet was introduced in BizTalk Server 2004 and since there only little or no changes were made.

BTARN requires the IIS_WPG group (group provided by IIS 6.0 that provides the minimum set of user rights and permissions required to run an application) but unfortunately for us this group doesn’t exist anymore…

SOLUTION

The solution is very simple… you just need to create it manually.

To accomplish that you need to:

  • Open Computer Management and in the console tree, expand “System Tools à Local Users and Groups” and then right-click Groups and select the option New Group .
  • In Group name
    • Type: IIS_WPG.
  • In Description
    • Type: RosettaNet IIS group
  • And then click Create, and then click Close

I really hope that Microsoft provide a hotfix for this or at least fix this problem in the next releases of the product


Viewing all 95 articles
Browse latest View live