2 Replies Latest reply: Jun 19, 2012 1:29 AM by 940552 RSS

    Unable to Deploy OCCI Application, Environment Creation Problem


      I am unable to execute my OCCI application in a target system.

      I have done the following deployment steps in the target system.
      1) Downloaded "Oracle Instant Client Basic" and "SQLPlus" packages.
      2) Added the unzipped location to the system PATH variable.
      3) I am able to connect Oracle Server Database using "sqlplus" command.

      While executing my OCCI application, the oracle environment is not creating. It is giving exception with junk error codes.

      "Unable to Create Oracle Environment, └±↕"

      bool CConnection::CreateEnvironment()
                /* create oracle environment */
                m_oOracleEnvironment = oracle::occi::Environment::createEnvironment(oracle::occi::Environment::DEFAULT);
           }catch(oracle::occi::SQLException &e){
                m_StrError = "Unable to Create Oracle Environment, ";
                m_StrError += e.getMessage();
                return false;
           return true;

      Note: When i am installing "Instant Client" package from the Oracle Client UI setup, it is working fine.

      I have searched in the forum, i got the following un-answered links.
      cannot create environment in another computer
      Re: createEnvironment error

      Please, let me know if anything could be added to make work my OCCI application.
        • 1. Re: Unable to Deploy OCCI Application, Environment Creation Problem
          You don't mention your OS or compiler. C++ is notoriously inflexible with it comes to libraries. The OCCI libraries must match the compiler you are using for your project.

          For Windows: Double check to ensure your version of MSVC compiler matches the oraocci dll you are using. For example, Oracle 11.2 ships with libraries for msvc 8 and 9. If you are using msvc 10 (Visual Studio 10), you'll need to get the latest occi dlls. You can obtain them from:


          For the past couple of years, we've been using a OCCI-MSVCgateway, a "shim" that we place between our C++ application and OCCI. This code is small and efficient, and it decouples our code from OCCI versions. Simply drop the gateway dll (plus the corresponding oraocci dll) in the oracle BIN directory in the PATH. I highly recommend it for any project using OCCI.

          • 2. Re: Unable to Deploy OCCI Application, Environment Creation Problem
            Hi rubin,

            Thank you very much for answering my question.

            Please find the following details.

            OS : Windows XP SP3
            Compiler : msvc8 (Visual Stdio 2005) compiler.

            I have taken the run-time DLLs from folder "Oracle Instant Client 11.2 --> msvc8".

            Edited by: 937549 on Jun 18, 2012 11:29 PM