none
BizTalk 2010 Oracle adapter and User Defined Types

    Question

  • Hi!

    So, I have a procedure in an Oracle database that uses a UDT, defined like this:

     CREATE OR REPLACE TYPE "TB_LAGFAG_V2_UUID_LAGFART_TYPE" AS TABLE OF VARCHAR2(50);

    Then I have a procedure that uses the type as an input parameter:

    CREATE OR REPLACE PROCEDURE SP_REFRESH_TB_LAGFAG_V2(UUID_INPUT IN TB_LAGFAG_V2_UUID_LAGFART_TYPE)

    IS

    BEGIN  

    ...

    END;

    I have later on consumed the procedure in VS to create schemas etc, and I have followed the instructions found here step by step. More specifically I have set GeneratedUserTypesAssemblyFilePath and GeneratedUserTypesAssemblyKeyFilePath at design time, and UserAssembliesLoadPath in the send port at run time. I have added the assembly as a resource in the Biztalk application to GAC it (no gacutil on the server) and placed it in the install dir for Biztalk. The path to the install dir version is the one I am using in the UserAssembliesLoadPath
    property.  But still, I get this error every time I try to call the procedure from BizTalk:

    Microsoft.ServiceModel.Channels.Common.MetadataException: The assembly required for type mapping not found.

    I have tried every possible combination of properties on the send port, regenerating dlls and schemas, changed hosts, but always the same error. Can anyone point me in the right direction here? Is it perhaps the code creating the type/procedure that needs changing?

    Any help is greatly appreciated!


    Thursday, April 13, 2017 8:20 PM

All replies

  • Hi,

    Are you using a 32-bit host instance on your port?

    Regards,

    René

    Friday, April 14, 2017 11:21 AM
  • Hi,

    Are you using a 32-bit host instance on your port?

    Regards,

    René


    Yes. I have also tried to encapsulate the UDT in a package, according to this post: http://synthesisconsulting.net/blog/2012/5/13/oracle-and-biztalk-server-part-2.html. But it confuses me, do I have to add custom C# code to define the type?
    Friday, April 14, 2017 11:28 AM
  • Hi,

    You should set the UserAssembliesLoadPath property to the location of your dll containging the UDT.

    No need to add custom code.

    regards,

    René

    Friday, April 14, 2017 11:40 AM
  • Hi,

    You should set the UserAssembliesLoadPath property to the location of your dll containging the UDT.

    No need to add custom code.

    regards,

    René


    Oups, that was a typo - I have set this property, trying to point it to the assembly in BizTalk install dir, in GAC and a bunch of other places. And of course manually moved the generated dll to those places. But still I get the same error! This is literally driving me crazy! Any other ideas?
    Friday, April 14, 2017 12:07 PM
  • Hi,

    Did you specify the full name, not only the path, to the UDT types assembly in the UserAssembliesLoadPath property?

    Perhaps restarting the host instance (32 bit) or unelisting/starting the Sendport makes a difference?

    Regards,

    René

    Friday, April 14, 2017 12:50 PM
  • Hi,

    Did you specify the full name, not only the path, to the UDT types assembly in the UserAssembliesLoadPath property?

    Perhaps restarting the host instance (32 bit) or unelisting/starting the Sendport makes a difference?

    Regards,

    René

    Yes, I specified the path like this:

    D:\Program Files\Microsoft BizTalk Server 2010\RealEstateData.BizTalk.OraclePackage.dll, and it can find the assembly (tried without and that gave an IO exception saying file not found.) I have tried to restart the host instance (32-bit only) and also unenlisting/enlisting the send port. Just now I tried to change the adapter from WCF-Custom (binding generated from the consume adapter service) to WCF-Oracledb, but still, same error.


    Friday, April 14, 2017 1:02 PM
  • Can add that I tried changing the UDT to

    CREATE OR REPLACE TYPE "TB_LAGFAG_V2_UUID_LAGFART_TYPE" AS VARRAY(500) OF VARCHAR2(50);

    And regenerate everything, but it made no difference. Same goddamn error.
    Friday, April 14, 2017 1:13 PM
  • HI,

    And this 'RealEstateData.BizTalk.OraclePackage.dl' is the generated dll by the wizard, not something you manually created?

    Regards,

    René

    Friday, April 14, 2017 1:23 PM
  • HI,

    And this 'RealEstateData.BizTalk.OraclePackage.dl' is the generated dll by the wizard, not something you manually created?

    Regards,

    René

    Correct, generated by specifying the two design time properties GeneratedUserTypesAssemblyFilePath and GeneratedUserTypesAssemblyKeyFilePath.

    I don't get it, I am doing everything right but still it won't work!

    Friday, April 14, 2017 1:47 PM
  • Hi,

    have you tried to have the assembly both on the specified location as well in the GAC?

    Regards,

    René

    Friday, April 14, 2017 2:54 PM
  • Hi,

    have you tried to have the assembly both on the specified location as well in the GAC?

    Regards,

    René


    Yes, in both places, only in the GAC, only in install dir, pointing to the GAC in the UserAssembliesLoadPath property, including it in the debug folder in VS project, included as a reference, added as BizTalk assembly... Feels like I have tried everything.

    Friday, April 14, 2017 2:59 PM
  • Does anyone have any idea on what I am doing wrong here?
    Sunday, April 16, 2017 6:59 AM
  • Hi,

    It is my guess the given assembly does not contain the correct UDT.

    Can you add tracing in the BTSNTSvc.exe.config file? It might contain more information about the specific error. For all information you can set the switchValue to 'All'.

    <system.diagnostics>
      <sources>
        <source name="Microsoft.ServiceModel.Channels" switchValue="Error">
          <listeners>
            <add name="xml" />
          </listeners>
        </source>
        <source name=" Microsoft.Adapters.OracleDB" switchValue="Error">
          <listeners>
            <add name="xml" />
          </listeners>
        </source>
      </sources>
      <sharedListeners>
        <add name="xml" type="System.Diagnostics.XmlWriterTraceListener" traceOutputOptions="LogicalOperationStack" initializeData="C:\temp\AdapterTrace.svclog" />
      </sharedListeners>
      <trace autoflush="true" />
    </system.diagnostics>

    Regards,

    René

    Sunday, April 16, 2017 10:17 AM