Re: I get Object reference not set to an instance of an object in a simple application

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On May 22, 3:38 pm, "Tony Johansson" <johansson.anders...@xxxxxxxxx>
wrote:
Hello!

I have a simple BizTalk application with the following configuration.
a. One flatFile csv text file as input and a flatfile schema for this csv
flat file.
b. One example of how xml output should look like and generate a schema for
this xml output.
c. I have created a Map between the OpenSourceSchema and the
OpenDistinationSchema.
   OpenSourceSchema is the schema for the csv flat file.
   OpenDistinationSchema is the schema for the output xml file.
d. A custom ReceivePipeLine that use flat file disassembler to tranfer to
xml because the input was
  csv flat file. Set the property Document schema to the flat file schema
for the Flat file disassembler in the pipeline editor.

What I want to establish is the following.
1. Read the csv flat file which consist of several records and have an
output xml file containing
all these records from csv flat file.
2.The output xml file should be according to the example xml output but the
data should be according to the existing mapping.

Now to my problem if I remove the map in send port property I get an xml
file in the output directory which
consist of all the records from the csv file.This is correct according to
the setting that I have done.
But because I need the mapping between the input and the output I use
Outbound Maps in the Send Port Property and click on this. In the Outbound
Maps I click in the Map field and select the map that I have called
simpleMap.
If I now copy my CSV flat file in the In directory it is removed which is OK
but I don't
get anything in the out directory.

If I look in the Event Viewer/Application I have this error message below..
A message sent to adapter "FILE" on send port "SendPort3" with URI
"C:\Tony\BizTalk\Laboration4\Out\%MessageID%.xml" is suspended.
 Error details: Object reference not set to an instance of an object.
 MessageId:  {AC40971A-9DFC-4669-BCA6-DB2489323F44}
 InstanceID: {ED08F559-DAF0-4DB1-B846-C34D7DFFAD24}

Can anybody tell me why I get this error message ?

//Tony

Tony,
It sounds like you have a problem in one of the functiods in your map.
Most likely it is a scripting functoid that either executes inline
code or executes a method from a referenced assembly.

You mentioned that the flat file disassembler in your receive port
works fine. Take the XML output file of that send port and use it to
test the map in Visual Studio. You should be able to find your
problem then.

Ben McFarlin, MCTS, MCAD
Microsoft Certified BizTalk Server Architect

.



Relevant Pages