关于GeoTools的 Can't load a service for category "MathTransformFactory"解决方案
2013-03-23 08:32
686 查看
最近在使用GeoServer做GIS开发,使用过程中就出现了设置投影的时候,报出了标题上的错误。很郁闷……
publicCoordinateReferenceSystemSetC()throwsIOException{ Stringwkt= "PROJCS[\"UTM_Zone_10N\","+"GEOGCS[\"WGS84\","+ "DATUM[\"WGS84\","+ "SPHEROID[\"WGS84\",6378137.0,298.257223563]],"+ "PRIMEM[\"Greenwich\",0.0],"+ "UNIT[\"degree\",0.017453292519943295],"+ "AXIS[\"Longitude\",EAST],"+"AXIS[\"Latitude\",NORTH]],"+ "PROJECTION[\"Transverse_Mercator\"],"+ "PARAMETER[\"semi_minor\",6356752.314245179],"+ "PARAMETER[\"central_meridian\",-123.0],"+ "PARAMETER[\"latitude_of_origin\",0.0],"+ "PARAMETER[\"scale_factor\",0.9996],"+ "PARAMETER[\"false_easting\",500000.0],"+ "PARAMETER[\"false_northing\",0.0],"+ "UNIT[\"metre\",1.0],"+ "AXIS[\"x\",EAST],"+"AXIS[\"y\",NORTH]]"; try{ CoordinateReferenceSystemcrs=CRS.parseWKT(wkt1); returncrs; }catch(FactoryExceptionparse){ throw(IOException)newIOException("UnabledtoparseWKTEXT intoaCRS:"+ wkt).initCause(parse); } } Inline...CRS.parseWKT(wkt1)wascatchedexception. WARNING:Can'tloadaserviceforcategory"MathTransformFactory".Cause is"NoClassDefFoundError:javax/measure/converter/ConversionException". Exceptioninthread"AWT-EventQueue-0" org.geotools.factory.FactoryNotFoundException:Nofactoryofkind "MathTransformFactory"found. at org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.java:374) at org.geotools.factory.FactoryCreator.getServiceProvider(FactoryCreator.java:143) at org.geotools.referencing.ReferencingFactoryFinder.getFactory(ReferencingFactoryFinder.java:193) atorg.geotools.referencing.ReferencingFactoryFinder.getMathTransformFactory(ReferencingFactoryFinder.java:503) at org.geotools.referencing.factory.ReferencingObjectFactory.getMathTransformFactory(ReferencingObjectFactory.java:152) at org.geotools.referencing.factory.ReferencingObjectFactory.createFromWKT(ReferencingObjectFactory.java:1084) atorg.geotools.referencing.CRS.parseWKT(CRS.java:435) ....... .......
最后才发现:
少拷了两个与其相关的jar包:jsr-275-1.0-beta-2.jar和vecmath-1.3.1.jar。把这两个jar包拷贝到bin目录下就没有问题了
相关文章推荐
- "Developer tools access" 需控制另一个进程才能继续调试 解决方案
- geotools学习之一:java.lang.IllegalArgumentException: Argument "sourceCRS" should not be null.(未完)
- ios内购(iap)关于问题“您已经购买了此程序内购买(In App Purchase)项目,但尚未下载"的解决方案
- 关于"该主机 CPU 类型不支持虚拟化性能计数器"的解决方案
- 关于"使用注册为 allowDefinition='MachineToApplication' 的节是错误的"的解决方案
- 关于"RPC server is unavailable"的解决方案
- 关于"RPC server is unavailable"的解决方案
- xode6 beta版本开发swift 时"Developer tools access" 需控制另一个进程才能继续调试 解决方案
- 关于"使用注册为 allowDefinition='MachineToApplication' 的节是错误的"的解决方案
- 关于"Unsupported major.minor version 51.0" Error 的解决方案
- android中关于tools:context="activity name"解惑
- 关于eclipse的"serializing cdt project settings"解决方案
- DALFactory出现"未能加载文件或程序集“Flashlm.SQLServerDAL”或它的某一个依赖项。系统找不到指定的文件”的解决方案
- 关于Adobe CS3套装的"此产品的许可已停止" 的解决方案
- 关于"使用注册为 allowDefinition='MachineToApplication' 的节是错误的"的解决方案
- android中关于tools:context="activity name"解惑
- DALFactory出现"未能加载文件或程序集“DAL”或它的某一个依赖项。系统找不到指定的文件”的解决方案 .
- 关于“Error: "const char *" 类型的实参与 "LPCWSTR"类型的形参不兼容”错误的解决方案
- ws-xfire跟tomcat冲突引起"javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apach"错误
- 关于"使用注册为 allowDefinition='MachineToApplication' 的节是错误的"的解决方案