我的github
posts - 3243,  comments - 42,  views - 158万

 

 setCRS失败。。

org.postgresql.util.PSQLException: 致命错误: 用户 "Geotools" Password 认证失败 (pgjdbc: autodetected server-encoding to be GB2312, if the message is not readable, please check database logs and/or host, port, dbname, user, password, pg_hba.conf)
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:438)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:222)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:194)
at org.postgresql.Driver.makeConnection(Driver.java:450)
at org.postgresql.Driver.connect(Driver.java:252)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:94)
at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:79)
at org.geotools.referencing.factory.epsg.DirectEpsgFactory.getConnection(DirectEpsgFactory.java:3302)
at org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:436)
at org.geotools.referencing.factory.DeferredAuthorityFactory.getBackingStore(DeferredAuthorityFactory.java:133)
at org.geotools.referencing.factory.BufferedAuthorityFactory.isAvailable(BufferedAuthorityFactory.java:235)
at org.geotools.referencing.factory.DeferredAuthorityFactory.isAvailable(DeferredAuthorityFactory.java:119)
at org.geotools.factory.FactoryRegistry.isAvailable(FactoryRegistry.java:667)
at org.geotools.factory.FactoryRegistry.isAcceptable(FactoryRegistry.java:501)
at org.geotools.factory.FactoryRegistry$1.filter(FactoryRegistry.java:192)
at javax.imageio.spi.FilterIterator.advance(ServiceRegistry.java:821)
at javax.imageio.spi.FilterIterator.<init>(ServiceRegistry.java:815)
at javax.imageio.spi.ServiceRegistry.getServiceProviders(ServiceRegistry.java:516)
at org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:197)
at org.geotools.referencing.ReferencingFactoryFinder.getFactories(ReferencingFactoryFinder.java:180)
at org.geotools.referencing.ReferencingFactoryFinder.getCRSAuthorityFactories(ReferencingFactoryFinder.java:455)
at org.geotools.referencing.DefaultAuthorityFactory.getBackingFactory(DefaultAuthorityFactory.java:89)
at org.geotools.referencing.DefaultAuthorityFactory.<init>(DefaultAuthorityFactory.java:69)
at org.geotools.referencing.CRS.getAuthorityFactory(CRS.java:263)
at org.geotools.referencing.CRS.decode(CRS.java:525)
at com.lzugis.geotools.utils.FeaureUtil.creatSimpleFeatureType(FeaureUtil.java:52)
at com.lzugis.geotools.utils.FeaureUtil.creatSimpleFeatureByFeilds(FeaureUtil.java:156)
at org.geotools.tutorial.quickstart.EquiSurface.clipFeatureCollection(EquiSurface.java:143)
at org.geotools.tutorial.quickstart.EquiSurface.calEquiSurface(EquiSurface.java:97)
at org.geotools.tutorial.quickstart.EquiSurface.main(EquiSurface.java:296)

参考:https://docs.geotools.org/stable/javadocs/org/geotools/feature/simple/SimpleFeatureTypeBuilder.html

参考2:https://www.cnblogs.com/tuboshu/p/10752281.html(Geotools创建Feature的两种方式)

>>geotools - how to `CRS.decode` without loading hsql?:https://stackoverflow.com/questions/55788089/geotools-how-to-crs-decode-without-loading-hsql

>>GeoTools入门(五)-- CRS操作:https://blog.csdn.net/oYinHeZhiGuang/article/details/118315724

官方关于CRS的说明:https://docs.geotools.org/latest/userguide/library/referencing/crs.html

CRS->DirectEpsgFactory

To hook this up make sure you have one of the gt-epsg plugins on your CLASSPATH. The gt-epsg-hsql plugin is recommended.

 DirectEpsgFactory在package org.geotools.referencing.factory.epsg;包下,

然后getConnection就发动了。。

然后就找到了DriverManager了。。

然后就报错了。。

奇怪,如果不安装postgresql,难道就不能用setCRS了吗?

posted on   XiaoNiuFeiTian  阅读(491)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
历史上的今天:
2021-01-25 ArcGIS中Interpolater Polygon to Multipatch(3D)用法及原理——多边形转面片
2021-01-25 arcgis删除重复的线段
2019-01-25 使用卫星数据创建地形视频教程
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示