Hello all,
We are using arcsde connect string to insert data from shape files into Oracle geodatabase using direct connection strings.
Everything seemed well with test data. When full data set was used to import into oracle, after inserting few thousand records application/script silently dies without throwing any error. It only happens in that environment using sde connections.
Could someone help in this scenario. It is very straight forward where we use feature cursors to read from shape files and insert data.
Regards,
Umasurya
https://community.esri.com/community/gis/managing-data?sr=search&searchId=67836751-85bf-4434-9361-c37c4b77d5ab&searchIndex=0 https://community.esri.com/groups/geodatabase?sr=search&searchId=bc31c01f-baa5-40d5-aaa8-ca12052c18a6&searchIndex=0
No, there is no way I can help you. Providing one function call is of little use, since it's unlikely the problem is with that one call -- it's just where some other error can manifest itself. You really ought to assemble a full code sample which reproduces the issue (StackExchange calls it an MCVE), and turn that over to Tech Support, along with complete details about the configuration of the VM and non-VM hosts. You can post the MCVE here, but given the reproducibility issues, there may be challenges ahead.
- V
Hi Vince,
Here is the exception with flush after many interations that I could get finally
First-chance exception at 0x772dc54f (KernelBase.dll) in ArcObjectsTest.exe: Microsoft C++ exception: FNPNS::TSM::CDoesNotExistException at memory location 0x0020afbc..
Could you put me right direction now?
Best Regards
Hello Vince,
I got a chance to test the script again and it fails at below line after executing about 162*40 times.
It doesn't go into try block/finally block and silently kills the application after dbbFCursor.flush. Please advise if any inputs.
Console.WriteLine("Before cursor flush:" + srcLayerName);
try
{
dbbFCursor.Flush();
}
catch (COMException comEx)
Console.WriteLine("Error in flush::" + comEx.Message);
Sure Vince. I am upgrading in couple of days for testing. Over the other local physical machines( with less processing power), using simple feature cursors it runs forever. In VMs at a data center consistently after few datasets(2MB on average per dataset) it dies after about 160 consistently(When it was started it used to be 260). It should throw some exception no matter how bad(assumption) my coding may be..
I have no concern whatsoever about VM use with ArcGIS 10.2.2 or higher (since I've used that extensively).
Given that it's extremely easy to write memory leaks with ArcObjects, my concern is with your code.
Thank you, Vince. Sure I will check on the version change. Btw, do you see any concern using VMs for ArcGIS softwares? That's the only difference other than location being different. We replicated all the softwares including OS and upgraded processor and RAM to very high end. Concern is that it won't throw any error before leaving the execution.
I'm not convinced that the application failure is even ArcObjects-related. This could be a COM failure itself (ancient components are written against ancient libraries, after all). There is no way, short of submitting your code for review, to tell what might be wrong. If you can generate a short code sample which generates the same error using ArcObjects 10.3.1, you can submit it, along with a detailed description of the inputs (type, feature count, and mean vertex count), to Tech Support. There really isn't any way for the good folk of GeoNet to help you, given the information provided.
Hi Vince, Thank you for the advice to get newer versions. Hope APIs are not written so that they get timed out after 5 years time. I am only trying to check what causes a silent death for ESRI com components that skips all of its execution including exceptions, event viewer, finally etc and leave the scene. If there is a way to find it, I can work accordingly. By the way license I got works with 10.3 versions as well.
Hi Vince Angelo,
Version are shown below
Oracle spatial-> 11.2.0.4.0
ArcGIS Engine Runtime ->
Product Name: ArcGIS 10.1 Engine
Release Version: 10.1
Product Version: 10.1.1.3143
OS for ArcGIS :Windows 2008 server
DB: Linux
Please advise if any discrepancies based on above. It works fine in local physical envt.
Please also consider that development goes for a while and we can't change versions as fast as ESRI could make releases every year. This has been working like this for a while locally and once it is being deployed in data center nothing works. We had to change so much code. Eventually this is where we are stuck. When I made the scripts to work, files from 262 folders(shape files) were successfully getting imported and crashed. Now after testing for a while, it came down to 162 folders and then get crashed. We simply replicated same versions that are working locally in data center. I want to know if any tool you use at ESRI to understand silent crash with ESRI COM components.
Ok. I will get back to you on the exact details on the s/w spec that we have at data center. Thank you for the suggestion.
The *EXACT* version of Oracle goes out to five places (11.a.b.c.d).
Given the extreme age of ArcGIS 10.1, it is extremely risky to not have installed at least Service Pack 1. There are dozens of patches on top of SP1, and they ALL should be applied before reporting uncommon behavior.
Thank you for the suggestion on version and reviewing the version changes or contemplating on a different source data format so we do not need to rely on any API. But I am afraid to say how it is important which version the software is for completing the simple importing of data from shape file workspace into arcsde with Oracle.
It was working in local servers. But this occurs in data center environment and no way to trace any error.
ArcGIS version is 10.1
Oracle version is 11g.
ArcGIS 10.1 is rather old. Have you applied the SP1 service pack and a score or more of patches?
What exact version of Oracle are you using? Is it listed as supported by 10.1sp1?
Back when it was current, I used 10.1sp1 to load ten and hundreds of millions of features at one time (680m being the most). I must admit it's easier to do so now at 10.5.1, but there's no obvious reason why you should be having this issue. I suspect it's going to come down to a bizarre IT issue, like a router or firewall limiting traffic, or an antivirus app freaking out in some way.
We checked on the trace and nothing unusual appears. It just logged the sequential operations.
Have you taken an Oracle level 12 trace? This can help us see exactly what calls are being sent to and from the database when the failure occurs.
After you see the failure, do you see ANY data that was imported?
How many shapefiles are being imported? If it is more than one, can you add a print statement in your code so you can monitor which files the code is able to parse through?
Here is the python for Feature Class to Feature class (conversion tools)
import arcpy arcpy.env.workspace = "C:/data/GreenvalleyDB.mdb/Public Buildings" arcpy.FeatureClassToFeatureClass_conversion("buildings_point", "C:/output/output.gdb", "buildings_point")
Feature Class To Feature Class—Help | ArcGIS for Desktop
Thank you. I am using arcobjects with arcgis engine version10.1.
Are you using ArcGIS Desktop or ArcGIS Pro or just a Python script with command line?If you are using ArcGIS Desktop just disable Background Geoprocessing in ArcMap Options > Georpcessing Options.
Hi, Thank you for the response.
Source data is absolutely fine. If I run any of the shape file individually, it works correctly. Application dies only after importing few 100s(shape files) if bulk number of shape files in batch put for import into oracle sde. Ironically it won't throw any error, application simply gets killed.
Try to run 'Repair Geometry' before import data or split the shapefile into smaller files.
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.