Hi,I'm trying to make a spatial query with the Java API and keep getting this error:ArcSDE Error Number: -143Error Description: THE COORDINATE SYSTEM DESCRIPTION IS INVALID.My code looks like this:
try
{
SeLayer layer = new SeLayer(conn, layerName, spatialCol);
SeShape shape = new SeShape(layer.getCoordRef());
SeExtent extent = layer.getExtent();
shape.generateRectangle(extent);
SeShape[] shapes = new SeShape[1];
shapes[0] = shape;
SeShapeFilter filter = new SeShapeFilter(layerName, spatialCol, shape, SeFilter.METHOD_ENVP);
SeShapeFilter[] filters = new SeShapeFilter[1];
filters[0] = filter;
String[] cols = new String[1];
cols[0] = new String("*");
SeSqlConstruct sqlCons = new SeSqlConstruct(layer.getName());
SeQuery spatialQuery = new SeQuery(conn, cols, sqlCons);
spatialQuery.prepareQuery();
spatialQuery.setSpatialConstraints(SeQuery.SE_OPTIMIZE, false, filters);
spatialQuery.execute();
}
catch (SeException e)
{
e.printStackTrace();
}
I keep getting the error I mentioned above at the line where I try to use the method setSpatialConstraints.When I use the method getCoordSysDescription() on my SeLayer object, the output is like this:GEOGCS[ "GCS_WGS_1984", DATUM["D_WGS_1984", SPHEROID["WGS_1984",6378137.0,298.257223563]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433] ]Any help will be much appreciated,Edit: By the way, ArcSDE is running on RHEL & Oracle 11g.Isil