Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot 电子邮件服务gmail API停止工作,错误为Null_Spring Boot_Gmail Api_Service Accounts - Fatal编程技术网

Spring boot 电子邮件服务gmail API停止工作,错误为Null

Spring boot 电子邮件服务gmail API停止工作,错误为Null,spring-boot,gmail-api,service-accounts,Spring Boot,Gmail Api,Service Accounts,我的Springboot应用程序使用Gmail服务,它突然停止工作。 我们使用服务帐户,并将从GCP下载的私钥放置在服务器路径中 当它试图处理execute方法时,我只能看到一个Nullpointer异常 Gmail.users().messages().send(Fromaddress, message).execute(); 当我调试时,我能够得到 Gmail.users().messages().send(Fromaddress, message) 一旦执行被命中,它就会失败,并出现空

我的Springboot应用程序使用Gmail服务,它突然停止工作。 我们使用服务帐户,并将从GCP下载的私钥放置在服务器路径中

当它试图处理execute方法时,我只能看到一个Nullpointer异常

Gmail.users().messages().send(Fromaddress, message).execute();
当我调试时,我能够得到

Gmail.users().messages().send(Fromaddress, message)
一旦执行被命中,它就会失败,并出现空指针异常

日志信息: ava.lang.NullPointerException:null 在com.google.api.client.repackaged.com.google.common.base.premissions.checkNotNull(premissions.java:191) 在com.google.api.client.util.premissions.checkNotNull(premissions.java:127)上 位于com.google.api.client.json.jackson2.JacksonFactory.createJsonParser(JacksonFactory.java:92) 在com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:85) 在com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:81) 位于com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:88) 位于com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287) 位于com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307) 在com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:384) 位于com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489) 位于com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:217)