【问题标题】:TypedPolling from SQL and Insert to Oracle从 SQL 和插入到 Oracle 的 TypedPolling
【发布时间】:2014-03-07 21:04:30
【问题描述】:

我有一个 BizTalk 应用程序尝试执行以下操作:

1) 使用 WCF 自定义适配器从 SQL 服务器进行 Typedpolling,对它们进行分批

2) 将每条记录转换并保存到 Oracle 数据库中。

我可以成功地从 SQL 中输入轮询记录并将它们发送到文件中。 我还可以成功地从文件中读取记录并将它们保存到 Oracle 表中。但是,我无法设法从 SQL 轮询记录并将它们直接保存到 Oracle 表中。我收到的错误是:“将状态持久化到数据库时发生异常”。这是完整的错误消息:

xlang/s engine event log entry: Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'Test00070.Test_00070(7a42a905-f067-e0f9-31df-b2ae9c06b0e4)'.
The service instance will remain suspended until administratively resumed or terminated. 
If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
InstanceId: 7928beb5-f8db-4212-9e45-4eeaeae34690
Shape name: Send_1
ShapeId: 89c1b018-07d3-42d5-8511-6eb9da64b029
Exception thrown from: segment 1, progress 11
Inner exception: Exception occurred when persisting state to the database.

Exception type: PersistenceException
Source: Microsoft.XLANGs.BizTalk.Engine
Target Site: Void Commit()
The following is a stack trace that identifies the location where the exception occured

   at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.Commit()
   at Microsoft.XLANGs.Core.Service.Persist(Boolean dehydrate, Context ctx, Boolean idleRequired, Boolean finalPersist, Boolean bypassCommit, Boolean terminate)
   at Microsoft.XLANGs.Core.ServiceContext.PendingCommit(Boolean ignore, XMessage msg)
   at Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean ignoreCommit, XMessage msg)
   at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.SendMessage(Int32 iOperation, XLANGMessage msg, Correlation[] initCorrelations, Correlation[] followCorrelations, SubscriptionWrapper& subscriptionWrapper, Context cxt, Segment seg, ActivityFlags flags)
   at Microsoft.XLANGs.Core.PortBase.SendMessage(Int32 iOperation, XLANGMessage msg, Correlation[] initCorrelations, Correlation[] followCorrelations, SubscriptionWrapper& subscriptionWrapper, Context cxt, Segment seg)
   at Test00070.Test_00070.segment1(StopConditions stopOn)
   at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
Additional error information:

        A batch item failed persistence Item-ID c62be0cc-ef1c-4b8d-a00e-d8c1506b4659 OperationType MAIO_CommitBatch Status -1061151949 ErrorInfo The message found multiple request response subscriptions. A message can only be routed to a single request response subscription. .

Exception type: PersistenceItemException
Additional error information:

        Failed to publish (send) a message in the batch. This is usually because there is no one expecting to receive this message.  The error was The message found multiple request response subscriptions. A message can only be routed to a single request response subscription.  with status -1061151949.

Exception type: PublishMessageException

这就是我所做的:

  1. 使用 WCF-Custom 为 OracleDBBinding 和 SQLBinding 创建了自动生成的项目。
  2. 从 SQLBinding 的 xsd,我将轮询消息分批成单独的记录
  3. 为收到的轮询数据创建编排,将 SQL 消息转换为 OracleMsg,然后将它们重新插入 Oracle。

我已经成功部署了应用程序,但是一旦我将记录放入 SQL 表中,它们就会被 BizTalk 拉过来,但我遇到了上述错误。

有人遇到过上述问题吗?

更新: 停止其他可能正在等待发布消息的应用程序后,我收到此错误:

 There was a failure executing the send pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLTransmit, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML assembler" Send Port: "SEND_PORT_00070" URI: "oracledb://oracleServer/?PollingId=TEST_00070" Reason: This Assembler cannot retrieve a document specification using this type: "http://Microsoft.LobServices.OracleDB/2007/03/ORACLE_SCHEMA/Table/ROTATION_REQ#Insert".

这是我的映射:

【问题讨论】:

  • 错误状态“一条消息只能路由到单个请求响应订阅。”。您确定只有 1 个订阅匹配已发布的消息吗?您的 OraclePort 绑定类型是什么?
  • @PieterVandenheede:我使用的绑定是来自 wcf-custom 的 Oracledbbinding。我已经检查过,似乎可能有其他应用程序意外收到了已发布的消息。我停止了其他应用程序,现在出现此错误:
  • @PieterVandenheede:不知道为什么我的回复被截断了一半,但我已经更新了主要问题中的错误消息。可能太长了...我还更新了映射以确保我使用了正确的架构,我认为我这样做了

标签: biztalk wcf-binding biztalk-2010


【解决方案1】:

请检查您的 BizTalk 环境中是否安装了文档规范(又名架构):http://Microsoft.LobServices.OracleDB/2007/03/ORACLE_SCHEMA/Table/ROTATION_REQ#Insert

该错误表明发送端口无法访问此架构。可能是此架构未安装在 BizTalk 中,或者该架构是不同 BizTalk 应用程序的一部分,并且包含您的发送端口的应用程序需要引用它。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-04-15
    • 1970-01-01
    • 1970-01-01
    • 2020-05-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多