AO连接sde出现java.lang.UnsatisfiedLinkError: no ntvauth in java.library.path 博客分类: GIS开发_AO AO
程序员文章站
2024-03-20 19:08:10
...
java.lang.UnsatisfiedLinkError: no ntvauth in java.library.path
Could not load native libraries.
java.lang.UnsatisfiedLinkError: no ntvauth in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1738)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at com.esri.arcgis.interop.NativeLoader.loadLibrary(Unknown Source)
at com.esri.arcgis.interop.NativeAuth.c(Unknown Source)
at com.esri.arcgis.interop.c.a(Unknown Source)
at com.esri.arcgis.interop.RpcConnectionHandler.a(Unknown Source)
at com.esri.arcgis.interop.hb.a(Unknown Source)
at com.esri.arcgis.interop.Dispatch.createDispatch(Unknown Source)
at com.esri.arcgis.interop.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.dci.sdecon.SdeConnection.main(SdeConnection.java:34)
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.esri.arcgis.interop.NativeAuth.getNegociateMessage()[B
at com.esri.arcgis.interop.NativeAuth.getNegociateMessage(Native Method)
at com.esri.arcgis.interop.NativeAuth.a(Unknown Source)
at com.esri.arcgis.interop.tb.b(Unknown Source)
at com.esri.arcgis.interop.tb.a(Unknown Source)
at com.esri.arcgis.interop.RpcConnectionHandler.<init>(Unknown Source)
at com.esri.arcgis.interop.RpcConnectionHandler.a(Unknown Source)
at com.esri.arcgis.interop.hb.a(Unknown Source)
at com.esri.arcgis.interop.Dispatch.createDispatch(Unknown Source)
at com.esri.arcgis.interop.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.dci.sdecon.SdeConnection.main(SdeConnection.java:34)
错误原因:未初始化Server容器,导致没能将sde至于运行环境中,
解决方法:初始化环境
//初始化serverServerInitializer serverInitializer=new ServerInitializer();serverInitializer.initializeServer("workgroup", "arcgismanager", "123456");ServerConnection connection=new ServerConnection();connection.connect("localhost");IServerObjectManager som= connection.getServerObjectManager(); IServerContext context = som.createServerContext("","");
Could not load native libraries.
java.lang.UnsatisfiedLinkError: no ntvauth in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1738)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at com.esri.arcgis.interop.NativeLoader.loadLibrary(Unknown Source)
at com.esri.arcgis.interop.NativeAuth.c(Unknown Source)
at com.esri.arcgis.interop.c.a(Unknown Source)
at com.esri.arcgis.interop.RpcConnectionHandler.a(Unknown Source)
at com.esri.arcgis.interop.hb.a(Unknown Source)
at com.esri.arcgis.interop.Dispatch.createDispatch(Unknown Source)
at com.esri.arcgis.interop.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.dci.sdecon.SdeConnection.main(SdeConnection.java:34)
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.esri.arcgis.interop.NativeAuth.getNegociateMessage()[B
at com.esri.arcgis.interop.NativeAuth.getNegociateMessage(Native Method)
at com.esri.arcgis.interop.NativeAuth.a(Unknown Source)
at com.esri.arcgis.interop.tb.b(Unknown Source)
at com.esri.arcgis.interop.tb.a(Unknown Source)
at com.esri.arcgis.interop.RpcConnectionHandler.<init>(Unknown Source)
at com.esri.arcgis.interop.RpcConnectionHandler.a(Unknown Source)
at com.esri.arcgis.interop.hb.a(Unknown Source)
at com.esri.arcgis.interop.Dispatch.createDispatch(Unknown Source)
at com.esri.arcgis.interop.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.dci.sdecon.SdeConnection.main(SdeConnection.java:34)
错误原因:未初始化Server容器,导致没能将sde至于运行环境中,
解决方法:初始化环境
//初始化serverServerInitializer serverInitializer=new ServerInitializer();serverInitializer.initializeServer("workgroup", "arcgismanager", "123456");ServerConnection connection=new ServerConnection();connection.connect("localhost");IServerObjectManager som= connection.getServerObjectManager(); IServerContext context = som.createServerContext("","");