Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vikkidurai91
Helper I
Helper I

object reference not set to an instance of an object Error

Hello

 

We have latest version from Microsoft store and we receive below error when trying to connect to Oracle connector:

 

Details: "An error happened while reading data from the provider: 'Object reference not set to an instance of an object.'"

 

We have ODAC 12.1.0.2 and Oracle version 11g. We also tried to upgrade latest version of ODAC but no luck.

 

We also tried to copy a file oraons.dll from C:\app\client\admin\product\12.1.0\client_1\ to C:\app\client\admin\product\12.1.0\client_1\bin, which gives an error TNS connect.

 

Could you please help as we need to Store version for autoupgrade and cannot use Web Version.

 

Thanks in advance.

 

Regards

Vignesh

 

6 REPLIES 6
PedroJunqueira
Frequent Visitor

Hi @v-lionel-msft ,

 

I am trying to connect Oracle Automomus DB (Cloud) to dataflow gen2 in Fabric.

 

I did all the set up following the MS learning instructions from here

I was able to connect to the DB in my PBI desktop and all worked fine.

I am now trying to connect using DataFlowGen2 to the same db using a Data Gateway and I am getting this message.

 

"An exception occurred: An error happened while reading data from the provider: 'Object reference not set to an instance of an object.' (Session..."

 

PedroJunqueira_0-1709608561725.png

 

Any ideas?

 

Regards

 

Pedro

romankris
New Member

An Object is an instance of a Class , it is stored some where in memory. A reference is what is used to describe the pointer to the memory location where the Object resides. The message "object reference not set to an instance of an object" means that you are referring to an object the does not exist or was deleted or cleaned up. It's usually better to avoid a NullReferenceException than to handle it after it occurs. To prevent the error, objects that could be null should be tested for null before being used.

if (mClass != null)
{
// Go ahead and use mClass
mClass.property = ...
}
else
{
// Attempting to use mClass here will result in NullReferenceException
}

A NullReferenceException typically reflects developer error and is thrown in the following scenarios:

  • Forgotten to instantiate a reference type.
  • Forgotten to dimension an array before initializing it.
  • Is thrown by a method that is passed null.
  • Get a null return value from a method, then call a method on the returned type.
  • Using an expression to retrieve a value and, although checking whether the value is null.
  • Enumerating the elements of an array that contains reference types, and attempt to process one of the elements.

 

lbendlin
Super User
Super User

On the same machine can you use Toad or SQL*Plus to connect to your Oracle database?

Hello

 

Yes I can connect to Toad and SQL developer. Infact, I can connect with latest web version, but not with Store version.

 

Thanks

Vignesh

Hi @vikkidurai91 ,

 

Please refer to the link.

POWERBI - Object reference not set to an instance of an object 

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @vikkidurai91 ,

 

Has your problem been solved?

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.