+ Start a Discussion
smitrasmitra 

DescribeSObjectResult[] dsrArray = connection.describeSObjects(new String[] { objectToDescribe });

DescribeSObjectResult[] dsrArray = connection.describeSObjects(new String[] { objectToDescribe });

 

The above line is throwing the below error:

 


com.sforce.ws.ConnectionException: Unexpected element. Parser was expecting element 'urn:enterprise.soap.sforce.com:permissionable' but found 'urn:enterprise.soap.sforce.com:precision'
at com.sforce.ws.bind.TypeMapper.verifyTag(TypeMapper.java:386)
at com.sforce.ws.bind.TypeMapper.verifyElement(TypeMapper.java:415)
at com.sforce.soap.enterprise.Field.loadFields(Field.java:1)
at com.sforce.soap.enterprise.Field.load(Field.java:1)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:628)
at com.sforce.ws.bind.TypeMapper.readArray(TypeMapper.java:528)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:506)
at com.sforce.soap.enterprise.DescribeSObjectResult.loadFields(DescribeSObjectResult.java:1)
at com.sforce.soap.enterprise.DescribeSObjectResult.load(DescribeSObjectResult.java:1)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:628)
at com.sforce.ws.bind.TypeMapper.readArray(TypeMapper.java:528)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:506)
at com.sforce.soap.enterprise.DescribeSObjectsResponse_element.loadFields(DescribeSObjectsResponse_element.java:1)
at com.sforce.soap.enterprise.DescribeSObjectsResponse_element.load(DescribeSObjectsResponse_element.java:1)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:628)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:504)
at com.sforce.ws.transport.SoapConnection.bind(SoapConnection.java:173)
at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:147)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:98)
at com.sforce.soap.enterprise.EnterpriseConnection.describeSObjects(EnterpriseConnection.java:1)
at com.example.samples.QuickstartApiSample.describeSObjectsSample(QuickstartApiSample.java:171)
at com.example.samples.QuickstartApiSample.run(QuickstartApiSample.java:53)
at com.example.samples.QuickstartApiSample.main(QuickstartApiSample.java:43)

 

 

smitrasmitra
hi It seems there is some permission issue with the object can anyone let me know
Doug JDoug J

I have the same problem, however, it only happens when I am trying to use a production org in Saleforce.  Using "DescribeSObjectResult" works fine for me as long as I am using it in a sandbox.  I suspected issues with the partner jar.  I tried making sure that the partner jar was created using a partner wsdl, but that did not help.

 

If you learn the answer, I would sure like to know what it is.  If I find out I will come back here and leave another reply.