Salesforce DataLoader Error: The sobject initialization failed…

I encountered a really strange issue today when trying to export data from Salesforce using DataLoader.  In Step 2 of the export process (the “Select Data Objects” step), for many of  the objects in my company’s org, I was getting an error message that read, “The sobject initialization failed.  Please try again,” when I would select the object and then clicked, “Next.”  I tried everything I could think of to fix the problem.  I checked object access levels in Salesforce.  I tried uninstalling and reinstalling DataLoader (version 32).  I tried restarting my machine.   None of it worked.

Then, I tried another machine that had DataLoader installed.  It was version 30, and it worked.  Sadly, though, the version difference was a red herring, and had nothing to do with the problem.   I installed version 32 on that other machine, and it still worked.  So, that led me to think their was some issue on the other machine preventing DataLoader from properly initializing some SObjects.

My Google searches for the error message didn’t yield much, but I did find my way to a labels.properties file in the GitHub space for the DataLoader project.  In that file, I saw the error message I’d been searching for on Google:  “The sobject initialization failed. Please try again.”  That made me think, “Hey, DataLoader is built in Java.  I wonder if this failure has anything to do with my Java installation.”  I actually have multiple versions of Java on the machine.  My system path had both of the following references:

C:\ProgramData\Oracle\Java\javapath;
C:\Program Files\Java\jdk1.7.0_71\bin;

I thought to myself, “I wonder if the multiple versions of Java are messing things up.  So, I removed the second of those two entries from my path variable, restarted DataLoader, and the I was then able to get past the point where I had been getting that error message.

Here’s the funny part, though.  After I had succeeded, I put my path variable value back to what it had been previously.  I had pasted it into Notepad++ so I could restore it afterword.  I closed and reopened DataLoader…and I could still initialize the SObject that was failing before.   So, I restarted my computer, confirmed that the path was what it had been originally…and I STILL didn’t get the error.

Frankly, I can’t explain exactly what’s going on here.  But, changing the path entries for Java as I did seems to have resolved the problem. If you encounter this problem and have multiple versions of Java, you might try removing one of the installation paths from your system path variable.

For reference, here are the Java versions on that machine:

Java 7 Update 67
Java 7 Update 71 (64 bit)
Java 8 Update 25
Java SE Development Kit 7 Update 71 (64 bit)

I now post this in the hope that it will save some developer / administrator out there in the world the hours of troubleshooting I just went through…

Leave a comment