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
RocanionRocanion 

Dataloader 7 build problems

I've customized the dataloader code because some data, such as addresses, contains new line characters within the CSV file. This confuses not only Excel but also pretty everything else that we use to parse the CSV files. So I changed the CSVColumnVisitor.java file to replace carriage return and line feed characters with a vertical bar (aka pipe) character so that we can do something useful with the data.

Now I'm trying to build the code and things are not going well. Some files seem to be either missing or not building.

I've tried to rebuild the code on several different machines.

I've built it successfully within Eclipse on a Windows XP box and it runs with the code changes I made. Great! Now I just need to copy the sforcedataloader.jar file to my target system and I'm all set! Sorry, the jar file is an old one and does not contain my changes. So where is the new one? Apparently Eclipse didn't make one. Okay, then how is it running the new code? I have no idea.

Okay, so try a different way. I downloaded the zip file to a Red Hat Enterprise Linux system. Got Java SDK 1.4.2-08, got ant, changed the code, tried a build and got an error trying to resolve a symbol. I investigated and found that there seems to be no source or class files related to the com.sforce.soap.partner packages! I have no idea why they would be missing.

Well, if I built it okay using Eclipse before perhaps that's the magic. So I install Eclipse. The latest version is 3.2 which requires Java 1.5. I install both, thinking that with Java 1.4.2 and 1.5 on the system I'll be able to use either one. I go ahead and build within Eclipse and it works! But still no updated jar file. Hmm, so what if I do 'ant jar_dataloader' from the command line? It works! I now have an updated jar file in a new jar directory. But it doesn't work. It won't work with Java 1.5, as you know. And when I try to use it with Java 1.4 I get a major.minor version mismatch error that indicates that I'm trying to use a 1.5 library or class with 1.4.

So at this point I'm pretty stumped. Any helpful ideas on how to get this code to actually build so that I can run the CLI on Linux would be greatly appreciated.

SuperfellSuperfell
the com.sforce.soap.partner classes are code gen'd by running WSDL2Java, i believe there's an ant target to generate those classes.
RocanionRocanion
Simon, thanks, nice try but it doesn't help.

The build.xml file contains six possible targets.
  1. partnerwsdl
  2. compile_partnerwsdl
  3. jar_partnerwsdl
  4. compile_dataloader
  5. jar_dataloader
  6. run_dataloader
I have executed these by hand using ant on the command line in the order specified above. I can see that the partnerwsdl target does execute WSDL2Java. Targets 1, 2 and 3 above build fine. But the compile_dataloader target crashes and burns.

Here's a snippet of the error text:

compile_dataloader:
    [javac] Compiling 103 source files to /home/dcoutu/sfdl/classes
    [javac] /home/dcoutu/sfdl/src/com/sforce/dataloader/client/PartnerClient.java:574: cannot resolve symbol
    [javac] symbol  : class UpsertResult
    [javac] location: class com.sforce.dataloader.client.PartnerClient
    [javac]     public UpsertResult[] loadUpserts(List dynaBeans, String externalId) throws RemoteException {
    [javac]            ^
    [javac] /home/dcoutu/sfdl/src/com/sforce/dataloader/action/visitor/UpsertVisitor.java:39: cannot resolve symbol
    [javac] symbol  : class UpsertResult
    [javac] location: package partner
    [javac] import com.sforce.soap.partner.UpsertResult;
    [javac]                                ^

As you can clearly see the compile is failing because it can't find the partner routines associated with Upserting.

RocanionRocanion
FYI, the problem with building seemed to be related to the build method and build environment.

I finally found a system with Eclipse 3.1 (rather than 3.2) and Java 1.4 and ant. Did the initial build using ant, rather than Eclipse, and the builds now work fine, even in Eclipse. I still don't know exactly what is going wrong in the other environments. If some more explicit instructions on how to build from source could be provided that would make this tool much more useful.

Thanks!

nehalshahnehalshah

We are having similar issue. We are trying to install DataLoader 7 on Sun OS and getting following errors. If some can post step by step instruction on how to build the DataLoader on Sun OS that would great. We also tried installing Eclipse but that also doesn't work on Sun OS.

compile_dataloader:
    [javac] Compiling 106 source files to /usr/local/sforcedataloader/classes
    [javac] /usr/local/sforcedataloader/src/com/sforce/dataloader/client/PartnerClient.java:574: cannot find symbol
    [javac] symbol  : class UpsertResult
    [javac] location: class com.sforce.dataloader.client.PartnerClient
    [javac]     public UpsertResult[] loadUpserts(List dynaBeans, String externalId) throws RemoteException {
    [javac]            ^
    [javac] /usr/local/sforcedataloader/src/com/sforce/dataloader/action/visitor/UpsertVisitor.java:39: cannot find symbol
    [javac] symbol  : class UpsertResult
    [javac] location: package com.sforce.soap.partner
    [javac] import com.sforce.soap.partner.UpsertResult;
    [javac]                                ^
    [javac] /usr/local/sforcedataloader/src/com/sforce/dataloader/client/PartnerClient.java:620: cannot find symbol
    [javac] symbol  : class UpsertResult
    [javac] location: class com.sforce.dataloader.client.PartnerClient
    [javac]           UpsertResult[] ur = binding.upsert(externalId, sObjects);
    [javac]           ^
    [javac] /usr/local/sforcedataloader/src/com/sforce/dataloader/client/PartnerClient.java:620: cannot find symbol
    [javac] symbol  : method upsert(java.lang.String,com.sforce.soap.partner.sobject.SObject[])
    [javac] location: class com.sforce.soap.partner.SoapBindingStub
    [javac]           UpsertResult[] ur = binding.upsert(externalId, sObjects);
    [javac]                                      ^
    [javac] /usr/local/sforcedataloader/src/com/sforce/dataloader/action/visitor/UpsertVisitor.java:72: cannot find symbol
    [javac] symbol  : class UpsertResult
    [javac] location: class com.sforce.dataloader.action.visitor.UpsertVisitor
    [javac]       if (results instanceof UpsertResult[]) {
    [javac]                              ^
    [javac] /usr/local/sforcedataloader/src/com/sforce/dataloader/action/visitor/UpsertVisitor.java:73: cannot find symbol
    [javac] symbol  : class UpsertResult
    [javac] location: class com.sforce.dataloader.action.visitor.UpsertVisitor
    [javac]         UpsertResult upsertRes = (UpsertResult) results[i];
    [javac]         ^
    [javac] /usr/local/sforcedataloader/src/com/sforce/dataloader/action/visitor/UpsertVisitor.java:73: cannot find symbol
    [javac] symbol  : class UpsertResult
    [javac] location: class com.sforce.dataloader.action.visitor.UpsertVisitor
    [javac]         UpsertResult upsertRes = (UpsertResult) results[i];
    [javac]                                   ^
    [javac] /usr/local/sforcedataloader/src/com/sforce/dataloader/ui/ExternalIdPage.java:130: cannot find symbol
    [javac] symbol  : method getExternalId()
    [javac] location: class com.sforce.soap.partner.Field
    [javac]             Boolean isExternalId = field.getExternalId();
    [javac]                                         ^
    [javac] 8 errors

 

BUILD FAILED
/usr/local/sforcedataloader/build/build.xml:68: Compile failed; see the compiler error output for details.