运行geoserver,出现异常:
Caused by: org.geotools.data.DataSourceException: No reader avalaible for this source
at org.geotools.gce.image.WorldImageReader.getHRInfo(WorldImageReader.java:293)
at org.geotools.gce.image.WorldImageReader.<init>(WorldImageReader.java。
上网搜了下,牛人给出解决方案(http://geo-solutions.blogspot.com/2010/05/fix-geotools-and-geoserver-not-able-to.html),但是被墙了,所以在这记录下:
The Problem
Lately some GeoTools and GeoServer users reported issues related to
GeoTools raster plugins not being properly loaded in Tomcat 6.0.24 and
above.
Typical scenario is as follows: Geoserver deployed in Tomcat 6.0.26
along with the GDAL ImageIO-Ext extensions. The available GDAL formats
properly appear in the Store user interface but, when trying to
configure a new coverage, an error is reported and the logs shows the
following message
Caused by: java.lang.IllegalArgumentException: Incorrect input type!
at javax.imageio.ImageReader.setInput(ImageReader.java:290)
at
it.geosolutions.imageio.gdalframework.GDALImageReader.setInput(GDALImageReader.java:838)
The cause
Behind the scenes this is what is happening:
- In latest Tomcat releases a huge amount of work
has been put in in order to solve some memory leaks that were causing
Out Of Memory (OOM) errors during web application reload.
- Specifically the problems seems to be the JreLeakPreventionListener
which interferes badly with the ImageIO IIORegistry where the low level raster plugins are registered. The JreLeakPreventionListener
basically deregister
them all during web application startup to prevent memory leaks.
The solution
Providing a general solution is not dead easy, since this is a bug at
theJDK/JRE level (there is where the IIORegistry resides). However, two
different workarounds can be implemented, with different impact on the
application lifecycle:
- Set the JreMemoryLeakPreventionListener
attribute called appContextProtection
to "false" in Tomcat's server.xml
configuration file (found under the conf
directory of the Tomcat installation). Notice that this will leave
memory leaks around in case you re-deploy GeoServer multiple times which
requires a restart of Tomcat itself. This is not a problem in case you
don't plan to redeploy GeoServer frequently.
- You can move all the JAI and ImageIO jars from GeoServer WEB-INF/lib
directory to Tomcat's shared/lib folder in order to share them between
all the web context in tomcat. This will not leave any memory leak
around but in case you have other applications deployed inside the same
Tomcat instance which contains JAI or ImageIO libraries, you need to
remove them as well or you might get class-loading conflicts.
Ciao a tutti,
Simone.
分享到:
相关推荐
org.geotools.arcsde.data org.geotools.arcsde.data.view org.geotools.arcsde.filter org.geotools.arcsde.jndi org.geotools.arcsde.logging org.geotools.arcsde.raster.gce org.geotools.arcsde.raster....
import org.geotools.data.FileDataStore; import org.geotools.data.FileDataStoreFinder; import org.geotools.data.simple.SimpleFeatureSource; import org.geotools.map.FeatureLayer; import org.geotools.map...
org.geotools.arcsde.data org.geotools.arcsde.data.versioning org.geotools.arcsde.data.view org.geotools.arcsde.filter org.geotools.arcsde.gce org.geotools.arcsde.gce.band org.geotools.arcsde.gce...
例如,要读取一个Shapefile,可以使用`org.geotools.data.shapefile.ShapefileDataStoreFactory`工厂类创建数据存储,再通过`org.geotools.data.DataStoreFinder`获取数据。接着,使用`org.geotools.feature....
《GeoTools源码构建的关键依赖解析》 GeoTools是一个开源的Java库,专门用于地理信息系统(GIS)开发,它提供了一系列API和工具,使得开发者能够处理地理数据、地图以及空间操作。在构建GeoTools源码时,由于网络...
在压缩包子文件的文件名称列表中没有给出具体文件,但通常,使用GeoTools开发时,除了上述两个jar包,还需要其他的GeoTools模块,例如gt-data、gt-referencing、gt-geometry等,它们共同协作完成复杂的地理空间任务...
GeoTools是一个开源的Java库,专门用于处理地理空间数据和执行与GIS(地理信息系统)相关的操作。这个"geoTools所需jar包"包含了经过编译和打包的GeoTools库,使得开发者可以直接在他们的项目中使用,而无需经历繁琐...
GeoTools是一个开源的Java库,专门用于处理地理空间数据,它是基于Open Geospatial Consortium (OGC)标准的实现。这个压缩包包含了GeoTools库的版本18.4,是开发地理信息系统(GIS)应用的重要工具。在GIS领域,开发者...
GeoTools工具包是一款开源的Java库,专门设计用于地理信息系统(GIS)开发,它提供了对各种地理空间数据格式的支持,包括但不限于Shapefile(shp文件)。这个强大的工具包允许开发者在Java环境中对地理数据进行读取...
GeoTools是一个开源的Java库,专门用于处理地理空间数据。这个“geotools依赖包”包含了一组模块,用于支持各种地理信息系统(GIS)的功能,如读取、写入和操作地理空间数据。GeoTools库遵循Java Community Process ...
- Group Id: `org.geotools` - Artifact Id: `tutorial` - Version: `1.0-SNAPSHOT` - 点击下一步,设置项目名称(此名称仅在 IntelliJ IDEA 内部使用),并保持默认的位置设置。 - 最后点击完成,开始创建项目...
这个压缩包文件“geotools-18.4”包含了`geotools`库的一个特定版本,即18.4,这将对那些需要在项目中使用`geotools`功能的开发者非常有用。 `geotools`库的核心目标是实现OGC(开放地理空间联盟)标准,这些标准...
GeoTools 对 WMS 的实现支持 GeoTools 是一个遵循 OGC 规范的开源 GIS 工具包,提供了地理信息数据读写、处理、坐标转换、查询分析、格式化输出等多个方面的功能。在 GeoTools 的基础上,我们可以实现一个简单的 ...
import org.geotools.data.shapefile.ShapefileDataStoreFactory; import org.geotools.feature.Schema; import org.opengis.feature.simple.SimpleFeatureType; import java.io.File; import java.util.HashMap; ...
GeoTools是一个开源的Java库,专门用于处理地理信息系统(GIS)的数据和功能。这个"geotools-bin,24.2,版本bin包"包含了GeoTools库的二进制文件,使得开发者能够轻松地在Java应用程序中集成GIS功能。这个版本号24.2...
通过GeoTools的`org.geotools.referencing`包,可以方便地获取、创建和操作CRS。在进行转换时,可以使用`Transform`接口来实现从一种CRS到另一种CRS的平移。 此外,Geotools还提供了丰富的数据访问功能,如读取和...
《基于GeoTools的GIS操作与坐标转换DEMO详解》 在IT行业中,地理信息系统(GIS)扮演着重要的角色,尤其在处理地图数据和空间分析时。GeoTools是一个开放源码的Java库,专为开发人员提供了强大的GIS工具,用于处理...
org.geotools.gt-shapefile.24.4 org.geotools.gt-opengis.24.4 org.geotools.gt-main.24.4 org.geotools.gt-metadata.24.4 org.geotools.gt-referencing.24.4 org.geotools.gt-geojson.24.4 maven引用,例: ...