none
System.Exception: OCIEnvCreate failed with return code -1 RRS feed

  • Question

  • Hi all,

    I am trying to invoke webservice which executes one oracle procedure.

    But on invoking this webservice i am getting this error.

     

    'System.Exception: OCIEnvCreate failed with return code -1'

     

    I checked security permissions on my Oracle_Home folder. I am logging as Admin user for this and Oracle_Home folder  and subfolders has full control to admin user.

    I did this permission setup and restart computer 2-3 times. Even doing this permission setup correctly i am getting this error while invoking webservice.  

     

    Error:

    System.Exception: OCIEnvCreate failed with return code -1 but error message text was not available.
       at System.Data.OracleClient.OciHandle..ctor(OciHandle parentHandle, HTYPE handleType, MODE ocimode, HANDLEFLAG handleflags)
       at System.Data.OracleClient.OciEnvironmentHandle..ctor(MODE environmentMode, Boolean unicode)
       at System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName)
       at System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions)
       at System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
       at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.OracleClient.OracleConnection.Open()
       at Service.GetsData(String v_test)
    
     
    Thank you
    Friday, June 8, 2007 7:49 PM

All replies

  • Hello,

     

    Have you checked to see that your oracle client is up to date?  It seems that this error tends to happen when the oracle client is out of date relative to the server version.

     

    Please let us know if updating your oracle client helps,

     

    Thanks,

     

    John (MSFT)

    Friday, June 8, 2007 9:07 PM
  • Hi,

     

    i am using oracle database 10g  v10.1.0.5.0 and Oracle client 10.1.0.2.0. 

    And this webservice was working fine it was connecting to database.

     

    Database and Client is on same machine.

     

    still i am getting this error.

     

    As you said, Oracle client is out of date. how can i know this?

     

     

    Thank you

     

     

     

     

     John Gordon wrote:

    Hello,

     

    Have you checked to see that your oracle client is up to date?  It seems that this error tends to happen when the oracle client is out of date relative to the server version.

     

    Please let us know if updating your oracle client helps,

     

    Thanks,

     

    John (MSFT)

    Monday, June 11, 2007 2:28 PM
  • Now it is ok.

     

    Actually my database wasn't started well. I found error like Database initialisation in progress.

    so i shutdown & startup database again.

     

    now webserviceis working fine.

     

    Thank you  

    Monday, June 11, 2007 9:36 PM