Skip to content

Ambiguous Handler Methods Error When Seeding Cache Using GeoServer REST API #502

Closed
@iungurianu

Description

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:

  1. 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>
  1. 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"
  1. 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>
  1. Additional information
  • the layer uses the default style

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions