Skip to content

IncompatibleClassChangeError: Class org.springframework.http.HttpHeaders does not implement the requested interface java.util.Map #964

@jakeab

Description

@jakeab

Spring Framework 7.0.0-M1 removed Map as a superclass of HttpHeaders.
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-7.0-Release-Notes#httpheaders-changes

When I attempt to run my tests with SF 7.0.0-M5 I receive the following error:

java.lang.IncompatibleClassChangeError: Class org.springframework.http.HttpHeaders does not implement the requested interface java.util.Map
	at org.springframework.util.LinkedCaseInsensitiveMap.putAll(LinkedCaseInsensitiveMap.java:198)
	at org.springframework.util.MultiValueMapAdapter.putAll(MultiValueMapAdapter.java:149)
	at org.springframework.http.HttpHeaders.putAll(HttpHeaders.java:1983)
	at org.springframework.restdocs.operation.HttpHeadersHelper.<init>(HttpHeadersHelper.java:33)
	at org.springframework.restdocs.operation.OperationRequestFactory.augmentHeaders(OperationRequestFactory.java:95)
	at org.springframework.restdocs.operation.OperationRequestFactory.create(OperationRequestFactory.java:48)
	at org.springframework.restdocs.mockmvc.MockMvcRequestConverter.convert(MockMvcRequestConverter.java:69)
	at org.springframework.restdocs.mockmvc.MockMvcRequestConverter.convert(MockMvcRequestConverter.java:61)
	at org.springframework.restdocs.generate.RestDocumentationGenerator.handle(RestDocumentationGenerator.java:186)
	at org.springframework.restdocs.mockmvc.RestDocumentationResultHandler.handle(RestDocumentationResultHandler.java:52)
	at org.springframework.test.web.servlet.MockMvc$1.andDo(MockMvc.java:217)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions