Error when attempting to retrieve spatial geometry

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
aaron.gundel
Posts: 1
Joined: Fri 26 Jun 2015 16:37

Error when attempting to retrieve spatial geometry

Post by aaron.gundel » Fri 26 Jun 2015 16:42

This is what we're seeing....

"ExceptionMessage": "premature end of enumerator",
"ExceptionType": "System.InvalidOperationException",
"StackTrace": " at NetTopologySuite.IO.WKTReader.GetNextWord(IEnumerator`1 tokens)\\\r\\\n at NetTopologySuite.IO.WKTReader.ReadGeometryTaggedText(IEnumerator`1 tokens)\\\r\\\n at NetTopologySuite.IO.WKTReader.Read(TextReader reader)\\\r\\\n at NetTopologySuite.IO.WKTReader.Read(String wellKnownText)\\\r\\\n at Devart.Common.Entity.bi.a(Int32 A_0, Boolean A_1)\\\r\\\n at Devart.Common.Entity.bi.b(Int32 A_0)\\\r\\\n at System.Data.Entity.Core.Common.Internal.Materialization.Shaper.<GetSpatialPropertyValueWithErrorHandling>b__1c[TProperty](DbDataReader reader, Int32 column)\\\r\\\n at System.Data.Entity.Core.Common.Internal.Materialization.Shaper.ErrorHandlingValueReader`1.GetValue(DbDataReader reader, Int32 ordinal)\\\r\\\n at System.Data.Entity.Core.Common.Internal.Materialization.Shaper.GetSpatialPropertyValueWithErrorHandling[TProperty](Int32 ordinal, String propertyName, String typeName, PrimitiveTypeKind spatialTypeKind)\\\r\\\n at lambda_method(Closure , Shaper )\\\r\\\n at System.Data.Entity.Core.Common.Internal.Materialization.Shaper.HandleEntityAppendOnly[TEntity](Func`2 constructEntityDelegate, EntityKey entityKey, EntitySet entitySet)\\\r\\\n at lambda_method(Closure , Shaper )\\\r\\\n at System.Data.Entity.Core.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper)\\\r\\\n at System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()\\\r\\\n at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()\\\r\\\n at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)\\\r\\\n at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)\\\r\\\n at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)\\\r\\\n at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)\\\r\\\n at Newtonsoft.Json.JsonSerializer.Serialize(JsonWriter jsonWriter, Object value)\\\r\\\n at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, Encoding effectiveEncoding)\\\r\\\n at System.Net.Http.Formatting.JsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, Encoding effectiveEncoding)\\\r\\\n at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, HttpContent content)\\\r\\\n at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStreamAsync(Type type, Object value, Stream writeStream, HttpContent content, TransportContext transportContext, CancellationToken cancellationToken)\\\r\\\n--- End of stack trace from previous location where exception was thrown ---\\\r\\\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\\r\\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\\r\\\n at System.Runtime.CompilerServices.TaskAwaiter.GetResult()\\\r\\\n at System.Web.Http.WebHost.HttpControllerHandler.<WriteBufferedResponseContentAsync>d__1b.MoveNext()"

This is a 2D spatial geometry in a view in Oracle. We're not sure how to proceed from here. The error message is not exactly helpful; and we don't know how to interrogate further. We're using the net topology suite library (as you can see from the stack trace). We're also using the dotconnect for Postgres in this project; though that doesn't appear to be related.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Error when attempting to retrieve spatial geometry

Post by Shalex » Fri 26 Jun 2015 16:59

Please localize the issue and send us a small test project with the corresponding DDL/DML script to reproduce the problem in our environment.

Post Reply