Object reference not set error, inside FetchEntityCollection

Posts   
 
    
Lundsby
User
Posts: 6
Joined: 20-Oct-2004
# Posted on: 29-Dec-2008 13:53:46   

I am using the Adapter model, to fetch an EntityCollection it works very well on my machine and when during unittests on the compile server. However sometimes in production it fails with the following the stacktrace below.

After refreshing the app, it works again. Any hint towards what is happening or what we doing wrong would be greatly appreciated.

System.NullReferenceException: Object reference not set to an instance of an object. Generated: Mon, 29 Dec 2008 07:21:33 GMT

System.NullReferenceException: Object reference not set to an instance of an object. at SD.LLBLGen.Pro.ORMSupportClasses.PersistenceCore.ProduceInitialDuplicateDetectionStores(IEntityCollectionCore collection, Dictionary2& objectHashtable, Dictionary2& objectHashes) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.ExecuteMultiRowRetrievalQuery(IRetrievalQuery queryToExecute, IEntityFactory2 entityFactory, IEntityCollection2 collectionToFill, IFieldPersistenceInfo[] fieldsPersistenceInfo, Boolean allowDuplicates, IEntityFields2 fieldsUsedForQuery) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollectionInternal(IEntityCollection2 collectionToFill, IRelationPredicateBucket& filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, ExcludeIncludeFieldsList excludedIncludedFields, Int32 pageNumber, Int32 pageSize) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchPrefetchPath(IEntityCollection2 rootEntities, IRelationPredicateBucket filterBucket, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPrefetchPath2 prefetchPath, Boolean forceParameterizedPPath) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchPrefetchPath(IEntityCollection2 rootEntities, IRelationPredicateBucket filterBucket, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPrefetchPath2 prefetchPath) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchPrefetchPath(IEntityCollection2 rootEntities, IRelationPredicateBucket filterBucket, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPrefetchPath2 prefetchPath, Boolean forceParameterizedPPath) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchPrefetchPath(IEntityCollection2 rootEntities, IRelationPredicateBucket filterBucket, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPrefetchPath2 prefetchPath) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchPrefetchPath(IEntityCollection2 rootEntities, IRelationPredicateBucket filterBucket, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPrefetchPath2 prefetchPath, Boolean forceParameterizedPPath) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollection(IEntityCollection2 collectionToFill, IRelationPredicateBucket filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPrefetchPath2 prefetchPath, ExcludeIncludeFieldsList excludedIncludedFields, Int32 pageNumber, Int32 pageSize) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollection(IEntityCollection2 collectionToFill, IRelationPredicateBucket filterBucket, IPrefetchPath2 prefetchPath) at EasyFlow.Backend.Framework.Domain.Content.Services.NodeTypeServiceHelpers.DataAccess.GetNodeTypesByPredicate(IPredicate predicate, NodeTypeFactory nodeTypeFactory) in c:\SourceCode\EasyFlow\Backend\Framework\Common\Content\Services\NodeTypeServiceHelpers\DataAccess.cs:line 49 at EasyFlow.Backend.Framework.Domain.Content.Services.NodeTypeFactory.GetAllNodeTypesDirectly() in c:\SourceCode\EasyFlow\Backend\Framework\Common\Content\Services\NodeTypeFactory.cs:line 97 at EasyFlow.Backend.Framework.Domain.Content.Services.NodeTypeInMemoryCache.NodeTypeCacheStruct..ctor(NodeTypeFactory factory) in c:\SourceCode\EasyFlow\Backend\Framework\Common\Content\Services\NodeTypeInMemoryCache.cs:line 104 at EasyFlow.Backend.Framework.Domain.Content.Services.NodeTypeInMemoryCache.get_NodeTypeCache() in c:\SourceCode\EasyFlow\Backend\Framework\Common\Content\Services\NodeTypeInMemoryCache.cs:line 28 at EasyFlow.Backend.Framework.Domain.Content.Services.NodeTypeInMemoryCache.Get(Guid id) in c:\SourceCode\EasyFlow\Backend\Framework\Common\Content\Services\NodeTypeInMemoryCache.cs:line 66 at EasyFlow.Backend.Framework.Domain.Content.Services.NodeTypeFactory.GetById(ResourceRequirement requirement, NodeTypeResourceId id) in c:\SourceCode\EasyFlow\Backend\Framework\Common\Content\Services\NodeTypeFactory.cs:line 164 at EasyFlow.Backend.Framework.Domain.Content.Services.NodeService.EnsureProperties(Node node) in c:\SourceCode\EasyFlow\Backend\Framework\Common\Content\Services\NodeService.cs:line 1764 at EasyFlow.Backend.Framework.Domain.Content.Services.NodeService.FetchFromDbUsingNodeCache(ResourceRequirement requirement, ICollection1 ids) in c:\SourceCode\EasyFlow\Backend\Framework\Common\Content\Services\NodeService.cs:line 628 at EasyFlow.Backend.Framework.Domain.Content.Services.NodeService.FetchFromDb(ResourceRequirement requirement, ICollection1 ids) in c:\SourceCode\EasyFlow\Backend\Framework\Common\Content\Services\NodeService.cs:line 444 at EasyFlow.Backend.Framework.Domain.Content.Services.NodeService.GetById(ResourceRequirement requirement, Guid id) in c:\SourceCode\EasyFlow\Backend\Framework\Common\Content\Services\NodeService.cs:line 426 at EasyFlow.WebApplications.Frontend.Global.GetRootContentNode(HttpContext context) in c:\SourceCode\EasyFlow\WebApplications\Frontend\Global.asax.cs:line 357 at EasyFlow.WebApplications.Frontend.Presentation.MarkupHandler.ProcessRequest(HttpContext context) in c:\SourceCode\EasyFlow\WebApplications\Frontend\Presentation\MarkupHandler.ashx.cs:line 62 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 29-Dec-2008 15:45:23   

Please provide the runtime library version you are using.

Lundsby
User
Posts: 6
Joined: 20-Oct-2004
# Posted on: 29-Dec-2008 15:48:47   

My SD.LLBLGen.Pro.ORMSupportClasses.NET20 dll is version 2.6.0.0 the runtime version number of this is v2.0.50727. I hope I have supplied the correct info ?

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 29-Dec-2008 15:56:18   

Unfortunatly these numbers are not correct, please check the link I've posted to get the correct RTL version number.

Lundsby
User
Posts: 6
Joined: 20-Oct-2004
# Posted on: 29-Dec-2008 16:06:29   

I think the version is 2.6.8.624, is this correct ? It's what it says under file version.

Further more I am using Sql Server 2000.

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 29-Dec-2008 16:14:51   

Yes that's correct, but it's an old runtime, and many things have been enhanced ever since. Would you please try downloading and using the latest available version.