Spring Cloud API Gateway JWT Issue java.lang.ClassNotFoundException javax.xml.bind.DatatypeConverter

I have a problem about sending any request to a defined service through api gateway with the usage of bearer token coming from login. After login, I tried to send a request to a defined service but I got this issue in JWTAuthenticationFilter of api gateway shown below. Here is the link : https://stackoverflow.com/questions/74304377/spring-cloud-api-gateway-jwt-issue-java-lang-classnotfoundexception-javax-xml-b
Stack Overflow
Spring Cloud API Gateway JWT Issue java.lang.ClassNotFoundException...
I have a problem about sending any request to a defined service through api gateway with the usage of bearer token coming from login. After login, I tried to send a request to a defined service but...
3 Replies
JavaBot
JavaBot3y ago
Hey, @direct_x_34! Please remember to /close this post once your question has been answered!
direct_x_34
direct_x_34OP3y ago
@everyone
direct_x_34
direct_x_34OP3y ago
After I added this dependency in the pom.xml of api gateway shown below, I get this issue. How can I fix it? I updated my repository again. Here is the link : https://github.com/Rapter1990/microservicecoursedailybuffer
`<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
`<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
Here is the issue
java.lang.NullPointerException: Cannot invoke "io.jsonwebtoken.Claims.get(Object)" because "claims" is null
at com.microservice.apigateway.filter.JwtAuthenticationFilter.filter(JwtAuthenticationFilter.java:66) ~[classes/:na]
java.lang.NullPointerException: Cannot invoke "io.jsonwebtoken.Claims.get(Object)" because "claims" is null
at com.microservice.apigateway.filter.JwtAuthenticationFilter.filter(JwtAuthenticationFilter.java:66) ~[classes/:na]
GitHub
GitHub - Rapter1990/microservicecoursedailybuffer: Spring Boot Micr...
Spring Boot Microservice Example. Contribute to Rapter1990/microservicecoursedailybuffer development by creating an account on GitHub.
Want results from more Discord servers?
Add your server