BTDF deploy on local machine in Visual Studio by using “Tools”, “Deployment Framework for BizTalk”, “Deploy BizTalk Solution” failed with the following error in XmlPreprocess.exe
/s:: Argument expects a parameter
What caused the error for me was that I in the SettingsFileGenerator.xml spreadsheet, I had renamed all the “Settings File Names” for each environment. I switched the “Local Development” back to Exported_LocalSettings.xml and this got around the issue.
Perhaps there is a setting in the .btdfproj file that allows you to specify (override) the local settings name, but I couldn’t find it today.
A message sent to adapter “FILE” on send port “spGwCustomers_Caterpillar_EDI210” with URI “C:\Integrations\EDI1\Customers\xxxx\outbound\210\Test_210_%datetime_bts2000%.TXT” is suspended.
Error details: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
The file not found can refer to the map .dll. The error to me is quite misleading, because it implies the directory/filename path listed in the error is the problem.
This can happen to me when I don’t run the MSI (or other deploy process) for a map on one of the BizTalk servers (when you have multiple BizTalk servers in the same group).
It sure would be nice if the error would give the actual missing filename (i.e. the map .dll name).
Got the following error when posting to a BizTalk receive location from SOAP-UI, but could have happened with any type of receive location:
HTTP/1.1 500 Internal Server Error
Content-Type: application/xml; charset=utf-8
Date: Thu, 05 Jul 2018 14:07:37 GMT
There was a failure executing the receive pipeline:
"MyPipeline, etc... Version=18.104.22.168, Culture=neutral, PublicKeyToken=1234123412341234"
Source: "XML disassembler" Receive Port: "rpFrontEnd_TLRGLoadTenderOut_Web"
Reason: Finding the document specification by message type
Verify the schema deployed properly. </Text></Reason><Detail><ExceptionDetail
This was a conversion from old 2010 system to 2013. On the first pass, I had forgotten a map that trimmed all the fields and removed empty nodes. The map used XSLT, and in the XSLT source, it had the wrong namespace from the old system.
Remember MessageType = NameSpace#Root
Make sure the schema is really deployed (BizTalk Admin console)
Check your spelling carefully, look for typos.
If you have a map in the receive location, make sure the map is really running. I.e. does the messageType of the incoming message match the map. If the map doesn’t match, the incoming message will be passed on and could get this error.
If you have a map, make sure the map has been tested and outputs the correct messageType.
If you are doing JSON to xml (or any other file format to XML, make sure the pipeline is creating the correct messageType.
Of course, make sure you restarted your Host Instances
Check your values in BizTalk Admin before and after each deploy. If you are doing some kind of automated deploy, make sure your bindings for that deploy are current; they maybe resetting some value each time you deploy. In my case, I had a script to export the bindings, but I was actually running a similar script for another project. So everytime I reset the namespace value for the RootNodeNamespace in the JSON pipeline, it was getting reset on each re-deploy.
Microsoft.ServiceModel.Channels.Common.ConnectionException: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.
—> System.Data.SqlClient.SqlException: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.
The user was correct, and that was driving me crazy. I had just built the database from a script, and I set and double-checked the security in SSMS for that database.
I’m running on my own VM on my desktop; and the userid is my VM-Name/bts_host_ins (and that’s the user that all the host instances run with).
There could be other reasons for this error, but here was my reason…
My SendPort was pointing to our development system which is on the “DEV” domain, and my VM where I’m testing is on the primary domain.
The fix was just to repoint the SendPort to my local VM which is what I wanted anyway. If I really did want to go to the DEV domain, then I would have to use a user on that domain to run my host instance.
The adapter failed to transmit message going to send port “sp_Test_SFTP” with URL “sftp://sftp.mycompany.com:22/%MessageID%.xml”. It will be retransmitted after the retry interval specified for this Send Port. Details:”System.IO.FileLoadException: Could not load file or assembly ‘WinSCPnet, Version=22.214.171.12457, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf’ or one of its dependencies. General Exception (Exception from HRESULT: 0x80131500)
File name: ‘WinSCPnet, Version=126.96.36.19957, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf’ —> System.Exception: SFTP adapter requires WinSCP to be installed. Please refer http://go.microsoft.com/fwlink/?LinkID=730458&clcid=0x409 . —> System.IO.FileNotFoundException: Could not load file or assembly ‘file:///C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.BizTalk.Adapter.Sftp\v4.0_188.8.131.52__31bf3856ad364e35\WinSCPnet.dll’ or one of its dependencies. The system cannot find the file specified.
I think BizTalk requires a specific older version of WinSCP and you can’t just download the latest one.
This error could also occur if you didn’t copy the file to the proper directly.
Shape name: msgABCDetail
Exception thrown from: segment 4, progress 22
Inner exception: Root element is missing.
This error occurs in an orchestration, typically after you have run a map, and the map doesn’t create any output.
The map is in a construct statement, and presumably the message created in the construct statement should not be empty.
The way to test or fix this is as follows:
1) Obtain a copy of a the message that goes into the map (might have to add debug or write message to disk or trace), and save to disk.
2) Test that message in Visual Studio using the right click “Test Map” option on the map (first set the “TestMap Input Instance” property to the filename you saved from the step above.
3) Typically the issue is a namespace or higher level node is missing. This causes none of the xpaths in the XSLT to match, and thus nothing is generating on the “right side” of the map. When you test the map, the Output window will show something like this: “The output is stored in the following file: xxx.xml”. If you cntl-click on that file, that file will open. In all likelihood it will be empty (blank). [If it has data in it, there is a chance the code you are running doesn’t match the current version of the source code/map you are testing, indicating you might need to redeploy.]
4) To check further, you can also check the file against the schema, to make sure it is valid. This may help indicate an element name or namespace that is wrong that could cause the map to result in empty output. Set the schema property “Input Instance Filename”, then right click on the schema and select “Validate Instance”. If it fails, you might try generating an instance, then use a file compare or your own eyeballs to compare the generated instance to the instance you were validating (experience teaches you what to look for).
Here’s a specific case I dealt with today. My data file had a root element named eisresultset. It was built by xpathing to a node of the data data returned to us by a vendor. Due to the way the vendor packs the data in a generic XmlDoc packet, the WSDL did not build the schemas for us, and I had to do it manually. When I built the schema for esiresultset, I misspelled the root element name and had esiresultset. The reversal of those two letters make a huge difference!
When I validated the data instance against the schema, the output window told me clearly:
e:\MyDir\MySubDir\map_EsiResultSet_To_DBTableMotoDetails_TestIn1.xml: error BEC2004: The ‘eisresultset’ element is not declared.
The second mistake I made, was in my map, I had mapped eisrecord, a separate schema with that repeats inside of eisresultset. So mapping a schema that starts with a higher level element than what I mapped would never result in a good map output.
This is a “back to the basics” post with a list of reasons BizTalk might not be processing (consuming) your file that you have placed (dropped) in a directory associated with a Receive Location.
1. Are the Host Instances started? (Specifically the Host Instance associated with the Receive Location). Be sure and refresh (F5 or right-click refresh) to make sure you are not looking at old statuses.
Each receive location has a “Receive Handler”. See Figure 1 below.
See Figure 2 below to check if the Host Instances are started. Be sure and refresh (F5 or right-click refresh) to make sure you are not looking at old statuses.
In the case above, the Receive Location Hander is BizTalkServeApplication. So it doesn’t matter that the Rosetta Host Instance is not started.
Figure 2 – Status of Host Instances
2. Make sure the Receive Location itself is “Enabled”. The figure below doesn’t show, but I opened BizTalk Admin console, navigated to the Application on the left menu, then expanded the “Receive Locations”
Figure 3 – Receive Location Status
3. Check Windows Application Event Viewer for Errors:
For example, here is an error I had today:
The FILE receive adapter cannot process file e:\Messages\Charter\Inbox\StarterParams\StartParams_Prod.xml because of one of the following reasons:
1) The file is read-only.
2) The file is a system file.
3) The FILE receive adapter does not have write permissions on the file.
To see if the file is read only, right click on the file and make sure the checkbox next to “read-only” attribute is NOT checked. Also make sure the file you are copying/dropping into the pickup directory is not “read-only”, because that attribute sticks when you copy it. NOTE: You might have a sample file in your Visual Studio Project, then when you check that project in to TFS (or some other source control system), the read-only attribute of that file is turned on. You might want to have a copy of your file for testing that is not part of TFS check-in so that the read-only attribute will stay off.
To check security, from Windows Explorer, right click the directory (not the file), click on the Security tab, and make sure that the userid that runs the Receive Handler Host Instance (see Figures 1 and 2 above) have Full Control. If in doubt, you could always add the user “Everyone” and give it full access. Then once you get it working, go back and tighten-up the security. If you are working on your own laptop or development computer, the security probably doesn’t matter. But on a shared development, QA, or production environment, security can be very important.
4. Consider checking the CPU performance on the machine.
I’ve seen cases where there is a task using 100% of the CPU, and that is preventing the BizTalk host instance to do its work.
The short cut to open Windows Task Manager is Cntl-Shift-Escape. I like to check the “Performance tab” to see what CPU Usage is, if it is high, and how long it has been high. If it is really high, like 90-100%, you can click Processes (then sort by CPU) and find out which task is taking all the CPU.
When I treid to start a project, several SendPorts would not start. When I tried to start each one manually, some of them were giving this misleading error in the EventLog.
Unable to communicate with MessageBox BizTalkMsgBoxDb on SQL Instance DAL-BIZ-APP01. Error Code: 0x8004d00e. Possible reasons include:
1) The MessageBox is unavailable.
2) The network link from this machine to the MessageBox is down.
3) The DTC Configuration on either this local machine or the machine hosting this MessageBox is incorrect.
We use BizTalk Deployment Framework (BTDF). I had copied my binding file and updated in Visual Studio. This is the second or third time that the XML editor of Visual Studio has bit me; it re-arranges the XML in the binding file, and the binding file import is apparently very picky about the layout. Not sure why it cannot use standard XML conventions.
The moral of the story is to use NotePad++, NotePad or some other safe editor that doesn’t take any liberties with reformatting the XML. I rebuilt my MSI, redeployed, and it worked fine.
A message sent to adapter "BiztalkMessagingEngine" on send port "XX.FMA.Extract_184.108.40.206_XX.FMA.Extract.SendExtract_DynamicFTP_f136abb33540170c" with URI "ftp://220.127.116.11:21/%SourceFileName%" is suspended.
Error details: Unknown Error Description
We moved code to a new target environment, where the Host-Instances didn’t match the source environment. We reconfigured some of the HostInstances to allow for a default 32-bit host instance, then restarted the Host Instances.
Orchestration is being used to send files to a dynamic FTP. We store the FTP site, user, password in a SQL table to allow us send to many different FTP trading partners.
Unenlist and re-start the dynamic send port. Apparently restarting the Host Instances was not enough.
Exception type: InvalidOperationException
Target Site: System.Object Deserialize(System.Xml.XmlReader,
The following is a stack trace that identifies the location where the
I was using the BizTalk orchestration xpath command, like this:
myString = xpath(myMessage,myXpath);
The problem was, that I forgot to wrap the xpath with the string() function, like this: