Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
iungurianu opened this issue Aug 6, 2024 · 0 comments · Fixed by #579
Closed

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

iungurianu opened this issue Aug 6, 2024 · 0 comments · Fixed by #579
Labels
bug Something isn't working

Comments

@iungurianu
Copy link

iungurianu commented Aug 6, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants