I have an SSIS Package that utilizes a COM Interop (Interop.RFCOMAPILib.dll) around RightFax's COM API (rfcomapi.dll).
The Interop assembly has been GAC'd so that we can use it within the SSIS package
The package runs just fine on my local machine. But it also works just fine on the server if it is manually started (meaning all of the configuration on the server is correct)
(source: codinghorror.com)
But when we go to put the package on a scheduled job (on the same server that it we were able to manually run it on) and have the job start the package it fails on the following line.
Dim faxServer As New FaxServerClass()
and with the following error
Error: 2009-07-16 15:32:01.39
Code: 0x00000002
Source: Send PO Notification Faxes and Mark as Processed
Description: The script threw an exception: Object reference not set to an instance of an object.
End Error
This line is the first time in the entire package that a class is trying to be instantiated from the COM Interop assembly.
What could be going on? A threading issue or something?
It turns out that the COM Interop assembly had issues running in 64bit (which the server was on) we switched it to 32bit and it ran fine.