1 Reply Latest reply on Jun 2, 2017 9:44 AM by Gunther Pippèrr

    ORA:20100: ODE-00008: Unspecified error in Delegate Invocation at line 1

    a1606150-3bbc-4588-9cc3-d6afc73d8feb

      I am unable to run a .net stored proc with the above error. I have tried on 2 different oracle 12c installs. The procedure deploys ok and the function looks correct in the db, it's just the sample function from the documentation (as per below). I see then error when trying to run the function from VS or when calling select sys.getdeptno(1) from dual from pl/sql developer.

       

      I have sys access to the DB in question.

       

      I am using .net 2015 enterprise and building the solution as x86 with the Oracle Unmanaged DataAccess dll 4.121.2.0. With the same dll I can run an x86 app from the server itself that just creates a simple connection. I have also tried building as x64 and AnyCpu and using OracleDataAccess.dll 2.121.2.0 but without success. Any ideas?

       

      p.s. i am tagetting .net framework 4. I have enable ODT.NET tracing which looks as follows:

       

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (ENTRY) OraClrExecute()

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (ENTRY) NormalizeAndCheckAssemblyName()

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (EXIT)  NormalizeAndCheckAssemblyName(): hr=0 Line=4725

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (ENTRY) CreateMethodParameterList()

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (ENTRY) CreateNewOracleMethodParameterList()

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (EXIT)  CreateNewOracleMethodParameterList(): hr=0 Line=3656

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (ENTRY) SetOracleMethodParameter()

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (EXIT)  SetOracleMethodParameter(): hr=0 Line=4285

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (EXIT)  CreateMethodParameterList(): hr=0 Line=2406

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (ENTRY) CreateReturnParameter()

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (ENTRY) SetOracleMethodParameter()

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (EXIT)  SetOracleMethodParameter(): hr=0 Line=4285

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (EXIT)  CreateReturnParameter(): hr=0 Line=4773

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (ENTRY) ExecuteMethod()

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (ENTRY) ConvertParamListToSafeArray()

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (EXIT)  ConvertParamListToSafeArray(): hr=0 Line=4374

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (ERROR)  ExecuteMethod(): hr=80070057 Line=2070

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (EXIT)  ExecuteMethod(): hr=80070057 Line=2140

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (ERROR)  OraClrExecute(): hr=80070057 Line=973

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (ENTRY) FreeMethodParameterList()

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (ENTRY) FreeMethodParam()

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (EXIT)  FreeMethodParam(): hr=0 Line=2535

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (EXIT)  FreeMethodParameterList(): hr=0 Line=2437

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (ENTRY) FreeMethodParam()

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (EXIT)  FreeMethodParam(): hr=0 Line=2535

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (ERROR)  OraClrExecute(): hr=80070057 Line=1022

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (ENTRY) RaiseOracleException()

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (ENTRY) ssextproccallmem_calloc()

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (EXIT)  ssextproccallmem_calloc(): hr=0 Line=4403

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (EXIT)  RaiseOracleException(): hr=0 Line=4605

      TIME:2017/05/09-11:25:56:023 TID:5dc4  (EXIT)  OraClrExecute(): hr=80070057 Line=1044

       

      code:

       

        public static int GetDeptNo(int empno)

              {

                  int deptno = 0;

       

       

                  // Check for context connection

                  OracleConnection conn = new OracleConnection();

                  if (OracleConnection.IsAvailable == true)

                  {

                      conn.ConnectionString = "context connection=true";

                  }

                  else

                  {

                      throw new InvalidOperationException("context connection" +

                        "not available");

                  }

       

       

                  conn.Open();

                  //Create and execute a command

                  OracleCommand cmd = conn.CreateCommand();

                  cmd.CommandText = "SELECT DEPTNO FROM EMP WHERE EMPNO = :1";

       

       

                  cmd.Parameters.Add(":1", OracleDbType.Int32, empno,

                    System.Data.ParameterDirection.Input);

       

       

                  OracleDataReader rdr = cmd.ExecuteReader();

       

       

                  if (rdr.Read())

                      deptno = rdr.GetInt32(0);

       

       

                  rdr.Close();

                  cmd.Dispose();

                  conn.Close();

       

       

                  return deptno;

       

       

              } // GetDeptNo

        • 1. Re: ORA:20100: ODE-00008: Unspecified error in Delegate Invocation at line 1
          Gunther Pippèrr

          Hello,

           

          I get such a problem with the same error message.

           

          I reregister the GAC with the Oracle Data Access Componentes, this step was missed at the last patch of the DB enviroment.

           

          This works for me and the error was gone.

           

          See this hints in the orginal patch docu:

           

          .....

          from the Release 12.1.0.2.170418 for Microsoft Windows (x86) patch instruction:

           

           

          3.4 Oracle .NET Assembly Setup Instructions

           

          If you are patching Oracle .NET assemblies and existing versions reside in the Global Assembly Cache (GAC), then you must remove them from the GAC prior to using OPatch. Oracle does not add its patched .NET assemblies to the GAC by default. If you require GACing, GAC after OPatch completes. The Oracle .NET assemblies include:

           

                  Oracle.ManagedDataAccess.dll - For .NET 4

                  Oracle.DataAccess.dll - For .NET 2 and .NET 4

                  Oracle.Web.dll - For .NET 2 and .NET 4

                  Oracle.Database.Extensions.dll - For .NET 2 and .NET 4

           

          You can add and remove these assemblies to/from the GAC by following these steps:

           

          1. Open a command prompt. (Open using "Run As Administrator").

          2. Navigate to the directory that contains the assembly you wish to GAC. For example, the ODP.NET, Unmanaged Driver for .NET 4 is located in the %ORACLE_HOME%\ODP.NET\bin\4 directory.

          3. Execute the following to unGAC the assembly:

           

                  oraprovcfg.exe /action:ungac /providerpath:<assembly DLL>

           

          This is an example of unGACing unmanaged ODP.NET:

           

                  oraprovcfg.exe /action:ungac /providerpath:Oracle.DataAccess.dll

           

          4. Execute the following to GAC the assembly

                  oraprovcfg.exe /action:gac /providerpath:<assembly DLL>

           

          This is an example of GACing unmanaged ODP.NET:

           

                  oraprovcfg.exe /action:gac /providerpath:Oracle.DataAccess.dll

          ...

           

          BR

          Gunther