Spring Boot Microservice Full authentication is required to access this resource Error

Hi, I have got a problem in sending a request to other services from one service. I got this error shown below.
org.springframework.web.client.HttpClientErrorException$Unauthorized: 401 : "{ "error": "Full authentication is required to access this resource" }<EOL><EOL>"
org.springframework.web.client.HttpClientErrorException$Unauthorized: 401 : "{ "error": "Full authentication is required to access this resource" }<EOL><EOL>"
Here is the link : https://stackoverflow.com/questions/74843944/spring-boot-microservice-org-springframework-web-client-httpclienterrorexception How can I fix it?
Stack Overflow
Spring Boot Microservice org.springframework.web.client.HttpClientE...
I have a problem about sending a request to other service from one service. All services have security. That's why you couldn't send a request to url without the bearer token. I defined bearer toke...
9 Replies
JavaBot
JavaBot•3y ago
Hey, @direct_x_34! Please remember to /close this post once your question has been answered!
dan1st
dan1st•3y ago
Why did you create multiple posts?
direct_x_34
direct_x_34OP•3y ago
Cause the issues are seperate
dan1st
dan1st•3y ago
oh ok
direct_x_34
direct_x_34OP•3y ago
I shared all information about it.
direct_x_34
direct_x_34OP•3y ago
Here is the screenshot.
No description
direct_x_34
direct_x_34OP•3y ago
Can you help me how to fix my issue?
org.springframework.web.client.HttpClientErrorException$Unauthorized: 401 : "{ "error": "Full authentication is required to access this resource" }"
at org.springframework.web.client.HttpClientErrorException.create(HttpClientErrorException.java:105) ~[spring-web-5.3.22.jar:5.3.22]
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:168) ~[spring-web-5.3.22.jar:5.3.22]
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:122) ~[spring-web-5.3.22.jar:5.3.22]
at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63) ~[spring-web-5.3.22.jar:5.3.22]
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:819) ~[spring-web-5.3.22.jar:5.3.22]
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:777) ~[spring-web-5.3.22.jar:5.3.22]
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:711) ~[spring-web-5.3.22.jar:5.3.22]
at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:602) ~[spring-web-5.3.22.jar:5.3.22]
at com.microservice.orderservice.service.impl.OrderServiceImpl.getOrderDetails(OrderServiceImpl.java:113) ~[classes/:na]
at com.microservice.orderservice.controller.OrderController.getOrderDetails(OrderController.java:43) ~[classes/:na]
org.springframework.web.client.HttpClientErrorException$Unauthorized: 401 : "{ "error": "Full authentication is required to access this resource" }"
at org.springframework.web.client.HttpClientErrorException.create(HttpClientErrorException.java:105) ~[spring-web-5.3.22.jar:5.3.22]
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:168) ~[spring-web-5.3.22.jar:5.3.22]
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:122) ~[spring-web-5.3.22.jar:5.3.22]
at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63) ~[spring-web-5.3.22.jar:5.3.22]
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:819) ~[spring-web-5.3.22.jar:5.3.22]
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:777) ~[spring-web-5.3.22.jar:5.3.22]
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:711) ~[spring-web-5.3.22.jar:5.3.22]
at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:602) ~[spring-web-5.3.22.jar:5.3.22]
at com.microservice.orderservice.service.impl.OrderServiceImpl.getOrderDetails(OrderServiceImpl.java:113) ~[classes/:na]
at com.microservice.orderservice.controller.OrderController.getOrderDetails(OrderController.java:43) ~[classes/:na]
Here is the github link : https://github.com/Rapter1990/springbootmicroservicedailybuffer
GitHub
GitHub - Rapter1990/springbootmicroservicedailybuffer
Contribute to Rapter1990/springbootmicroservicedailybuffer development by creating an account on GitHub.
direct_x_34
direct_x_34OP•3y ago
Maybe there can be problem in security config of payment service and product service. Can you help me?
JavaBot
JavaBot•3y ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one.
Want results from more Discord servers?
Add your server