Email service gmail-API stopped working with Error as Null

Viewed 100

My Springboot application uses Gmail service, which suddenly stopped working. we use service account, and a private key downloaded from GCP placed in server path

I could see only a Nullpointer exception , when it is trying to process the execute method

Gmail.users().messages().send(Fromaddress, message).execute();

When i debug, i am able to get the values till

Gmail.users().messages().send(Fromaddress, message)

Once the execute is hit , it fails with Null pointer exception

Log info: ava.lang.NullPointerException: null at com.google.api.client.repackaged.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191) at com.google.api.client.util.Preconditions.checkNotNull(Preconditions.java:127) at com.google.api.client.json.jackson2.JacksonFactory.createJsonParser(JacksonFactory.java:92) at com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:85) at com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:81) at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:88) at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287) at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307) at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:384) at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489) at com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:217)

0 Answers
Related