4 Replies Latest reply: Apr 25, 2014 3:16 AM by Plomong RSS

    Class Not Registered when connecting to Express Edition

    Plomong


      On my laptop I have successfully installed both XE 11.2.0.2.1 and SQL Developer 4.0.1.

       

      TNSNAMES.ORA is correctly configured, so both SQLPlus and SQL Developer have access to the database, I can create tablespaces, users, tables, etc. SQLDeveloper connects using TNSNAMES.ORA.

      XE =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = PORTLEKU)(PORT = 1521))
          (CONNECT_DATA =
            (SERVER = DEDICATED)
            (SERVICE_NAME = XE)
          )
        )

      FITTING_SERVICE =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = PORTLEKU)(PORT = 1521))
          (CONNECT_DATA =
            (SERVER = DEDICATED)
            (SERVICE_NAME = XE)
          )
        )

      However, when I run my application program, "Fitting.EXE", it gives me a failure message "Class not registered" when I execute Connection.DoConnect.

      The connection string is configured to connect by OLE DB, using Fitting_Service as the data source. This is known to work, as the program works correctly on my desktop PC which runs Oracle 10g with OLE DB, and is used to compile and link the executable (The laptop has no development software).

       

      My first thoughts on this problem are as follows:

        1) I need ODAC on the laptop. But that creates a new Oracle Home, doesn't it ??  So if I configure the TNSNAMES.ORA in that new folder tree, how can it reach the database server on that same PC, a server which already has a listener configured, and known to be working as SQLDeveloper can see the database. There is already a TNSNAMES.ORA file in the server folder tree, and correctly configured. If I install a new listener, won't it somehow override the existing one, maybe breaking the connection that SQLDeveloper uses ???

       

        2) The Fitting.EXE program was linked on a system with 10g, and the corresponding OLE DB software. Maybe it cannot connect to an 11g database, or through an 11g OLE DB if I install it from ODAC 11.2.0.2.1 ??? I have not yet tried installing ODAC as I was afraid of upsetting something that already works -- see 1) above.

       

      As you can probably guess I'm a bit lost on this, and need someone to point me in the right direction instead of groping around in the dark.

       

      --

      JF

        • 1. Re: Class Not Registered when connecting to Express Edition
          clcarter

          A tnsnames.ora file is for configuring the client, if its being used. Nearly every database install includes the client bits, and the folder %ORACLE_HOME%/network/admin is the location for configuring the client.

           

          Adding the FITTING_SERVICE tns alias in the database OH/network/admin/tnsnames.ora file probably does not help for this particular configuration, and ODBC has its own client setup particulars, not a tnsnames.ora file. And separate programs to administer the X86 or X64 (32 or 64 bit) ODBC clients.

           

          And the 3.0.04 sqldeveloper I have does not hava a tnsnames.ora file at all.

           

          A "class not registered" error could be a Java thing, maybe a needed .jar file isn't in %CLASSPATH%, or something like that. If its even getting connected to the database at all, but that is just guessing. Usually JDBC needs to have all the pieces of information a tnsnames.ora entry has, but ... of course a slightly different format as well- usually a 'host:port:service_name' connect string.

          • 2. Re: Class Not Registered when connecting to Express Edition
            Plomong

            clcarter escribió:

             

            A tnsnames.ora file is for configuring the client, if its being used. Nearly every database install includes the client bits, and the folder %ORACLE_HOME%/network/admin is the location for configuring the client.

            Does XE include a client ??? I assume it does, even though there is no client sub-folder in the Oracle Home folder tree.

             

             

             

            clcarter escribió:

             

             

            Adding the FITTING_SERVICE tns alias in the database OH/network/admin/tnsnames.ora file probably does not help for this particular configuration, and ODBC has its own client setup particulars, not a tnsnames.ora file. And separate programs to administer the X86 or X64 (32 or 64 bit) ODBC clients.

             

            SQLDeveloper uses the Fitting_Service tns alias to access the database without any problem, so it does seem to be necessary.

             

            I am not using ODBC, and all software and programs are 32-bits. Database access in the Fitting.EXE program uses Microsoft ADO through the Oracle OLE DB Provider. Compiled and linked on a system with Oracle 10g installed. Uses the Fitting_Service tns alias on that system without problems.

             

            On the laptop, however, it gives an error "class not registered" when trying to open the OLE DB connection.

             

            Could it be I need to install ODAC 11.2.0.2 and add the tns alias into the new client Oracle Home /.../network/admin TNSNAMES.ORA file ??? That is one of my questions. I don't want to mess up the laptop doing something experimental that later cannot be undone. I'd prefer confirmation that that is the correct solution before proceding.

             

            Thanks,

             

            Plomong

            • 3. Re: Class Not Registered when connecting to Express Edition
              clcarter
              Does XE include a client ... there is no client sub-folder in the Oracle Home ...

               

              Yes (nearly? most all?) every database install includes the networking client bits, there should be a .../network/admin folder in the %ORACLE_HOME%, and a host may also have more than one Oracle install as well. But the limitations for an XE install (one host, one installation) narrow down (or expand) the complications of managing multiple oracle installs on a host.

               

              ODAC? Sorry, other folks here may have better experience and insight for that install.

               

              But here's a URL to the 12.x ODAC install instructions ODAC 12c Release 2 installation instructions</title><meta name="Title" content="ODAC 12c Release… at the section under "TNSNAMES Setup" they call for *copying* a tnsnames.ora file, which can work fine, as long as other tns alias entries have not yet been configured in the ODAC OH. Otherwise, better to just merge (paste) just the desired tns entries needed, the particular stanzas that have a needed alias.

              • 4. Re: Class Not Registered when connecting to Express Edition
                Plomong

                Success, at last !!!!

                 

                Taking your hint about copying the tnsnames alias into the client tnsnames file, I installed ODAC112021 and did just that. It works, surprisingly !!!!

                 

                Problem solved. Thanks.

                 

                Plomong