[Mono-list] Exception using EntityFramework 5
DrGusman
geniwab at gmail.com
Thu May 7 02:10:40 UTC 2015
Hi. I'm having an exception whenever I try to use entity framework. Have
tried with Sql server and MySQL providers/db and I get the exact same
error.
The database is the same in Sql server and MySQL, so the resulting entity
model is the same (I puntualize about that because I belive the error is in
the metadata information parsing).
The exception is this:
Exception processing petition: Object reference not set to an instance of an
object - at System.Xml.XmlInputStream.Initialize (System.IO.Stream)
<0x000a8>
at System.Xml.XmlInputStream..ctor (System.IO.Stream) <0x00023>
at (wrapper remoting-invoke-with-check) System.Xml.XmlInputStream..ctor
(System.IO.Stream) <0x00047>
at System.Xml.XmlStreamReader..ctor (System.IO.Stream) <0x0003b>
at (wrapper remoting-invoke-with-check) System.Xml.XmlStreamReader..ctor
(System.IO.Stream) <0x00047>
at System.Xml.XmlTextReader..ctor (System.IO.Stream) <0x00037>
at System.Xml.Schema.XmlSchema.Read
(System.IO.Stream,System.Xml.Schema.ValidationEventHandler) <0x0002f>
at
System.Data.EntityModel.SchemaObjectModel.Schema/SomSchemaSetHelper.AddXmlSchemaToSet
(System.Xml.Schema.XmlSchemaSet,System.Data.EntityModel.SchemaObjectModel.XmlSchemaResource,System.Collections.Generic.HashSet`1<string>)
<0x000d7>
at
System.Data.EntityModel.SchemaObjectModel.Schema/SomSchemaSetHelper.AddXmlSchemaToSet
(System.Xml.Schema.XmlSchemaSet,System.Data.EntityModel.SchemaObjectModel.XmlSchemaResource,System.Collections.Generic.HashSet`1<string>)
<0x00097>
at
System.Data.EntityModel.SchemaObjectModel.Schema/SomSchemaSetHelper.ComputeSchemaSet
(System.Data.EntityModel.SchemaObjectModel.SchemaDataModelOption) <0x0012b>
at
System.Data.Common.Utils.Memoizer`2/<Evaluate>c__AnonStorey0<System.Data.EntityModel.SchemaObjectModel.SchemaDataModelOption,
System.Xml.Schema.XmlSchemaSet>.<>m__0 () <0x0002b>
at
System.Data.Common.Utils.Memoizer`2/Result<System.Data.EntityModel.SchemaObjectModel.SchemaDataModelOption,
System.Xml.Schema.XmlSchemaSet>.GetValue () <0x00077>
at
System.Data.Common.Utils.Memoizer`2<System.Data.EntityModel.SchemaObjectModel.SchemaDataModelOption,
System.Xml.Schema.XmlSchemaSet>.Evaluate
(System.Data.EntityModel.SchemaObjectModel.SchemaDataModelOption) <0x001bf>
at
System.Data.EntityModel.SchemaObjectModel.Schema/SomSchemaSetHelper.GetSchemaSet
(System.Data.EntityModel.SchemaObjectModel.SchemaDataModelOption) <0x0002b>
at System.Data.EntityModel.SchemaObjectModel.Schema.CreateXmlReaderSettings
() <0x000e3>
at System.Data.EntityModel.SchemaObjectModel.Schema.Parse
(System.Xml.XmlReader,string) <0x00027>
at System.Data.EntityModel.SchemaObjectModel.SchemaManager.ParseAndValidate
(System.Collections.Generic.IEnumerable`1<System.Xml.XmlReader>,System.Collections.Generic.IEnumerable`1<string>,System.Data.EntityModel.SchemaObjectModel.SchemaDataModelOption,System.Data.EntityModel.SchemaObjectModel.AttributeValueNotification,System.Data.EntityModel.SchemaObjectModel.AttributeValueNotification,System.Data.EntityModel.SchemaObjectModel.ProviderManifestNeeded,System.Collections.Generic.IList`1<System.Data.EntityModel.SchemaObjectModel.Schema>&)
<0x00243>
at System.Data.EntityModel.SchemaObjectModel.SchemaManager.ParseAndValidate
(System.Collections.Generic.IEnumerable`1<System.Xml.XmlReader>,System.Collections.Generic.IEnumerable`1<string>,System.Data.EntityModel.SchemaObjectModel.SchemaDataModelOption,System.Data.Common.DbProviderManifest,System.Collections.Generic.IList`1<System.Data.EntityModel.SchemaObjectModel.Schema>&)
<0x00247>
at System.Data.Metadata.Edm.EdmItemCollection.LoadItems
(System.Collections.Generic.IEnumerable`1<System.Xml.XmlReader>,System.Collections.Generic.IEnumerable`1<string>,System.Data.EntityModel.SchemaObjectModel.SchemaDataModelOption,System.Data.Common.DbProviderManifest,System.Data.Metadata.Edm.ItemCollection,bool)
<0x00077>
at System.Data.Metadata.Edm.EdmItemCollection.Init
(System.Collections.Generic.IEnumerable`1<System.Xml.XmlReader>,System.Collections.Generic.IEnumerable`1<string>,bool)
<0x0007b>
at System.Data.Metadata.Edm.EdmItemCollection..ctor
(System.Collections.Generic.IEnumerable`1<System.Xml.XmlReader>,System.Collections.Generic.IEnumerable`1<string>)
<0x000b3>
at
System.Data.Metadata.Edm.MetadataCache/EdmMetadataEntry.LoadEdmItemCollection
(System.Data.Metadata.Edm.MetadataArtifactLoader) <0x00077>
at
System.Data.Metadata.Edm.MetadataCache/EdmItemCollectionLoader.LoadItemCollection
(System.Data.Metadata.Edm.MetadataCache/EdmMetadataEntry) <0x00023>
at
System.Data.Metadata.Edm.MetadataCache.LoadItemCollection<System.Data.Metadata.Edm.MetadataCache/EdmMetadataEntry>
(System.Data.Metadata.Edm.MetadataCache/IItemCollectionLoader`1<System.Data.Metadata.Edm.MetadataCache/EdmMetadataEntry>,System.Data.Metadata.Edm.MetadataCache/EdmMetadataEntry)
<0x0009b>
at System.Data.Metadata.Edm.MetadataCache.GetOrCreateEdmItemCollection
(string,System.Data.Metadata.Edm.MetadataArtifactLoader,object&) <0x0011b>
at System.Data.EntityClient.EntityConnection.LoadEdmItemCollection
(System.Data.Metadata.Edm.MetadataWorkspace,System.Data.Metadata.Edm.MetadataArtifactLoader)
<0x00043>
at System.Data.EntityClient.EntityConnection.GetMetadataWorkspace (bool)
<0x001eb>
at (wrapper remoting-invoke-with-check)
System.Data.EntityClient.EntityConnection.GetMetadataWorkspace (bool)
<0x0007b>
at System.Data.Objects.ObjectContext.RetrieveMetadataWorkspaceFromConnection
() <0x00033>
at System.Data.Objects.ObjectContext..ctor
(System.Data.EntityClient.EntityConnection,bool) <0x001b3>
at System.Data.Objects.ObjectContext..ctor
(System.Data.EntityClient.EntityConnection) <0x00047>
at
System.Data.Entity.Internal.InternalConnection.CreateObjectContextFromConnectionModel
() <0x000e7>
at
System.Data.Entity.Internal.LazyInternalConnection.CreateObjectContextFromConnectionModel
() <0x0001b>
at System.Data.Entity.Internal.LazyInternalContext.InitializeContext ()
<0x0013f>
at System.Data.Entity.Internal.InternalContext.Initialize () <0x0001b>
at
System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType
(System.Type) <0x00017>
at
System.Data.Entity.Internal.Linq.InternalSet`1<UcarusBackOffice.SesionCliente>.Initialize
() <0x00053>
at
System.Data.Entity.Internal.Linq.InternalSet`1<UcarusBackOffice.SesionCliente>.Include
(string) <0x00023>
at
System.Data.Entity.Infrastructure.DbQuery`1<UcarusBackOffice.SesionCliente>.Include
(string) <0x00077>
at UcarusClientApi.Classes.Utils.RecuperaSesion
(UcarusBackOffice.Entities,SDRestFramework.RESTRequest) <0x0010f>
at UcarusClientApi.Resources.DeviceManagement.DeviceAlertTransports
(SDRestFramework.RESTRequest) <0x00087>
at UcarusClientApi.Resources.DeviceManagement.GetProcessor
(SDRestFramework.RESTRequest) <0x0015b>
at (wrapper dynamic-method) object. (object,object[]) <0x00063>
at SDRestServer.SDRestServerCommon.ExecuteRequest
(SDRestFramework.RESTRequest,SDRestFramework.RESTResourceInfo[],SDRestFramework.RESTRequestFilter[],SDRestFramework.RESTResourceFilter[],SDRestFramework.RESTResponseFilter[])
<0x005ff>
It's running on mono 4.0.0 compiled from tarball under arm (raspberry).
Everything else works perfectly, any idea on what's going on?
Cheers.
--
View this message in context: http://mono.1490590.n4.nabble.com/Exception-using-EntityFramework-5-tp4665872.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list