1 2 Previous Next 22 Replies Latest reply: Jun 23, 2008 9:21 AM by 645331 RSS

    Could not create type: Oracle.Database.Extensions.OracleAppDomainFactory

    550248
      hi @ all!

      i'm new here, so i hope you can help me being able to call webservices out of oracle with .NET stored procedures!

      yeah...
      i'm running a Windows Server 2003 with Oracle 10g Release 2 (and new 10.2.0.3.0 patch). after deploying the assemblies to the Oracle (via network from my working computer) i wanted to start these procedures...

      simplest functionalities fail (such as static methods, that just return an integer) because of following exception:

      ORA-20100: Could not create type: Oracle.Database.Extensions.OracleAppDomainFactory
      ORA-06512: at "SYS.DBMS_CLR", line 129
      ORA-06512: at "SYSADM.IDENTIFYCARGOATLOCATION", line 10
      ORA-06512: at line 2

      has anybody of you got a suggestion?


      this problem occured first, after i runned a procedure, that called a webservice...
      after this failed, i runned the <ORACLE_HOME>\RDBMS\ADMIN\DBMSClr.plb in SQL*Plus

      could one of these actions cause my troubles?

      Message was edited by:
      sjo_ecolog
        • 1. Re: Could not create type: Oracle.Database.Extensions.OracleAppDomainFactory
          502182
          What is the ODT (Oracle Developers Tool for .NET) version you are using?
          • 2. Re: Could not create type: Oracle.Database.Extensions.OracleAppDomainFactor
            550248
            Hi! the ODT shouldn't be the problem, if i execute the function itsself in a sqlplus on the server, the problem is the same...
            so it isn't a problem of my local ODT...

            but if you want to know, i have installed this product (viewed on "Help=>About Microsoft Visual Studio"):
            Oracle Developer Tools for Visual Studio .NET Copyright (c) 2006, version 10.2.0.2.20
            • 3. Re: Could not create type: Oracle.Database.Extensions.OracleAppDomainFactor
              502182
              You are right that ODT should not be a problem when you are calling the .NET SP.

              But, I am concerned about ODT version used for deployment. If you use ODT 10.2.0.2.20 from VS 2005 then your .NET SP assembly will be referencing ODP.NET 10.2.0.2.20 for .NET 2.0 whereas if you use ODT 10.2.0.2.20 from VS.NET 2003 then your .NET SP assembly will be using ODP.NET 10.2.0.2.20 for .NET 1.0.

              Hence I am interested in knowing you VS.NET version also where your ODT is installed. Is it VS 2005?
              • 4. Re: Could not create type: Oracle.Database.Extensions.OracleAppDomainFactor
                550248
                ah... ok, i'm using Visual Studio .NET 2005 with ODT 10.2.0.2.20...
                already installed the Oracle database Extensions for .NET 2.0 and now trying around... upgrading again with the patch and so on...


                i hope, i'll get this...


                any other suggestions?
                • 5. Re: Could not create type: Oracle.Database.Extensions.OracleAppDomainFactor
                  502182
                  It means when you deploy a .NET SP DLL from VS2005, it will be using ODP.NET 2.x and ODT will generate .NET Stored Procedure in such a way that it must use ODP.NET 2.x.

                  Can you please check ODE 10.2.0.3 readme whether it support .NET stored procedures built with ODP.NET 2.x. It should be available in "Oracle_home\ODE.NET\doc" in your database server.
                  • 6. Re: Could not create type: Oracle.Database.Extensions.OracleAppDomainFactor
                    550248
                    with .NET SP DLL you mean a .NET single project DLL?
                    i have a project, but it refers other projects implemented in my solution, but the DLLs are getting deployed to...

                    i'm driving the Upgrade for the Patch(10.2.0.3) again, because i reinstalled many single components, so it can take a while...

                    my "oracle_home\ODE.NET\" folder doesn't contain a doc-folder... it only has a readme.exe and bin-folder...
                    • 7. Re: Could not create type: Oracle.Database.Extensions.OracleAppDomainFactor
                      550248
                      ok... i gave up...
                      now i'll set up the whole oracle again, from the bases on... i'll deinstall whole oracle, restart and delete the whole oracle-folder...

                      then i'll setup oracle new and completely follow the tasks on top of the forum. if the same error happens, i'll write again...

                      thx for help therefore...
                      • 8. Re: Could not create type: Oracle.Database.Extensions.OracleAppDomainFactory
                        550515
                        Hi!
                        I have this problem too.
                        I have deployed a simple .net sp sucessfully, but when i run it from vs2005, error occured:
                        ORA-20100: Could not create type: Oracle.Database.Extensions.OracleAppDomainFactory
                        ORA-06512: at "SYS.DBMS_CLR", line 152
                        ORA-06512: at "EXAM.GETDATA", line 6
                        ORA-06512: at line 1

                        The following are my install steps:
                        1. Install Oracle 10g R2 10.2.0.1 with Oracle Database Extensions for .NET(custom install) on server machine (Windows 2003 server standard edition). Only install software, not create database.
                        2. Install Oracle 10g R2 10.2.0.2 patch set.
                        3. User DBCA to Create a database, tick off “Oracle Database Extensions for .NET database”, using the default table space SYSAUX.
                        4. install ODE 10.2.0.2.20 on server machine.
                        5. Open sqlplus, use sys as sysdba to login, and run the script dbmsclr.plb.
                        6. Create a listener on server machine.
                        7. On client machine (Visual Studio 2005), install ODT 10.2.0.2.20.
                        8. Create a oracle database project, and write a simple .net sp.
                        9. Deploy the .net sp to oracle.
                        10. Run the sp and error occurred.

                        I have been disturbed by this problem for two days, and reinstall the whole environment for several times, but the error remains.

                        Help me!

                        Message was edited by:
                        apollo
                        • 9. Re: Could not create type: Oracle.Database.Extensions.OracleAppDomainFactory
                          502182
                          Hi Apollo,

                          It seems to be a problem of step "4. install ODE 10.2.0.2.20 on server machine.". Did you install ODE 10.2.0.2.20 for .NET 2.0? It is a must to have .NET 2.0 compatible ODE to work with .NET SP generated using VS2005 ODT. (Remember: ODE 10.2.0.2.20 for .NET 2.0 is a new component with this release.)

                          - SKJ
                          • 10. Re: Could not create type: Oracle.Database.Extensions.OracleAppDomainFactor
                            550248
                            after all i solved my problem with
                            * removing everything (and with everything i mean everything) oracle-specifics from my system
                            * rebooted
                            * removed the whole c:\oracle folder
                            * rebooted
                            * and started installing the whole thing again with following steps:

                            1. install the oracle 10g R2 (10.2.0.1.0) Enterprise Edition (not custom) with the option to create a database
                            2. installed the Oracle Database Extensions for .NET (contained in the installation version of oracle 10g)
                            3. upgraded the Oracle Database Extensions for .NET to version 10.2.0.2.20
                            (installed the .NET 2.0 framework and did not upgrade the 1.x)
                            4. activated the ODE
                            Start -> Programs -> Oracle -> Configuration and Migration Tools -> Database Configuration Assisten
                            tick off the Extensions for .NET
                            5. Open sqlplus with sys as sysdba and run the script dbmsclr.plb (located in oracle_home\rdbms\admin\)
                            6. configure the tnsnames.ora, sqlnet.ora and listener.ora as described in the bottom of this page:

                            http://www.oracle.com/technology/obe/10gr2_db_single/install/odpinst/odpinst_otn.htm

                            tnsnames.ora has 3 entries (entry for the client connection, one with ORACLR_CONNECTION_DATA, and one with the EXTPROC_CONNECTION_DATA)
                            listener.ora has 3 SID-Descriptions (one for the client connection, one with SID_NAME CLRExtProc and one with PLSExtProc)
                            sqlnet.ora (works with my config, but had never problems with it):
                            SQLNET.AUTHENTICATION_SERVICES= (NTS)
                            NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

                            now it works fine... i'll make a harddisk dump so that i'm sure, that i'll never have these problems again ;)

                            thx for help!

                            yours SJO
                            • 11. Re: Could not create type: Oracle.Database.Extensions.OracleAppDomainFactory
                              550515
                              Thanks, but I think my step 4 is correct. I have installed both ODE 10.2.0.2.20 for .NET 1.x and 2.x.
                              But I remember that in my installation, an error occurred for several times, about “Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe” not found, and I ignored.
                              So I copied gacutil.exe and gacutil.exe.config from client machine with vs2005 installed (so I can find these two files) to server machine, then reinstall the whole thing as my steps above.
                              At last, after deploying, the “Could not create type” error has gone, but comes another error:

                              ORA-20100: AppDomain could not be created for the specified security level
                              ORA-06512: at "SYS.DBMS_CLR", line 152
                              ORA-06512: at "HR.GETDATA", line 6
                              ORA-06512: at line 1

                              Is this a security problem? The server machine's harddisk is NTFS format.
                              And another question, why the installaion need the gacutil.exe? So, do I need to install .NET Framework 2.0 SDK before install Oracle 10g R2? Is the .NET Framework 2.0 SDK necessary for oracle to excute .NET SP on server machine?
                              • 12. Re: Could not create type: Oracle.Database.Extensions.OracleAppDomainFactory
                                502182
                                Are you sure that you did not get "This component requires .NET Framwork 2.x. ..." error message while installing "ODE 10.2.0.2.20 for .NET 2.X"?

                                Is .NET 2.0 framework properly installed in server machine?

                                It is a must to have .NET Framework 2.0 (i.e. only the runtime) installed in the server machine to run the .NET stored procedure deployed using ODT for VS2005. SDK installation on the server should not be required.

                                Please install .NET 2.0 framework in server and re-install "ODE 10.2.0.2.20 for .NET 2.X". Other option you may try is to install ".NET 2.0 SDK" in server and re-install "ODE 10.2.0.2.20 for .NET 2.X".
                                • 13. Re: Could not create type: Oracle.Database.Extensions.OracleAppDomainFactory
                                  550515
                                  Yes, I installed the .NET Framework 2.0.50727.42 on server machine, of course.
                                  Now I installed the .NET 2.0 SDK in addition.
                                  And during the whole installation of oracle 10g R2 10.2.0.1, patch set 10.2.0.2, and ODE 10.2.0.2.20 for .NET 2.x, no error occurred.
                                  But the "AppDomain could not be created for the specified security level" error remains.
                                  I have tried to deploy the SP in unsafe mode, but the error remains.

                                  Any other help?
                                  • 14. Re: Could not create type: Oracle.Database.Extensions.OracleAppDomainFactor
                                    502182
                                    This error would usually come if there is a problem in corresponding ODP.NET installation in server machine. Can you please re-install "Oracle Data Provider for .NET 10.2.0.2.20 for .NET 2.x" and try again.

                                    It still seems a GACing problem!
                                    1 2 Previous Next