function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
LosintikfosLosintikfos 

com.sforce.soap.enterprise.sobject.impl.SObjectImpl

Hi Experts,

It Looks like i am battle with some interface implentation issue here!
I am getting the error:

Area java.lang.ClassCastException: com.sforce.soap.enterprise.sobject.impl.SObjectImpl cannot be cast to com.sforce.soap.enterprise.sobject.Account

From doing the following;
Code:
Account obj = (Account)sObjects[j];

Closely look at the trace reveals that, the Account and SObject interface and implementation classes in the packages;
com.sforce.soap.enterprise.sobject and
com.sforce.soap.enterprise.sobject.impl
Are not doing the job when deployed to the webservice server and hence the ClassCastException.

Do anyone know if this is a bug or something missing in my application!


Pls. Hlp.:smileysad:


Best Answer chosen by Admin (Salesforce Developers) 
LosintikfosLosintikfos
Sorted!

All Answers

LosintikfosLosintikfos
Sorted!
This was selected as the best answer
ShishirShishir

Hi Could you please tell me, how did you over come this problem?

Iam struck with the same issue.

LosintikfosLosintikfos

If you have recently made changes to salesforce object from the web portal, then download the current version of the WSDl and re-generate the stubs.

 

Try this.