'Object not set to a instance..' error in Entity Developer using dotConnect Oracle

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
MarkZenith
Posts: 8
Joined: Mon 23 Jun 2014 10:25

'Object not set to a instance..' error in Entity Developer using dotConnect Oracle

Post by MarkZenith » Mon 23 Jun 2014 14:51

I am getting an 'Object reference' error at the 'generate from database' step in the Entity Developer Create Model Wizard.

The 'Retrieving Metadata' message appears, and then a window pops up with an OK box and the message 'Object reference not set to an instance of an object'.

I believe this is caused by something in the database schema that the DevArt code is not happy with, as this happens on all machines with dotConnect installed, and only happens against a specific database. There are two different snapshots of the same database running on different virtual servers. The latest snapshot causes the error, but the earlier one does not. Both servers are running the same operating system and version of oracle.

Is there any diagnosis tools that can shed light on what particular aspect of this database is causing the issue?

All machines are running Windows 7 64 bit with DevArt dotConnect for Oracle Professional version 7.9.333 (23-Sep-2013).

The database version is from the command 'SELECT * FROM V$VERSION' is:

Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for 64-bit Windows: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

Kind regards,
Mark

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: 'Object not set to a instance..' error in Entity Developer using dotConnect Oracle

Post by Shalex » Mon 23 Jun 2014 15:16

Please upgrade to the latest (8.4.181) version of dotConnect for Oracle. If you don't have access to the licensed 8.4.181, check the functionality of the corresponding trial: http://www.devart.com/dotconnect/oracle/download.html.

Does this help?

MarkZenith
Posts: 8
Joined: Mon 23 Jun 2014 10:25

Re: 'Object not set to a instance..' error in Entity Developer using dotConnect Oracle

Post by MarkZenith » Mon 23 Jun 2014 15:22

Thanks for the quick response.

A dotConnect for Oracle Professional license was purchased by the company less that an year ago, would the subscription include an upgrade to version 8?

AnastasiyaD
Devart Team
Posts: 27
Joined: Tue 18 Mar 2014 15:36

Re: 'Object not set to a instance..' error in Entity Developer using dotConnect Oracle

Post by AnastasiyaD » Tue 24 Jun 2014 06:56

Hello Mark,

If your subscription is still active, you are eligible to download the latest product version.

Due to security reasons, please send us your license number for dotConnect for Oracle to [email protected] so that we can check and better assist you.

Thank you.

MarkZenith
Posts: 8
Joined: Mon 23 Jun 2014 10:25

Re: 'Object not set to a instance..' error in Entity Developer using dotConnect Oracle

Post by MarkZenith » Tue 24 Jun 2014 10:11

I have upgraded to version 8 via the dcoracle84pro.exe but still get the error.

The Entity Developer stand alone application shows 5.7.377 as the version after upgrade, is that correct?

The error occurs for both direct mode and using the Oracle TNS name settings.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: 'Object not set to a instance..' error in Entity Developer using dotConnect Oracle

Post by Shalex » Tue 24 Jun 2014 16:22

1. Please give us a detailed call stack of the error with all inner exceptions. You can obtain it by connecting from Visual Studio (Debug | Attach to Proccess) to the instance of Entity Developer (where you are running Create Model Wizard). Before attaching don't forget to make these settings in your Visual Studio: a) in the (Debug | Exceptions) window select Common Language Runtime Exceptions; b) in the (Tools | Options) window, Debugging | General - clear Enable Just My Code (Managed Only).

2. You deployed a snapshot, which causes the error, only on one server, didn't you? Could you please try to deploy it again (on the same or another server) to confirm that the problem persists and it is a snapshot-specific? Is it possible to send us this snapshot?

MarkZenith
Posts: 8
Joined: Mon 23 Jun 2014 10:25

Re: 'Object not set to a instance..' error in Entity Developer using dotConnect Oracle

Post by MarkZenith » Wed 25 Jun 2014 08:40

i'm not part of the infrastructure team, but I believe the database servers are all based on the same VM template, so the only difference between servers aside from name and IP adresses is the database schema, which tend to be managed by RedGate software.

I can't send a snapshot file due to the sensitive nature of the data and the file size. I don't expect the issue is a deployment problem, more likely that there is an edge case in the schema that DevArt cannot handle.

