Oracle Connector connection fails with Error: "The type initializer for 'Oracle.DataAccess.Client.OracleConnectionStringBuilder' threw an exception".

Oracle Connector connection fails with Error: "The type initializer for 'Oracle.DataAccess.Client.OracleConnectionStringBuilder' threw an exception".

book

Article ID: KB0075650

calendar_today

Updated On:

Products Versions
Spotfire Connector for Oracle All Versions

Description

TIBCO Spotfire Oracle connector fails to connect to Oracle data source

User-added image

Below is the detail error message which gets logged inside Spotfire Analyst logs:
---------------------------------------------------------------------------------------------------------
System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleConnectionStringBuilder' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'OraOps12.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at Oracle.DataAccess.Client.OpsInit.CheckVersionCompatibility(String version)
   at Oracle.DataAccess.Client.OracleInit.Initialize()
   at Oracle.DataAccess.Client.OracleConnectionStringBuilder..cctor()
   --- End of inner exception stack trace ---
   at Oracle.DataAccess.Client.OracleConnectionStringBuilder..ctor()
   at Spotfire.Dxp.Data.Adapters.Oracle.OracleAdapterConnection.BuildConnectionString(AdapterCredentialsValue credentials, OracleConnectionSettings oracleConnectionSettings)
   at Spotfire.Dxp.Data.Adapters.Oracle.OracleAdapterConnection.TestConnection(AdapterCredentialsValue credentials, OracleConnectionSettings settings)
   at Spotfire.Dxp.Forms.Data.Adapters.Oracle.OracleConnectionDialog.<>c__DisplayClass5.<OnConnect>b__2()
   at Spotfire.Dxp.Forms.Data.Access.AsynchronousTaskManager.<>c__DisplayClass3.<Start>b__0()
   at System.Threading.Tasks.Task.Execute()
--------------------------------------------------------------------------------------------------------------

Issue/Introduction

Oracle Connector connection fails with the error: "The type initializer for 'Oracle.DataAccess.Client.OracleConnectionStringBuilder' threw an exception".

Environment

All Supported OS

Resolution

Oracle connector supports connection to Oracle 11/12 and above (Oracle 11gR1, 11gR2, 12c) version(s) and the above error indicates that the Oracle database version is older then the supported one. To verify the Oracle database version, run the following command in an Oracle client.

SELECT * FROM V$VERSION

To resolve this issue, request your DBA to upgrade Oracle database to a supported version.Till the time database version gets updated, you can connect to an existing Oracle database by making use of Information Designer (information link).

Additional Information

https://docs.tibco.com/pub/spotfire/general/sr/GUID-0E4DC24F-8D6A-4C1B-8544-5DE9D503B76E.html