Ambiguous Handler Methods Error When Seeding Cache Using GeoServer REST API
iungurianu opened this issue · 0 comments
Description:
I am attempting to create a cache for a layer using the GeoServer Cloud REST API and GeoWebCache. Despite following the configuration steps, I am encountering an java.lang.IllegalStateException error related to ambiguous handler methods when trying to seed the cache.
Environment:
GeoServer Cloud: 1.8.9
GeoWebCache version: 1.25
Steps to Reproduce:
- GeoWebCache Configuration:
- My geowebcache.xml configuration is as follows:
<?xml version="1.0" encoding="utf-8"?>
<gwcConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://geowebcache.org/schema/1.24.0 http://geowebcache.org/schema/1.24.0/geowebcache.xsd" xmlns="http://geowebcache.org/schema/1.24.0">
<version>1.24.0</version>
<backendTimeout>120</backendTimeout>
<blobStores/>
<gridSets>
<gridSet>
<name>EPSG:3857</name>
<srs>
<number>3857</number>
</srs>
...
</gridSet>
</gridSets>
<layers/>
</gwcConfiguration>
- API Call
- I use the following CURL command to initiate the caching:
curl -u admin:password -XPOST -H "Content-type: text/xml" -d '<seedRequest>
<name>workspace:layer</name>
<srs><number>3857</number></srs>
<zoomStart>0</zoomStart>
<zoomStop>8</zoomStop>
<format>image/png</format>
<type>reseed</type>
<threadCount>2</threadCount>
</seedRequest>' "http://localhost:63068/geoserver/gwc/rest/seed/workspace:layer.xml"
- Error Encountered:
- Accessing the endpoint directly in the browser or using the API results in an XML file without any style information, showing only
<long-array-array/>
. - The logs display the following error:
java.lang.IllegalStateException: Ambiguous handler methods mapped for '/geoserver/gwc/rest/seed/workspace:layer.xml': {public org.springframework.http.ResponseEntity org.geowebcache.rest.controller.SeedController.seedOrTruncateWithXmlPayload(javax.servlet.http.HttpServletRequest,java.io.InputStream,java.lang.String), public org.springframework.http.ResponseEntity org.geowebcache.rest.controller.SeedController.doPost(javax.servlet.http.HttpServletRequest,java.io.InputStream,java.lang.String,java.util.Map)}
- The error inside the Terminal after running the curl command:
<Map><timestamp>1722926495200</timestamp><status>500</status><error>Internal Server Error</error><path>/gwc/rest/seed/workspace:layer.xml</path></Map>
- Additional information
- the layer uses the default style