This is a migrated thread and some comments may be shown as answers.

Fluent Model Compiling error

4 Answers 39 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
gianbia
Top achievements
Rank 1
gianbia asked on 12 Aug 2014, 01:51 PM
When I compile a fluent model I get this 2 errors:
Error 79 Object reference not set to an instance of an object.
ExceptionString:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.OpenAccess.Metadata.Fluent.AssociationItemFactory.CreateAndAddConstraint(MetaTable sourceTable, IList`1 columns, Type inverseEntityType, MetadataContainer metadataContainer, FluentMetadataSource fluentMappingSource)
   at Telerik.OpenAccess.Metadata.Fluent.DefaultForeignKeyAssociationFactory.AddMetaConstraint(FluentMetadataSource fluentMappingSource, MetadataContainer metadataContainer)
   at Telerik.OpenAccess.Metadata.Fluent.NavigationPropertyConfiguration.AddRelationalItem(FluentMetadataSource fluentMappingSource, MetadataContainer metadataContainer, MetaTable table)
   at Telerik.OpenAccess.Metadata.Fluent.MappingConfiguration.AddMasterAssociationMapping(FluentMetadataSource fluentMappingSource, MetadataContainer metadataContainer)
   at Telerik.OpenAccess.Metadata.Fluent.FluentMetadataSource.ProcessAssociations(MetadataContainer metadataContainer)
   at Telerik.OpenAccess.Metadata.Fluent.FluentMetadataSource.CreateModel()
   at Telerik.OpenAccess.Metadata.Fluent.FluentMetadataSource.GetModelCore(MetadataContainer old)
   at Telerik.OpenAccess.Sdk.Enhancer.Enhancer.CrossDomainRunImpl(AssemblyLoader assemblyLoader)
   at Telerik.OpenAccess.Sdk.Enhancer.EnhancerBase.CrossDomainRun() 

Error 86 System.NullReferenceException: Object reference not set to an instance of an object.
   at OpenAccessRuntime.Relational.metadata.RelationalClass.getTables(PureSet`1 tables)
   at OpenAccessRuntime.Relational.metadata.RelationalMetaData.getTables(Boolean all)
   at OpenAccessRuntime.Relational.RelationalMetaDataBuilder.preBuildFetchGroupsHook(DataObjectsRoot combined)
   at OpenAccessRuntime.metadata.MetaDataBuilder.buildMetaData(DataObjectsRoot[] roots, Boolean ignoreNoClasses)
   at OpenAccessRuntime.Relational.RelationalMetaDataBuilder.buildMetaData(DataObjectsRoot[] roots, Boolean ignoreNoClasses)
   at OpenAccessRuntime.Relational.RelationalStorageManagerFactory..ctor(StorageManagerFactoryBuilder b)
   at OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createSmfForURL() 

 How I can find the error inside the model?

Thanks a lot.

Gianmaria 


4 Answers, 1 is accepted

Sort by
0
gianbia
Top achievements
Rank 1
answered on 12 Aug 2014, 03:55 PM
Resolved,
it was a horizontal hierarchies problem.

Gianmaria
0
Viktor Zhivkov
Telerik team
answered on 13 Aug 2014, 08:06 AM
Hi Gianmaria,

I am glad that you were able to identify and resolve the issue.
I would like to ask you for some details about the steps that you took to trigger the NullReferenceException and the steps that you have to do in order to fix your model.
NullReference exceptions are major annoyance that usually can be fixed easily when you know the right setup and sharing information how it appeared will allow us to fix it in one of our next releases.

Regards,
Viktor Zhivkov
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
0
gianbia
Top achievements
Rank 1
answered on 13 Aug 2014, 08:16 AM
Hi Viktor ,
for the first error there was 2 orrizzontal hierarchies without a defined table mapping.

For the second one, in the rlinq file, there was a table mapping not anchored at a domain Class.

Gianmaria
0
Viktor Zhivkov
Telerik team
answered on 14 Aug 2014, 10:16 AM
Hello Gianmaria,

Thank you for the provided details.
I hope you don't mind if we contact you back here in this thread if we need any further details to reproduce the issue.

Regards,
Viktor Zhivkov
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
Tags
General Discussions
Asked by
gianbia
Top achievements
Rank 1
Answers by
gianbia
Top achievements
Rank 1
Viktor Zhivkov
Telerik team
Share this question
or