Forum Discussion
Oracle connection error: Object reference not set to an instance
This is not the case with 64-bit PBI desktop, however. It seems to be a unique snowflake in a sense, that it does not use PATH for locating the driver. I believe it requires the driver to be installed in GAC - basically a directory for shared DLLs and other assemblies located under %WINDIR%\Microsoft.NET\assembly. When Oracle universal installer prompts whether to place the driver in GAC and configured on machine level, select yes. If using Xcopy version, use configure.bat in Oracle install directory to place the driver there.
While the above holds true for the version from Microsoft Store, it appears the version downloadable from https://www.microsoft.com/en-us/download/details.aspx?id=45331 works fine (both February 2018). So finally, I have the driver installed from Xcopy as described in my previous message and I'm able to connect to the Oracle DB in 64-bit PBI Desktop, too.
My take on the situation is that MS Store version disregards PATH and goes straight to GAC and fails. The "direct download" searches PATH first and then goes to GAC - if I remove my ODAC directory from PATH, this one throws the same ‘Object reference...' exception.
If anyone has managed to get the 64-bit version from Microsoft Store working with Oracle, it would be interested to know how.
Curious to see if anyone has a definitive resolution to this issue. Here is my scenario:
- Using laptop A with Oracle drivers installed, I connect VPN to client system
- I open Power BI x64 and open a PBIX model. I can refresh data connected to the client's Oracle database server, using Database level credentials.
All is good so far.
- Using laptop B with same version of Oracle drivers installed, I connect to same VPN using same credentials.
- The TNSNAMES.ORA file is copied to appropriate place on machine B
- I open the same Power BI PBIX file, but this time a data refresh fails.
- I assume it is due to the fact that the Oracle credentials are not saved.
- I start a clean, new Power BI model
- I get into Data Source Settings and delete any and all Oracle connections
- Starting fresh, I create a connection to Oracle, specify the same server, user and password.
- I get the error: "An error happened while reading data from the provider: 'Object reference not set to an instance of an object' "
Any help would be appreciated. Thanks in advance.