+ Start a Discussion

issue while using the metadata api

I have an issue while using the metadata api the issue is -
We are using metadata api to get the report information (like criteria, fields selected, etc...). But we are getting error while using the API call 'retrieve'. Error is "java.io.IOException: Non nillable element 'version' is null." We are accessing this API in java. what will be the problem?
Please help me out of this issue as its urjent requirement for me. 
Thanks and Regards

Best Answer chosen by Admin (Salesforce Developers) 
Mark SFMark SF

You need to set the API version for the retrieve request:


private static final double API_VERSION = 17.0;

RetrieveRequest retrieveRequest = new RetrieveRequest();


See the doc at


for a complete Java sample.