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

Crnk error handling is not compatible with Spring Boot 2.5 #816

Closed
pete-w opened this issue May 28, 2021 · 3 comments · Fixed by #821
Closed

Crnk error handling is not compatible with Spring Boot 2.5 #816

pete-w opened this issue May 28, 2021 · 3 comments · Fixed by #821

Comments

@pete-w
Copy link

pete-w commented May 28, 2021

In particular CrnkErrorController.errorToJsonApi() calls AbstractErrorController.getErrorAttributes() which takes a boolean in 2.4 but in 2.5 expects an ErrorAttributeOptions resulting in the following stacktrace:

java.lang.NoSuchMethodError: 'java.util.Map io.crnk.spring.setup.boot.mvc.CrnkErrorController.getErrorAttributes(javax.servlet.http.HttpServletRequest, boolean)'
	at io.crnk.spring.setup.boot.mvc.CrnkErrorController.errorToJsonApi(CrnkErrorController.java:39) ~[crnk-setup-spring-boot2-3.4.20210509072026.jar:na]
	at io.crnk.spring.setup.boot.mvc.CrnkErrorController.error(CrnkErrorController.java:64) ~[crnk-setup-spring-boot2-3.4.20210509072026.jar:na]
	...
@datagitlies
Copy link
Contributor

I too am experiencing this issue. Below is a link directly to the method that was deprecated in Spring Boot 2.3 and then removed in Spring Boot 2.5 - @remmeier - I'll open a pull request if that will help.

AbstractErrorController.java:78

@rohitb1985
Copy link

In which version of Crnk can we expect this to be fixed?

@datagitlies
Copy link
Contributor

Workaround - In the absence of pull request #821 being accepted and a new version of crnk being released... I'm using the following workaround to just exclude the configuration for the CrnkErrorController so I can update Spring Boot to v2.5.X

@SpringBootApplication(exclude = {io.crnk.spring.setup.boot.mvc.CrnkErrorControllerAutoConfiguration.class})

@pete-w @rohitb1985 @Incanus3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants