阅读:1410回复:0
很短的程序,请帮忙测试一下
<P>import com.esri.arcgis.datasourcesGDB.*;
import com.esri.arcgis.geodatabase.*; import com.esri.arcgis.system.*; import com.linar.jintegra.*;</P> <P>public class EngineTest { public EngineTest() { IWorkspace iws = this.openSDEWorkspace("gislab","5252","sde","sde","","9"); }</P> <P> public IWorkspace openSDEWorkspace(String Server, String Instance, String User, String Password, String Database, String version) { IWorkspace ws = null; try { IPropertySet pPropSet = new PropertySet(); IWorkspaceFactory pSdeFact = new SdeWorkspaceFactory();</P> <P> pPropSet.setProperty("gislab", Server); pPropSet.setProperty("5252", Instance); pPropSet.setProperty("", Database); pPropSet.setProperty("sde", User); pPropSet.setProperty("sde", Password); pPropSet.setProperty("9", version);</P> <P> ws = pSdeFact.open(pPropSet, 0); } catch (Exception ex) { ex.printStackTrace(); } return ws; } public static void main(String[] args) { new EngineTest(); } }</P> <P>我这里总是报错。</P> <P>AutomationException: 0x80040154 - Class not registered at com.linar.jintegra.bs.b(Unknown Source) at com.linar.jintegra.Rpc.a(Unknown Source) at com.linar.jintegra.bl.a(Unknown Source) at com.linar.jintegra.Dispatch.createDispatch(Unknown Source) at com.linar.jintegra.Dispatch.<init>(Unknown Source) at com.esri.arcgis.system.IPropertySetProxy.<init>(Unknown Source) at com.esri.arcgis.system.PropertySet.<init>(Unknown Source) at com.esri.arcgis.system.PropertySet.<init>(Unknown Source) at com.seagolden.app.EngineTest.openSDEWorkspace(EngineTest.java:19) at com.seagolden.app.EngineTest.<init>(EngineTest.java:10) at com.seagolden.app.EngineTest.main(EngineTest.java:37)</P> <P>读取shp文件就不会出错。</P> |
|