Hi, You may want to check out the discussion on the related closed issue <https://github.com/googleads/googleads-java-lib/issues/19> for the Java client library. That NullPointerException means that your request is failing, probably due to missing parameters in your ~/ads.properties file.
Are you using the latest version of the client library? I ask because the issue was fixed recently by the release of google-oauth-client <http://mvnrepository.com/artifact/com.google.oauth-client/google-oauth-client> 19.0. Thanks, Josh, AdWords API Team On Thursday, November 20, 2014 1:59:34 AM UTC-5, ravindra naik wrote: > > > Hi, > > I am trying to use keyword planner api. I have generated a developer token > from Production MCC account and I am using a test MCC account for testing. > I have created Client Id and client secret key using test account > credentials. > > But I have been getting this exception: > > Exception in thread "main" java.lang.NullPointerException > 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.auth.oauth2.Credential.executeRefreshToken(Credential.java:570) > at > com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:362) > at > com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489) > at > com.google.api.ads.common.lib.auth.OAuth2Helper.callRefreshToken(OAuth2Helper.java:70) > at > com.google.api.ads.common.lib.auth.OfflineCredentials.generateCredential(OfflineCredentials.java:144) > > > Can anyone suggest me as to what to do. I have been trying to fix this > since last two days. Please revert back to this as soon as possible > > Thanks in advance > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/aa6edf64-54e2-4736-b8b0-f18b37124f06%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.