gispathfinder

SOE error

Discussion created by gispathfinder on Sep 7, 2011
String myString = "";
IServerContext pServerContext = null;
MapServer mapServer = null;
try {
pServerContext = getServerContext(gisServerParam);
mapServer = (MapServer)pServerContext.getServerObject();
IServerObjectExtensionManager pServerObjectExtensionManager = (IServerObjectExtensionManager)mapServer;
IServerObjectExtension pServerObjectExtension = pServerObjectExtensionManager.findExtensionByTypeName(gisServerParam.getGisServerExtendName());
IServerObjectExt pServerObjectExt = (IServerObjectExt)pServerObjectExtension;
myString= pServerObjectExt.test("123456");
} catch (AutomationException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
finally
{
if(pServerContext != null)
{
closeServerContext(pServerContext);
}
}

------------------------------------------------------------------------------------------------------
java.lang.ClassCastException: A COM object reference via iid 9f9650f1-5f49-4041-ba0f-d10baff1d7bc does not support COM interface 71f04247-0e81-328f-aef2-b022c18ced20
at com.esri.arcgis.interop.Dispatch.queryIfNecessary(Unknown Source)
at com.esri.arcgis.interop.Dispatch.vtblInvoke(Unknown Source)
at com.esri.arcgis.interop.extn.InvocationHandlerImpl.invoke(Unknown Source)
at $Proxy5.test(Unknown Source)
at com.summit.hw.gis.SpatialAnalyzeClient.invokeTest(SpatialAnalyzeClient.java:216)
at com.summit.hw.gis.SpatialAnalyzeClient.main(SpatialAnalyzeClient.java:285)
A COM object reference via iid 9f9650f1-5f49-4041-ba0f-d10baff1d7bc does not support COM interface 71f04247-0e81-328f-aef2-b022c18ced20

-------------------------------------------------------------------
windows 2008 + arcgis server 10.0.2 + java 1.6.0_23

Outcomes