Fluent Model Compiling error

5 posts, 0 answers
  1. gianbia
    gianbia avatar
    5 posts
    Member since:
    Feb 2007

    Posted 12 Aug 2014 Link to this post

    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 


  2. gianbia
    gianbia avatar
    5 posts
    Member since:
    Feb 2007

    Posted 12 Aug 2014 in reply to gianbia Link to this post

    Resolved,
    it was a horizontal hierarchies problem.

    Gianmaria
  3. DevCraft banner
  4. Viktor Zhivkov
    Admin
    Viktor Zhivkov avatar
    291 posts

    Posted 13 Aug 2014 Link to this post

    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.
     
  5. gianbia
    gianbia avatar
    5 posts
    Member since:
    Feb 2007

    Posted 13 Aug 2014 in reply to Viktor Zhivkov Link to this post

    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
  6. Viktor Zhivkov
    Admin
    Viktor Zhivkov avatar
    291 posts

    Posted 14 Aug 2014 Link to this post

    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.
     
Back to Top
DevCraft banner