none
BizTalk 2010 - error error X2214 RRS feed

  • Question

  • I got this compiling error that I am not sure I understand. I have an Oracle store procedure that take no parameter that I like to run (the sp basically takes the top record in 1 table and copy it to another table) I have created a auto generated schema with contract type as outbound operation and the category being a procedure. Then I created a msg (msg1) based on the newly generated schema. In the orchestration, after polling a record from Oracle (I used a different autogenerated schema with contract type=inbound and category pollingstmt), I have a receive shape that will take the message msg1 to run the sp. But I got this error.

    error X2214: you must specify at least one already-initialized correlation set for a non-activation receive that is on a non-selfcorrelating port

    : for example, mark the receive Activate property as True

    : or, mark the port Binding property as Direct and the Partner Orchestration Port as Self Correlating

    : or, check a correlation on the receive Following Correlation Sets property

    I know that I am missing something as msg1 should have something to trigger the sp but not sure what I have to put in. Please help.

    Thanks,

    Tuesday, July 12, 2011 5:39 PM

Answers

  • This error can occur if you are not using a 2-way logical port on the 2nd receive shape in your orchestration to get the message back from the call to Oracle. I would guess you are using 2 different logical ports to call Oracle, a receve port and a send port. Basically BizTalk is not able to correlate the response from Oracle back to the orchestration for the 2nd receive shape. So I would switch to using a 2-way (send/receive) logical port for calling Oracle.

    This can also happen on the first message being receved by the orchestration if the receive shape's activate property is not set to true.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    • Marked as answer by FrankTo Friday, July 15, 2011 3:42 PM
    Tuesday, July 12, 2011 10:45 PM
    Moderator
  • Hi Frank,

    Reason I used a filter in Send Port is that it subscribes to message type (i.e. incoming message). In scenario's I use for blogs I usually do not use an orchestration. Since it is message based the Send port is subscribing to messages (i.e. messages coming into receive port are routed to send port). In you case you have an orchestration, and if you use direct binding, your messages go to messagebox and then you will need a filter to otherwise if you choose specify later you have to tie your logical port(s) to psychical ports and then you will not have to use a filter. In latter case your have pay extra attention to SOAP action and Operation name of logical port (in orchestration) needs to be taken into SOAP Action. You will have some like:

    <BtsActionMapping>

    <Operation Name="Operation Name of Port In Your Orchestration" Action="http://Microsoft.LobServices.OracleDB/2007/03/AXIUM/Procedure/VCU_BACKUP_AXIUM_TO_NEA" />

    </BtsActionMapping>

    HTH

    Regards,

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server 2010
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly


    BizTalk
    • Marked as answer by FrankTo Friday, July 15, 2011 3:42 PM
    Friday, July 15, 2011 3:17 PM
    Moderator
  • Hi Frank,

    Yes the MessageType has to be unique otherwise BizTalk runtime cannot process the message. For reference see Processign the Message (MSDN). If you have more than one schema matching the type (namespacespace#rootnode) BizTalk cannot figure out which one to use! So you have to get rid of one of them.

    HTH

    Regards,

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server 2010
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly


    BizTalk
    • Marked as answer by FrankTo Wednesday, July 20, 2011 7:36 PM
    Wednesday, July 20, 2011 6:33 PM
    Moderator
  • Hi,

    The namespace is standard and appears in schema you generate as target namespace. It is usally Microsoft.lobservices.<binding> i.e. oracledb, sap. To reuse schema you can for instance place all schemas you want to reuse in one project and deploy it. For reuse of schemas see this post.

    HTH

    Regards,

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server 2010
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly


    BizTalk
    • Marked as answer by FrankTo Thursday, July 21, 2011 12:11 PM
    Thursday, July 21, 2011 9:57 AM
    Moderator

All replies

  • To clarify what I am putting down earlier, my goal is:

    1) Poll a record from oracle database

    2) process the record and archive the record to a different table

    Not sure what I did above will help me achieve my goal. It appears to be a bit confusing. Sorry!

    Tuesday, July 12, 2011 8:28 PM
  • This error can occur if you are not using a 2-way logical port on the 2nd receive shape in your orchestration to get the message back from the call to Oracle. I would guess you are using 2 different logical ports to call Oracle, a receve port and a send port. Basically BizTalk is not able to correlate the response from Oracle back to the orchestration for the 2nd receive shape. So I would switch to using a 2-way (send/receive) logical port for calling Oracle.

    This can also happen on the first message being receved by the orchestration if the receive shape's activate property is not set to true.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    • Marked as answer by FrankTo Friday, July 15, 2011 3:42 PM
    Tuesday, July 12, 2011 10:45 PM
    Moderator
  • Hi Ben,

    Indeed! I only used receive port for the 2nd shape as I thought I only needed to send request to run the store procedure. (assuming I do not care about the response, which was not true, I just wanted to simplify the issue before it get too complex). After reading your response, I think I had actually got everything backward! Please confirm/advise to make sure I understand you correctly:

    1) Polling from Oracle using receive port (1 way). I do not think I had issue with this

    2) Issuing another msg to send request to run oracle store procedure using a 2 way port. (Do I still need to get the response assuming that I am not processing it at the moment?). What is the structure of message I have to issue to fire up the store procedure? I am still fuzzy on that.

    Hope my questions make sense?

    Thanks,

    Thursday, July 14, 2011 6:08 PM
  • Yes, it will send a response and you just receive and do not have to do anything with it. You generate the schema for the stored procedure using the add generated items wizard (I think this is the outbound operation in the wizard). Then to make the message you can use a map and just drag an element in the source message across to the message root of the destination schema to define the element in the message.

    Let me know if anything does not look right. I could also show a sample generated schema for a proc with no arguments if you like.  

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Thursday, July 14, 2011 10:59 PM
    Moderator
  • Thanks, Ben. A sample generated schema for a proc with no argurments would be helpful.  This is the error I got as I tried to initialize the mgs to trigger the call to store procedure. I have an assignment shape that assigned the following information to the triggering msg. Message_1 being the send request part of the multiple messages generated by the auto generated item when I added the WCF adapter.

    xmlDoc.LoadXml("<ns0:VCU_BACKUP_AXIUM_TO_NEA xmlns:ns0='http://Microsoft.LobServices.OracleDB/2007/03/AXIUM/Procedure' />");

    Message_1.Request=xmlDoc;

    The adapter failed to transmit message going to send port "WcfSendPort_OracleDBBinding_AXIUM_Procedure_Custom" with URL "oracledb://testaxium/?PollingId=TestAxiUm0002". It will be retransmitted after the retry interval specified for this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.MetadataException: Argument <BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

    <Operation Name="VCU_BACKUP_AXIUM_TO_NEA" Action="http://Microsoft.LobServices.OracleDB/2007/03/AXIUM/Procedure/VCU_BACKUP_AXIUM_TO_NEA" />

    </BtsActionMapping> is invalid.

    Server stack trace:

    at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)

    at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)

    at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)

    at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)

    Exception rethrown at [0]:

    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

    at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)

    lThere was no compiling error any more but the procedure do not seems to be triggered. Thanks!

    Friday, July 15, 2011 1:52 PM
  • Hi Frank,

    If you generate a schema for procedure then a binding file generated, which you can import in application, see my post for guidance. If you have done so then another option is to look at operation name of logical ports in orchestration. The BtsAction mapping should contain the Operation Name As specified in the logical port in the orchestration.

    HTH

    Regards,

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server 2010
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly


    BizTalk
    Friday, July 15, 2011 2:06 PM
    Moderator
  • Thanks Steef. I understood your blog and the instructions are straight forward. However, I am still getting the error. The SOAP action looks right and I have added a filter to the send port. I suspect there is something wrong with the assignment to the message to trigger the store procedure.

    Just a curious question regarding your blog: why do I need add a filter in the send port?

     

    Friday, July 15, 2011 3:01 PM
  • Hi Frank,

    Reason I used a filter in Send Port is that it subscribes to message type (i.e. incoming message). In scenario's I use for blogs I usually do not use an orchestration. Since it is message based the Send port is subscribing to messages (i.e. messages coming into receive port are routed to send port). In you case you have an orchestration, and if you use direct binding, your messages go to messagebox and then you will need a filter to otherwise if you choose specify later you have to tie your logical port(s) to psychical ports and then you will not have to use a filter. In latter case your have pay extra attention to SOAP action and Operation name of logical port (in orchestration) needs to be taken into SOAP Action. You will have some like:

    <BtsActionMapping>

    <Operation Name="Operation Name of Port In Your Orchestration" Action="http://Microsoft.LobServices.OracleDB/2007/03/AXIUM/Procedure/VCU_BACKUP_AXIUM_TO_NEA" />

    </BtsActionMapping>

    HTH

    Regards,

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server 2010
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly


    BizTalk
    • Marked as answer by FrankTo Friday, July 15, 2011 3:42 PM
    Friday, July 15, 2011 3:17 PM
    Moderator
  • That it!!!! Thanks a bunch, Steef... :) I misread your instruction and put in the name of the logical port but should be the name of the operation of the port... My fault! Can not even read it correctly...:) Work like a charm now.

    So I assume if the sp has parameters, I will just initialize the triggering msg with the parameters required by the sp?

    Friday, July 15, 2011 3:46 PM
  • Hi Frank,

    The SOAP Action is sometime a hassle and can cause some problems. If your stored procedure has parameters than you will need them (you can read post too).

    HTH

    Regards,

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server 2010
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly


    BizTalk
    Friday, July 15, 2011 3:50 PM
    Moderator
  • Steef,

    I would like to reuse this post as this is the exact sample you gave advice on and it was working after I followed your instruction. I did not change anything and it is now no longer working.... It is so strange. I thought BizTalk was more stable than this. What is the failure in pipe line about? it was working. I wonder what I have inadvertly changed in the environment that I was not aware of... Sorry to tag my question in here, but I do that to help you recall what was happening

    A message sent to adapter "WCF-Custom" on send port "WcfSendPort_OracleDBBinding_AXIUM_Procedure_Custom" with URI "oracledb://testaxium/?PollingId=TestAxiUm0002" is suspended.

    Error details: 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: "WcfSendPort_OracleDBBinding_AXIUM_Procedure_Custom" URI: "oracledb://testaxium/?PollingId=TestAxiUm0002" Reason: This Assembler cannot retrieve a document specification using this type: "http://Microsoft.LobServices.OracleDB/2007/03/AXIUM/Procedure#VCU_BACKUP_AXIUM_TO_NEA".

    MessageId: {913B1EF1-FFF3-4B0A-9D75-CD930418F922}

    InstanceID: {F76C4F30-4857-40E1-B3ED-11E347C3DE6E}

    Wednesday, July 20, 2011 5:15 PM
  • Hi Frank,

    Akward, but it seems that the document specification i.e. schema is not present in BizTalk runtime. It could be that is being updated or deleted somehow. Anyways you can check if schema with target namespace: http://Microsoft.LobServices.OracleDB/2007/03/AXIUM/Procedure and root node VCU_BACKUP_AXIUM_TO_NEA exists (both combined is message type, which the XML Assember cannot find) in BizTalk Management Database using the following query:

    Select msgtype, assemblyid, clr_namespace, clr_assemblyname
    from bt_documentspec
    where msgtype = '
    http://Microsoft.LobServices.OracleDB/2007/03/AXIUM/Procedure#VCU_BACKUP_AXIUM_TO_NEA'

    For reference see Abdul his post.

    HTH

    Regards,

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server 2010
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly

     

     


    BizTalk
    Wednesday, July 20, 2011 5:42 PM
    Moderator
  • Yes, Steef.

    It is there. There were 2 records for this entry though. Not sure it is going to be an issue. The first record is for the test, the second one is the actual project I currently work on. Since the second entry was added, the TestFunctoid stops functioning. Does msgtype need to be unique? http://Microsoft.LobServices.OracleDB/2007/03/AXIUM/Procedure#VCU_BACKUP_AXIUM_TO_NEA 124 TestFunctoid TestFunctoid, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5acf4cac4e589e87
    http://Microsoft.LobServices.OracleDB/2007/03/AXIUM/Procedure#VCU_BACKUP_AXIUM_TO_NEA 139 SOD_AXIUM_TO_NEA SOD_AXIUM_TO_NEA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5acf4cac4e589e87

    Wednesday, July 20, 2011 6:25 PM
  • Hi Frank,

    Yes the MessageType has to be unique otherwise BizTalk runtime cannot process the message. For reference see Processign the Message (MSDN). If you have more than one schema matching the type (namespacespace#rootnode) BizTalk cannot figure out which one to use! So you have to get rid of one of them.

    HTH

    Regards,

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server 2010
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly


    BizTalk
    • Marked as answer by FrankTo Wednesday, July 20, 2011 7:36 PM
    Wednesday, July 20, 2011 6:33 PM
    Moderator
  • Ah! No wonder! Thank you, Steef.

    One question though, the namespace is Microsoft.lobservices.oracledb/2007/03 is standard. The subsequent info is the store procedure with the specific user. Does that mean the store procedure can only be used and called by one project? Is there a way around it?

    Thanks,

     

    Wednesday, July 20, 2011 7:36 PM
  • Hi,

    The namespace is standard and appears in schema you generate as target namespace. It is usally Microsoft.lobservices.<binding> i.e. oracledb, sap. To reuse schema you can for instance place all schemas you want to reuse in one project and deploy it. For reuse of schemas see this post.

    HTH

    Regards,

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server 2010
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly


    BizTalk
    • Marked as answer by FrankTo Thursday, July 21, 2011 12:11 PM
    Thursday, July 21, 2011 9:57 AM
    Moderator