`

SuperMap中示例程序MapComponentSample中错误的解决办法

 
阅读更多

导入的示例程序MapComponent,jar包全部加载了,运行后报下面的错,是什么问题?

 

java.lang.UnsatisfiedLinkError: no Wrapj600 in java.library.path
 at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
 at java.lang.Runtime.loadLibrary0(Runtime.java:823)
 at java.lang.System.loadLibrary(System.java:1030)
 at com.supermap.data.Environment.LoadWrapJ(Unknown Source)
 at com.supermap.data.Environment.<clinit>(Unknown Source)
 at com.supermap.data.InternalHandle.<clinit>(Unknown Source)
 at com.supermap.services.providers.LicenseChecker.a(LicenseChecker.java:62)
 at com.supermap.services.providers.LicenseChecker.checkLicense(LicenseChecker.java:52)
 at com.supermap.services.providers.UGCMapProvider.a(UGCMapProvider.java:595)
 at com.supermap.services.providers.UGCMapProvider.<init>(UGCMapProvider.java:88)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at com.supermap.services.components.MapContext.getProviders(MapContext.java:171)
 at com.supermap.services.components.impl.MapImpl.a(MapImpl.java:166)
 at com.supermap.services.components.impl.MapImpl.<init>(MapImpl.java:144)
 at com.supermap.sample.MapComponentSample.getMapComponent(MapComponentSample.java:59)
 at com.supermap.sample.MapComponentSample.queryByDistanceSample(MapComponentSample.java:65)
 at com.supermap.sample.MapComponentSample.main(MapComponentSample.java:200)
java.lang.UnsatisfiedLinkError: no Wrapj600 in java.library.path
 at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
 at java.lang.Runtime.loadLibrary0(Runtime.java:823)
 at java.lang.System.loadLibrary(System.java:1030)
 at com.supermap.data.Environment.LoadWrapJ(Unknown Source)
 at com.supermap.data.InternalHandle.<clinit>(Unknown Source)
 at com.supermap.services.providers.LicenseChecker.a(LicenseChecker.java:62)
 at com.supermap.services.providers.LicenseChecker.checkLicense(LicenseChecker.java:52)
 at com.supermap.services.providers.UGCMapProvider.a(UGCMapProvider.java:595)
 at com.supermap.services.providers.UGCMapProvider.<init>(UGCMapProvider.java:88)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at com.supermap.services.components.MapContext.getProviders(MapContext.java:171)
 at com.supermap.services.components.impl.MapImpl.a(MapImpl.java:166)
 at com.supermap.services.components.impl.MapImpl.<init>(MapImpl.java:144)
 at com.supermap.sample.MapComponentSample.getMapComponent(MapComponentSample.java:59)
 at com.supermap.sample.MapComponentSample.queryByDistanceSample(MapComponentSample.java:65)
 at com.supermap.sample.MapComponentSample.main(MapComponentSample.java:200)
0    WARN  MapContext  - 初始化MapProvider对象失败,异常信息为{0}
java.lang.UnsatisfiedLinkError: com.supermap.data.LicenseNative.jni_New()J
 at com.supermap.data.LicenseNative.jni_New(Native Method)
 at com.supermap.data.License.<init>(Unknown Source)
 at com.supermap.services.providers.LicenseChecker.a(LicenseChecker.java:62)
 at com.supermap.services.providers.LicenseChecker.checkLicense(LicenseChecker.java:52)
 at com.supermap.services.providers.UGCMapProvider.a(UGCMapProvider.java:595)
 at com.supermap.services.providers.UGCMapProvider.<init>(UGCMapProvider.java:88)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at com.supermap.services.components.MapContext.getProviders(MapContext.java:171)
 at com.supermap.services.components.impl.MapImpl.a(MapImpl.java:166)
 at com.supermap.services.components.impl.MapImpl.<init>(MapImpl.java:144)
 at com.supermap.sample.MapComponentSample.getMapComponent(MapComponentSample.java:59)
 at com.supermap.sample.MapComponentSample.queryByDistanceSample(MapComponentSample.java:65)
 at com.supermap.sample.MapComponentSample.main(MapComponentSample.java:200)
Exception in thread "main" com.supermap.services.components.MapException: 获取地图名为  世界地图  的地图失败,请检查地图名称是否正确。
 at com.supermap.services.components.impl.MapImpl.queryByDistance(MapImpl.java:748)
 at com.supermap.sample.MapComponentSample.queryByDistanceSample(MapComponentSample.java:88)
 at com.supermap.sample.MapComponentSample.main(MapComponentSample.java:200)

 

 

解决方法:

首先重新加载webapps\iserver\WEB-INF\lib中的所有jar包,然后加载support\objectsjava\bin目录下的jar包(只需加载jar包即可),然后设置系统环境变量将该bin的路径放到path最前面,重启eclipse即可

 

MapProviderSample如果报错也可以这么解决

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics