Hi,
Continuing our evaluation of Mapsuite i am trying to update an oracle layer. The reading performance is great but i get an error when i try to update a feature after an edit,
I am reading the features to EditShapesLayer
var allFeatures = _GBBlayer.QueryTools.GetAllFeatures(ReturningColumnsType.AllColumns);
MapEngine.TrackOverlay.TrackMode = TrackMode.None;
foreach (var feature in allFeatures)
{
MapEngine.EditOverlay.EditShapesLayer.InternalFeatures.Add(feature);
}
I do some edits through the map control
_GBBlayer.EditTools.BeginTransaction();
foreach (var fea in MapEngine.EditOverlay.EditShapesLayer.InternalFeatures)
{
_GBBlayer.EditTools.Update(fea);
}
var result = _GBBlayer.EditTools.CommitTransaction();
the FailureReasons in the result have the following error "Object reference not set to an instance of an object" for each feature i try to update
What am i doing wrong?
Oracle fails on update
Hi Giorgos,
We need your stack trace to make sure where this exception is thrown.
If we cannot solve that, we maybe need to reproduce that local with your help.
BTW, could you please try to use
_GBBlayer.FeatureSource.DeleteFeature(fea);
_GBBlayer.FeatureSource.AddFeature(fea);
instead of
_GBBlayer.EditTools.Update(fea);
And let me know whether that works?
Regards,
Don
_GBBlayer.FeatureSource.AddFeature(fea);
produces the same error
_GBBlayer.FeatureSource.DeleteFeature(fea.id);
works just fine
Exception Thrown
Oracle.DataAccess.dll!Oracle.DataAccess.Client.OracleParameter…ctor(
string
parameterName = {unknown},
object
obj = {unknown}) C#
OracleApiWrapperX86.dll!OracleApiWrapper.OracleApiWrapper.4hM=(ThinkGeo.MapSuite.Core.Feature 4xM= = {unknown}) C#
OracleApiWrapperX86.dll!OracleApiWrapper.OracleApiWrapper.3xM=(System.Collections.Generic.Dictionary<
string
,ThinkGeo.MapSuite.Core.Feature> 4BM= = {unknown}, ThinkGeo.MapSuite.Core.TransactionResult 4RM= = {unknown}) C#
OracleApiWrapperX86.dll!OracleApiWrapper.OracleApiWrapper.CommitTransaction(ThinkGeo.MapSuite.Core.TransactionBuffer transactions = {unknown}) C#
mscorlib.dll!System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(
object
obj = {unknown},
object
[] parameters = {unknown},
object
[] arguments = {unknown}) C#
mscorlib.dll!System.Reflection.RuntimeMethodInfo.Invoke(
object
obj = {unknown}, System.Reflection.BindingFlags invokeAttr = {unknown}, System.Reflection.Binder binder = {unknown},
object
[] parameters = {unknown}, System.Globalization.CultureInfo culture = {unknown}) C#
mscorlib.dll!System.Reflection.MethodBase.Invoke(
object
obj = {unknown},
object
[] parameters = {unknown}) C#
MapSuiteCore.dll!ThinkGeo.MapSuite.Core.OracleFeatureSource.CommitTransactionCore(ThinkGeo.MapSuite.Core.TransactionBuffer transactions = {unknown}) C#
MapSuiteCore.dll!ThinkGeo.MapSuite.Core.FeatureSource.CommitTransaction() C#
MapSuiteCore.dll!ThinkGeo.MapSuite.Core.EditTools.CommitTransaction() C#
Exception CaughtOracleApiWrapperX86.dll!OracleApiWrapper.OracleApiWrapper.3xM=(System.Collections.Generic.Dictionary<
string
,ThinkGeo.MapSuite.Core.Feature> 4BM= = {unknown}, ThinkGeo.MapSuite.Core.TransactionResult 4RM= = {unknown}) C#
OracleApiWrapperX86.dll!OracleApiWrapper.OracleApiWrapper.CommitTransaction(ThinkGeo.MapSuite.Core.TransactionBuffer transactions = {unknown}) C#
mscorlib.dll!System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(
object
obj = {unknown},
object
[] parameters = {unknown},
object
[] arguments = {unknown}) C#
mscorlib.dll!System.Reflection.RuntimeMethodInfo.Invoke(
object
obj = {unknown}, System.Reflection.BindingFlags invokeAttr = {unknown}, System.Reflection.Binder binder = {unknown},
object
[] parameters = {unknown}, System.Globalization.CultureInfo culture = {unknown}) C#
mscorlib.dll!System.Reflection.MethodBase.Invoke(
object
obj = {unknown},
object
[] parameters = {unknown}) C#
MapSuiteCore.dll!ThinkGeo.MapSuite.Core.OracleFeatureSource.CommitTransactionCore(ThinkGeo.MapSuite.Core.TransactionBuffer transactions = {unknown}) C#
MapSuiteCore.dll!ThinkGeo.MapSuite.Core.FeatureSource.CommitTransaction() C#
MapSuiteCore.dll!ThinkGeo.MapSuite.Core.EditTools.CommitTransaction() C#
Hi Giorgos,
I apologize for the delay as we were repairing the Oracle database. After checking the stack trace information posted here, I guess the problem is caused by the SRID of the database table, but not very sure, do you give any SRID to the GEOM table? Is it possible to give us a demo data for test? Because it’s hard to reproduce it with the data we have. you can attached it here, or send it to forumsupport@thinkgeo.com via Email or ask support@thinkgeo.com for a FTP address.
Thanks,
Johnny