AnsweredAssumed Answered

Possible bug in ArcSDE 10.1 Java API

Question asked by geonetadmin on May 26, 2013
Latest reply on May 28, 2013 by geonetadmin
Original User: gtaylor

It looks like the SeQuery calculateLayerExtent method is broken in the ArcSDE 10.1 Java API.

The same code using the 10.0 or 9.3.x versions of the Java .jar files opperated correctly, but when switching to the 10.1 libraries the following exception is thrown when calling the calculateLayerExtent method:

java.lang.ClassCastException: com.esri.sde.sdk.client.SeEnvelope cannot be cast to com.esri.sde.sdk.client.SeExtent
at com.esri.sde.sdk.client.SeQuery.calculateLayerExtent(Unknown Source)
at test.arcsde.QueryThread.performTest(

Some code that produces the error is:

     SeSqlConstruct sqlCons = new SeSqlConstruct();
     sqlCons.setTables(new String[] { layer });

     SeQueryInfo queryInfo = new SeQueryInfo();
     queryInfo.setColumns(new String[] { column });

     SeQuery query = new SeQuery(connection);

     Object extent = query.calculateLayerExtent(queryInfo); // throws exception

Has the way the API is supposed to be used changed in a way that I'm unaware of or has this been broken?