作为计划作业运行时,具有 COM Interop 的 SSIS 失败
我有一个 SSIS 包,它利用 RightFax 的 COM API (rfcomapi.dll) 周围的 COM Interop (Interop.RFCOMAPILib.dll)。
Interop 程序集已经过 GAC 处理,以便我们可以在 SSIS 包中使用它。
该包在我的本地计算机上运行得很好。 但如果手动启动,它在服务器上也可以正常工作(意味着服务器上的所有配置都是正确的)
(来源:codinghorror.com)
但是当我们将包放在计划作业上(在我们能够手动运行它的同一台服务器上)并让作业启动包时,它会失败在下一行。
Dim faxServer As New FaxServerClass()
并出现以下错误
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
此行是整个包中第一次尝试从 COM Interop 程序集实例化类。
可能发生什么事? 线程问题还是什么?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
事实证明,COM Interop 程序集在 64 位(服务器所在的位置)运行时出现问题,我们将其切换到 32 位,并且运行良好。
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.
尝试此支持文章中的方法 3。
Try Method 3 from this support article.