However, when I try to perform this cast in my code, an exception appears:
Exception in thread "main" java.lang.ClassCastException: com.esri.arcgis.geodatabase.IFeatureClassProxy cannot be cast to com.esri.arcgis.geodatabase.ISchemaLock
Are you able to make this cast on an IFeatureClass ? Here is the code to perform this:
//Attempt to acquire an exclusive schema lock on the feature class.
ISchemaLock schemaLock = (ISchemaLock)featureClass;
I would appreciate if you could try this simple line of code in one of your programs, and let me know if you get an exception.