调试添加接收位置时的 BizTalk 异常
启用接收位置时出现异常(应用程序日志中的错误),如下所示:
消息引擎无法添加接收位置“My-Receive-Location” URL“jms://TestServer:1099/Queue/testQueue/TestClientId/receive/Text”到 适配器“JNBridge JMS”。原因:“类型初始值设定项 'com.jnbridge.jnbcore.ObjectWrapper' 抛出异常。”。
我对 JNBridge JMS 适配器的研究表明,com.jnbridge.jnbcore.ObjectWrapper
通常会包装一个信息更丰富的 InnerException。
但是,确实有似乎没有任何方法可以在抛出此异常时捕获它。
到目前为止,我最好的尝试是在代码中启用接收位置,如下所示(来自 http://msdn.microsoft. com/en-us/library/microsoft.biztalk.explorerom.receivelocation(v=bts.20).aspx):
private static void EnumerateReceiveLocations()
{
BtsCatalogExplorer root = new BtsCatalogExplorer();
try
{
root.ConnectionString = "Server=.;Initial Catalog=BizTalkMgmtDb;Integrated Security=SSPI;";
//Enumerate the receive locations in each of the receive ports.
foreach (ReceivePort receivePort in root.ReceivePorts)
{
Console.Out.WriteLine(receivePort.Name);
//Enumerate the receive locations.
foreach (ReceiveLocation location in
receivePort.ReceiveLocations)
{
Console.Out.WriteLine(location.Name);
if (location.Name == "My-Receive-Location")
{
location.Enable = true;
root.SaveChanges();
}
}
}
Console.Read();
}
catch (Exception e)//If it fails, roll-back all changes.
{
throw e;
}
}
但是,这在执行过程中不会引发任何异常,并且只是在 Windows 应用程序日志中引发相同的错误
因此,有什么方法可以获取有关 BizTalk 接收位置启用期间引发的异常的更多信息吗?
I am getting an exception (an error in the Application Log) when enabling a receive location as follows:
The Messaging Engine failed to add a receive location "My-Receive-Location" with
URL "jms://TestServer:1099/Queue/testQueue/TestClientId/receive/Text" to the
adapter "JNBridge JMS". Reason: "The type initializer
for 'com.jnbridge.jnbcore.ObjectWrapper' threw an exception.".
My research into the JNBridge JMS adapter suggests that com.jnbridge.jnbcore.ObjectWrapper
often wraps a more informative InnerException.
However, there does not seem to be any way for me to catch this Exception when it is thrown.
My best try so far is to enable the Receive Location in code as follows (from http://msdn.microsoft.com/en-us/library/microsoft.biztalk.explorerom.receivelocation(v=bts.20).aspx):
private static void EnumerateReceiveLocations()
{
BtsCatalogExplorer root = new BtsCatalogExplorer();
try
{
root.ConnectionString = "Server=.;Initial Catalog=BizTalkMgmtDb;Integrated Security=SSPI;";
//Enumerate the receive locations in each of the receive ports.
foreach (ReceivePort receivePort in root.ReceivePorts)
{
Console.Out.WriteLine(receivePort.Name);
//Enumerate the receive locations.
foreach (ReceiveLocation location in
receivePort.ReceiveLocations)
{
Console.Out.WriteLine(location.Name);
if (location.Name == "My-Receive-Location")
{
location.Enable = true;
root.SaveChanges();
}
}
}
Console.Read();
}
catch (Exception e)//If it fails, roll-back all changes.
{
throw e;
}
}
However, this does not throw any exception during execution, and simply raises that same error in the Windows Application Log.
As such, is there any way for me to get further information about an exception thrown during BizTalk receive location enabling?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如何在适配器的传输处理程序中启用错误日志记录?您可以指定日志文件名/位置,并根据需要打开和关闭错误日志记录。错误日志将包含所有嵌套的内部异常,您可以在其中找到根本原因。查看用户指南,第 16 页,版本 2.1。如果您同时使用适配器的发送端和接收端,请将发送和接收传输处理程序中的错误日志记录配置为指向同一文件。
威廉
How about enabling error logging in the adapter's transport handlers? You can specify a log file name/location and toggle error logging on and off as needed. The error log will contain all nested inner exceptions where you'll find the root cause. Check out the Users' Guide, pg 16 version 2.1. If you are using both send and receive sides of the adapter, configure the error logging in the send and receive transport handlers to point to the same file.
William