ORA-24550 Thrown while executing GP.ExportReplicaSchema_management

3374
1
01-13-2012 07:48 AM
willjensen
Deactivated User
As part of a larger routine I need to export a replica schema to xml from an sde instance (Oracle 11gR1). This routine utilizes the 9.3 Geoprocessor for much of its work and for this particular task intermittently the application will have a catastrophic failure and closedown bypassing any error handling. If I use ArcObjects 9.3.1 everything seems to work just fine.

The error is an ORA-24550 error and from what I have read online this seems to be a threading issue, potentially a bug, with Oracle Client (11g R1). I could only find one thread on the ESRI forums which seems nonsensical and thusly ends abruptly (http://forums.arcgis.com/threads/27473-arcpy.CreateReplica_management?highlight=ORA-24550)

I have created this process in Python, C#(GP) and C#(AO):
�?�    Python �?? fails after the 2nd or 3rd try
import os, arcgisscripting
gp = arcgisscripting.create(9.3)
gp.AddToolbox(r"C:\Program Files (x86)\ArcGIS\ArcToolBox\Toolboxes\Data Management Tools.tbx")
gp.setproduct("ArcServer")
count = 1
while (count < 10):
    print "Export Schema Attempt " +str(count)
    try:
        gp.ExportReplicaSchema_management(r'SDECONNECTION.sde', r'SCHEMAEXPORTFILE'+str(count)+'.xml', 'SCHEMA.REPLICANAME')
    except Exception, e:
        print e
        print gp.getmessages()
    finally:
        count = count + 1

Throws the following while crashing:  ORA-24550: signal received: Unhandled exception [ATTACH=CONFIG]11167[/ATTACH]

�?�    C#(GP) �?? Again crashes after about the 2nd or 3rd try but without any error message:
  AoInitialize init = null;
            init = new AoInitialize();
            init.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcServer);
           
            Geoprocessor GP = new Geoprocessor();
            for (int i = 1; i < 10; i++)
            {
                Console.WriteLine("Export Schema Attempt " + i.ToString());
                try
                {
                    ExportReplicaSchema ersGP = new ExportReplicaSchema(@"SDECONNECTION.sde", @"SCHEMAEXPORTFILE" + i.ToString() + ".xml", "SCHEMA.REPLICANAME");

                    GP.Execute(ersGP, null);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                    Console.WriteLine(e.InnerException);
                    object sev = new object();
                    Console.WriteLine(GP.GetMessages(ref sev));
                }
            }

�?�    C#(AO) �?? This seems work fine and I have ran it up to 40 iterations without problems:
  AoInitialize init = null;
            init = new AoInitialize();
            init.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcServer);
                            IWorkspaceFactory2 wFactory = new SdeWorkspaceFactoryClass();
            IWorkspace repWorkspace = null;
            repWorkspace = wFactory.OpenFromFile(@"SDECONNECTION.sde", 0);
            IWorkspaceReplicas workspaceReplicas = (IWorkspaceReplicas)repWorkspace;
            IWorkspaceReplicasAdmin workspaceReplicasAdmin = (IWorkspaceReplicasAdmin)repWorkspace;

            IReplica myReplica = workspaceReplicas.get_ReplicaByName("SCHEMA.REPLICANAME");

            ReplicaSchemaExporter ersAO = new ReplicaSchemaExporterClass();
            for (int i = 1; i < 10; i++)
            {
                Console.WriteLine("Export Schema Attempt " + i.ToString());
                try
                {
                    ersAO.ExportSchema(@"SCHEMAEXPORTFILE" + i.ToString() + ".xml", myReplica);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                    Console.WriteLine(e.InnerException);
                }
            }

Ultimately I would like to get the Python GP working. Has anybody seen this?
0 Kudos
1 Reply
ahmed_hussiney
Regular Contributor

Hi will,

I am facing the same issue now ORA-24550, did you manage to fix this ?