title: Custom type mapping for 'xxx.DataAccess.UDT_Table_Numbers' is not specified or is invalid
body: <p>I have a puzzle problem. Sometimes our program occurs "Custom type mapping for 'xxx.DataAccess.UDT_Table_Numbers' is not specified or is invalid." exception. After I restart IIS server, it is work. 
  Any help would be much appreciated.</p>
  
  <p>Relation code as below:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  
  using System.Data;
  using System.Configuration;
  using Oracle.DataAccess.Client;
  using Oracle.DataAccess.Types;
  
  using OMS.BusinessEntity.ORDValid;
  using OMS.Utilities.DBUtility;
  using OMS.Utilities.Common;
  
  
  namespace OMS.ORDValid.DataAccess
  {
  public class ExceptionHandlingDAO
  {
      public string AcceptOrder(string UserID, string Customer, string OrderNo, string Exflag, string LineString, string PriorityFlag, 
                                              List&lt;string&gt; LstPrice)
      {
          OracleConnection conn = new OracleConnection(OracleHelper.Wistron_WOMS_ConnStr);
          OracleCommand cmd = new OracleCommand();
  
          try
          {
              ....
              string ProcedureName = "PROC_ACCEPTORDER";
  
              OracleParameter[] parmArray = {
                  new OracleParameter("v_rodno", OracleDbType.Varchar2),
                  new OracleParameter("v_customer", OracleDbType.Varchar2),
                  new OracleParameter("v_exflag", OracleDbType.Varchar2),
                  new OracleParameter("v_userid", OracleDbType.Varchar2), 
                  new OracleParameter("v_highPriority", OracleDbType.Varchar2),
                  new OracleParameter("v_lineString", OracleDbType.Varchar2),
                  new OracleParameter("v_PriceList", OracleDbType.Object),
                  new OracleParameter("v_result", OracleDbType.Varchar2),
              };
  
              parmArray[0].Value = OrderNo;
              parmArray[1].Value = Customer;
              parmArray[2].Value = Exflag;
              parmArray[3].Value = UserID;
              parmArray[4].Value = PriorityFlag;
              parmArray[5].Value = LineString;
  
              parmArray[6].UdtTypeName = "OMS.EXCEPTION_REASON";
              parmArray[6].Value = new UDT_Table_Numbers { Value = LstPrice.ToArray() }; 
              parmArray[7].Size = 5000;   
  
              parmArray[0].Direction = ParameterDirection.Input;
              parmArray[1].Direction = ParameterDirection.Input;
              parmArray[2].Direction = ParameterDirection.Input;
              parmArray[3].Direction = ParameterDirection.Input;
              parmArray[4].Direction = ParameterDirection.Input;
              parmArray[5].Direction = ParameterDirection.Input;
              parmArray[6].Direction = ParameterDirection.Input;
              parmArray[7].Direction = ParameterDirection.Output;
  
              foreach (OracleParameter parm in parmArray)
              {
                  cmd.Parameters.Add(parm);
              }
  
              cmd.Connection = conn;
              cmd.CommandText = ProcedureName;
              cmd.CommandType = CommandType.StoredProcedure;
  
              cmd.ExecuteNonQuery();
              string temp = cmd.Parameters["v_result"].Value.ToString();
              cmd.Parameters.Clear();
              return temp;
          }
          catch (Exception ex)
          {
              throw new Exception(ex.Message);
          }
          finally
          {
              ...
          }
      }
  
  }
  
  public class UDT_Table_Numbers : TableTemplate&lt;string&gt;
  {
      // Inherited from TableTemplate   
  }
  
  // Factory to create an object for the above class   
  [OracleCustomTypeMappingAttribute("OMS.EXCEPTION_REASON")]
  public class StringTableFactory : TableFactoryTemplate&lt;UDT_Table_Numbers&gt;
  {
      public override System.Array CreateStatusArray(int length)
      {
          OracleUdtStatus[] udtStatus = new OracleUdtStatus[length];
          return udtStatus;
      }
  }
  
  
  public class TableTemplate&lt;Type&gt; : IOracleCustomType
  {
      [OracleArrayMappingAttribute()]
      public virtual Type[] Value { get; set; }
  
      public virtual void FromCustomObject(OracleConnection con, System.IntPtr pUdt)
      {
          if (this.Value != null)
          {
              OracleUdt.SetValue(con, pUdt, 0, this.Value);
          }
      }
  
      public virtual void ToCustomObject(OracleConnection con, System.IntPtr pUdt)
      {
          this.Value = ((Type[])(OracleUdt.GetValue(con, pUdt, 0)));
      }
  }
  
  public class TableFactoryTemplate&lt;T&gt; : IOracleCustomTypeFactory, IOracleArrayTypeFactory where T : IOracleCustomType, new()
  {
      public virtual IOracleCustomType CreateObject()
      {
          T obj = new T();
          return obj;
      }
  
      public virtual System.Array CreateArray(int length)
      {
          System.Type type = typeof(T).GetProperties()[0].PropertyType.GetElementType();
          return Array.CreateInstance(type, length);
      }
  
      public virtual System.Array CreateStatusArray(int length)
      {
          return null;
      }
  }
  
  [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
  public class NullableAttribute : Attribute
  {
  }
  
  [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
  public class IgnoreAttribute : Attribute
  {
  }
  }
  </code></pre>