報錯信息:從applicationcontext.xml中定義的Bean初始化創建失敗。
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'KMLMapProducer' defined in URL [jar:file:/D:/geoserver-newest/libs/gs-kml-2.19.0.jar!/applicationContext.xml]: Bean instantiation via constructor failed; nested exception is java.lang.NoSuchMethodError: org.geoserver.wms.MapProducerCapabilities.<init>(ZZZZLjava/lang/String;)V
原因是找不到方法org.geoserver.wms.MapProducerCapabilities(String zzzz)。
nested exception什么意思?嵌套錯誤?參數錯誤?
分析:
KML初始化時要調用WMS的一個方法,而該方法實際上是存在的,但是卻找不到
其實org.geoserver.wms.MapProducerCapabilities方法是存在的。。。刪除了gs-wms.jar之后還是報錯。。
其實,編譯WMS根本用不着KML啊。。。為什么會去調KML呢???刪除KML.jar后便通過了test。。
總結:編譯wms-test用不着kml。。