I attached a debugger to the EntityDeveloper.exe and the exception is thrown at EntityDeveloper.DbMetaData.MetaDataProvider.FillCrossSchemaRelations(List`1 schemas)

Below is the error message, where the inner exception is null:

System.NullReferenceException occurred
HResult=-2147467261
Message=Object reference not set to an instance of an object.
Source=EntityDeveloper.Common
StackTrace:
at EntityDeveloper.DbMetaData.MetaDataProvider.FillCrossSchemaRelations(List`1 schemas)
InnerException:

At this point I can't get any more details as I do not have the EntityDeveloper.Common.pdb file.

The call stack is shown below:

EntityDeveloper.Common.dll!EntityDeveloper.DbMetaData.MetaDataProvider.FillCrossSchemaRelations(System.Collections.Generic.List<EntityDeveloper.DbSchema> schemas) + 0x2e5 bytes
EntityDeveloper.Common.dll!EntityDeveloper.DbMetaData.Specific.h.b(EntityDeveloper.DbSchema A_0) + 0x58 bytes
EntityDeveloper.Common.dll!EntityDeveloper.DbObjectsProvider.b(EntityDeveloper.Vendor A_0, EntityDeveloper.DbSchema A_1) + 0x26 bytes
EntityDeveloper.Common.dll!EntityDeveloper.LazyDbSchema.Tables.get() + 0x33 bytes
EntityDeveloper.exe!EntityDeveloper.cr.d() + 0xa9 bytes
EntityDeveloper.exe!EntityDeveloper.cr.b() + 0x41 bytes
EntityDeveloper.exe!EntityDeveloper.g0.k() + 0x27 bytes
EntityDeveloper.exe!EntityDeveloper.en.a(object A_0, System.ComponentModel.DoWorkEventArgs A_1) + 0x49 bytes
System.dll!System.ComponentModel.BackgroundWorker.OnDoWork(System.ComponentModel.DoWorkEventArgs e) + 0x77 bytes
System.dll!System.ComponentModel.BackgroundWorker.WorkerThreadStart(object argument) + 0x4b bytes
[Native to Managed Transition]

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: 'Object not set to a instance..' error in Entity Developer using dotConnect Oracle

Post by Shalex » Thu 26 Jun 2014 10:58

1. Tell us the ORM framework (Entity Framework/LinqConnect) you are working with.
2. Thank you for the provided information. We will investigate the problem and notify you about the result as soon as possible.

MarkZenith
Posts: 8
Joined: Mon 23 Jun 2014 10:25

Re: 'Object not set to a instance..' error in Entity Developer using dotConnect Oracle

Post by MarkZenith » Fri 27 Jun 2014 08:02

Thanks, we are using Entity Framework 4.0

MarkZenith
Posts: 8
Joined: Mon 23 Jun 2014 10:25

Re: 'Object not set to a instance..' error in Entity Developer using dotConnect Oracle

Post by MarkZenith » Fri 04 Jul 2014 08:06

Is there any progress on this issue? Thanks.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: 'Object not set to a instance..' error in Entity Developer using dotConnect Oracle

Post by Shalex » Wed 09 Jul 2014 14:36

We have implemented some changes which should fix the problem. We are planning to release the new public build of dotConnect for Oracle this week. We will notify you when it is available for download.

MarkZenith
Posts: 8
Joined: Mon 23 Jun 2014 10:25

Re: 'Object not set to a instance..' error in Entity Developer using dotConnect Oracle

Post by MarkZenith » Thu 10 Jul 2014 09:19

Thanks, will look forward to trying it.

The major difference between the problem database and others is the use of synonyms, perhaps that is the root of the problem?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: 'Object not set to a instance..' error in Entity Developer using dotConnect Oracle

Post by Shalex » Thu 10 Jul 2014 14:17

New build of dotConnect for Oracle 8.4.201 is available for download now.
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).

Please try it and notify us about the result.

MarkZenith
Posts: 8
Joined: Mon 23 Jun 2014 10:25

Re: 'Object not set to a instance..' error in Entity Developer using dotConnect Oracle

Post by MarkZenith » Thu 10 Jul 2014 14:57

That's great, thank you, it does indeed fix the problem!

Thanks for the quick turn around.

Post Reply