Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

ReactiveErrorAttributes uses inexistent DefaultErrorAttributes(boolean) constructor #113

Open
paskos opened this issue Sep 10, 2021 · 0 comments

Comments

@paskos
Copy link

paskos commented Sep 10, 2021

Our service uses spring-boot version 2.5.4.
When trying to use errors-spring-boot-starter version 1.4.0 we get this exception at startup.

Caused by: java.lang.NoSuchMethodError: void org.springframework.boot.web.reactive.error.DefaultErrorAttributes.<init>(boolean)
        at me.alidg.errors.adapter.attributes.ReactiveErrorAttributes.<init>(ReactiveErrorAttributes.java:43)
	at me.alidg.errors.conf.ReactiveErrorsAutoConfiguration.errorAttributes(ReactiveErrorsAutoConfiguration.java:38)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at arg.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)

It seems that ReactiveErrorAttributes refers to an inexistent constructor in spring DefaultErrorAttributes

public ReactiveErrorAttributes(WebErrorHandlers webErrorHandlers,
                                   HttpErrorAttributesAdapter httpErrorAttributesAdapter) {
        super(true);
        this.webErrorHandlers = requireNonNull(webErrorHandlers, "Web error handlers is required");
        this.httpErrorAttributesAdapter = requireNonNull(httpErrorAttributesAdapter, "Adapter is required");
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant