Select to view content in your preferred language

Problem opening feature class

4271
3
02-26-2015 10:42 AM
StevenHirsch
Deactivated User

I have a body of code that uses ArcGIS runtime 10.1 to work with a geometric network in customer data.  It's been working fine, but we recently obtained a newer version of the geodatabase and I cannot seem to open any feature classes!  Oddly, the 'isNameExists' method returns true when queried whether the feature class exists yet the following called to 'openFeatureClass' blows up with this exception:

AutomationException: 0x80041352 - Unable to create object class extension COM component [MyClassName] in 'Esri GeoDatabase'

        at com.esri.arcgis.geodatabase.Workspace.openFeatureClass(Unknown Source)

        IWorkspace2 is2 = (IWorkspace2) featureWorkspace;
        if (! is2.isNameExists(esriDatasetType.esriDTFeatureClass, feature_class_name)) {
            System.err.println("Feature class " + feature_class_name + " not found");
            continue;
        }
      
        IFeatureClass iFeatureClass = featureWorkspace.openFeatureClass(feature_class_name);

I'm at a loss to know how to work around this problem.  Any suggestions for further troubleshooting?  ArcCatalog does show the class, FWIW.

0 Kudos
3 Replies
EricBader
Honored Contributor

Hi Steven,

This looks like a great candidate for the ArcObjects SDK discussion forum.

It should get better handled from there.

Thanks!

Eric

0 Kudos
AlexanderNohe1
Honored Contributor

Hey Steven Hirsch​,

Are you able to add any of the feature classes to an MXD (manually, opening ArcMap and adding the data)?

Thanks,

Alexander N.

0 Kudos
StevenHirsch
Deactivated User

Hi, Alexander.  I did eventually find a workaround thanks to suggestions on the SDK topic.  I'm sure there are a number of ways to work around it, but resetting the CLSID programmatically turned out to be expedient.

0 Kudos