MongOData icon indicating copy to clipboard operation
MongOData copied to clipboard

System.ArgumentNullException: Value cannot be null, parameter name itemType

Open kako-nawao opened this issue 10 years ago • 2 comments

Hello again,

Test db worked OK, so I tried the main db and got that error. I added a bunch of docs in the test db but could not duplicate it, things seem to mostly work (there's an issue with some field names starting with underscores). Maybe it's some old, funky data we have. I will keep trying tomorrow, hopefully I will be able to duplicate it and provide something more useful.

The stacktrace:

   at System.Data.Services.WebUtil.CheckArgumentNull[T](T value, String parameterName)
   at System.Data.Services.Providers.ResourceType.GetCollectionResourceType(ResourceType itemType)
   at DataServiceProvider.DSPMetadata.AddCollectionProperty(ResourceType resourceType, String name, ResourceType itemType)
   at DataServiceProvider.DSPMetadata.AddCollectionProperty(ResourceType resourceType, String name, Type itemType)
   at Mongo.Context.MongoMetadataCache.AddCollectionProperty(ResourceType resourceType, String propertyName, Type providerType)
   at Mongo.Context.MongoMetadata.RegisterArrayProperty(MongoContext context, ResourceType collectionType, BsonElement element)
   at Mongo.Context.MongoMetadata.AddResourceProperty(MongoContext context, String collectionName, ResourceType collectionType, BsonElement element, Boolean treatObjectIdAsKey)
   at Mongo.Context.MongoMetadata.RegisterResourceProperty(MongoContext context, ResourceType resourceType, BsonElement element)
   at Mongo.Context.MongoMetadata.AddDocumentType(MongoContext context, String collectionName, BsonDocument document, ResourceTypeKind resourceTypeKind)
   at Mongo.Context.MongoMetadata.AddDocumentProperty(MongoContext context, String collectionName, ResourceType collectionType, String propertyName, BsonElement element, Boolean isCollection)
   at Mongo.Context.MongoMetadata.AddResourceProperty(MongoContext context, String collectionName, ResourceType collectionType, BsonElement element, Boolean treatObjectIdAsKey)
   at Mongo.Context.MongoMetadata.RegisterResourceProperty(MongoContext context, ResourceType resourceType, BsonElement element)
   at Mongo.Context.MongoMetadata.AddDocumentType(MongoContext context, String collectionName, BsonDocument document, ResourceTypeKind resourceTypeKind)
   at Mongo.Context.MongoMetadata.AddDocumentProperty(MongoContext context, String collectionName, ResourceType collectionType, String propertyName, BsonElement element, Boolean isCollection)
   at Mongo.Context.MongoMetadata.AddResourceProperty(MongoContext context, String collectionName, ResourceType collectionType, BsonElement element, Boolean treatObjectIdAsKey)
   at Mongo.Context.MongoMetadata.RegisterResourceProperty(MongoContext context, ResourceType resourceType, BsonElement element)
   at Mongo.Context.MongoMetadata.AddDocumentType(MongoContext context, String collectionName, BsonDocument document, ResourceTypeKind resourceTypeKind)
   at Mongo.Context.MongoMetadata.AddResourceSet(MongoContext context, String collectionName, BsonDocument document)
   at Mongo.Context.MongoMetadata.PopulateMetadataFromCollection(MongoContext context, String collectionName, ResourceSet resourceSet)
   at Mongo.Context.MongoMetadata.PopulateMetadata(MongoContext context)
   at Mongo.Context.MongoMetadata..ctor(String connectionString, Metadata metadata)
   at Mongo.Context.MongoDataServiceBase`2.<.ctor>b__1(String x)
   at Mongo.Context.MongoDataServiceBase`2..ctor(String connectionString, MongoConfiguration mongoConfiguration)
   at Mongo.Context.Queryable.MongoQueryableDataService..ctor(String connectionString, MongoConfiguration mongoConfiguration)
   at MongoData.MongoDataService..ctor() in c:\Users\Administrator\Documents\Visual Studio 2013\Projects\MongoData\MongoData\MongoDataService.cs:line 12
   at CreateMongoData.MongoDataService()
   at System.ServiceModel.Dispatcher.InstanceProvider.GetInstance(InstanceContext instanceContext, Message message)
   at System.ServiceModel.Dispatcher.InstanceBehavior.GetInstance(InstanceContext instanceContext, Message request)
   at System.ServiceModel.InstanceContext.GetServiceInstance(Message message)
   at System.ServiceModel.Dispatcher.InstanceBehavior.EnsureServiceInstance(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

kako-nawao avatar Jun 06 '14 22:06 kako-nawao

Thanks for the bug report. The easiest for me would be (as with previous issue) to get temporary access to the db where the error occurred. I am also considering adding some logging that you can (temporarily) turn on to collect more information.

object avatar Jun 07 '14 09:06 object

OK, just sent you the info by email. Hope you can find the cause, I tried to do some debugging but it's a pain to do so using rdesktop and VSExpress.

kako-nawao avatar Jun 09 '14 19:06 kako-nawao