Java SDK Errors and Solutions

Exception while fetching access tokens from refresh tokens

Reason

The grant token was generated from the "accounts.zoho.com" domain, but domain suffix was given as "eu" domain.

Solution

Provide the same domain suffix in the "zcrm_configuration.properties" file.

java.lang.NullPointerException

Reason

The user has not specified the persistence handler class.

Solution

Specify the persistence handler class in the "oauth_configuration.properties" file.

Exception while retrieving tokens from persistence

Reason

The "oauth_token_file_path" key was not specified in the "oauth_configuration.properties" file.

Solution

Provide the oauth_token_file_path in the respective file.

Current user must be either set in ZCRMRestClient or configuration.properties

Reason

The currentUserEmail must have been left empty.

Solution

Specify the currentUserEmail.

Invalid Client

Reason

The client_id and the client_secret keys must have been left empty.

Solution

Provide the two keys in the oauth_configuration.properties file.

Exception while fetching access tokens from grant token

Reason

The grant token has expired.

Solution

Regenerate the grant token use it to generate new access token within the stipulated time.

Invalid OAuth token

Reason

The user has generated access token and is trying to access module record from different domains. For example, the user generates the access token from accounts.zoho.com and tries to fetch module record data from accounts.zoho.eu.

Solution

Use the same domain.

Invalid OAuth scope

Reason

The user must have not specified the Aaaserver.profile.read scope while generating the grant token.

Solution

Include Aaaserver.profile.read in the scope and generate a new grant token.

Exception in main:Java.Lang.NullPointerException

Reason

The ZCRMRestClient must have not been initialized in the app.

Solution

Include ZCRMRestClient.initialize() in the code.

Error: Connect to workspace-zoho.csez.zohocorpin.com:443

Reason

The "apiVersion" key in the configuration dictionary is "V2", with a capital "V".

Solution

Change the value of apiVersion to "v2" in the configuration dictionary.