You need to sign in to do that
Don't have an account?
Error while running WSC - 18 jar file for BULK API
Hi All,
:smileysad::smileysad:
I am trying to use Bulk API instead of dataloader for loading bulk data into salesforce.
In Bulk API Developer's Guide , The following steps are mentioned to create a JAR file
of partner wsdl using wsc-18.jar file and to include both the jar files in library.
To download the Salesforce.com WSC toolkit:
1. Browse to http://code.google.com/p/sfdc-wsc/
2. Click the Downloads tab.
3. Click the wsc-18.jar link and save the file to a local directory.
The Bulk API does not provide a login operation, so you must use the SOAP Web services API to login.
To download the partner WSDL and compile it to Java classes with the WSC toolkit:
1. Log in to your Developer Edition Salesforce.com account. You must log in as an administrator or as a user who has the
“Modify All Data” permission. Logins are checked to ensure they are from a known IP address. For more information,
see “Setting Login Restrictions” in the Salesforce.com online help.
2. Navigate to Setup ? Develop ? API.
3. Right-click Partner WSDL to display your browser's save options, and save the partner WSDL to a local directory. For
information about the partner WSDL, see Using the Partner WSDL.
4. Compile the partner API code from the WSDL using the WSC compile tool:
java -classpath pathToJar\wsc.jar com.sforce.ws.tools.wsdlc pathToWSDL\wsdlFilename
.\wsdlGenFiles.jar
For example, if wsc.jar is installed in C:\salesforce\wsc, and the partner WSDL is saved to
C:\salesforce\wsdl\partner:
java -classpath C:\salesforce\wsc\wsc-18.jar com.sforce.ws.tools.wsdlc
C:\salesforce\wsdl\partner\partner.wsdl .\partner.jar
wsc.jar and the generated partner.jar are the only libraries needed in the classpath for the code examples in the
following sections.
Now when i try running the wsc-18 jar file in jdk1.6 using commandprompt or eclipse , its throwing the exception -
java.lang.ClassFormatError: LVTT entry for 'ent' in class file com/sforce/ws/transport/JdkHttpTransport does not match any LVT entry
at java.lang.ClassLoader.defineClass1(Native Method)
(JdkHttpTransport is a class in com.sforce.ws.transport package of wsc-18 jar)
if i run the wsc-18 jar in jdk1.5 , its throwing the exception - java.lang.unsupportedclassversionerror.
Please help me in solving this issue.
:smileysad:
TIA
- Sushupsi
I just tried this out using
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)
on linux and it worked fine. Which JDK, OS are you using?
Thanks for replying.
My java version was
java version "1.6.0_12"
Java<TM> SE Runtime Environment <build 1.6.0_12-b04>
Java HotSpot<TM> Client VM <build 11.2-b01 , mixed mode, sharing>
Now i upgraded it to
java version "1.6.0_14"
javatm> SE Runtime Environment <build 1.6.0_14-b08>
java HotSpot<TM> Client VM <build 14.0-b16 , mixed mode, sharing>
OS - Windows xp professional 2002
but still am getting the same error.I am using netbeans 6.5 to run the class.I have included all jar files(wsc-17_0,partner-bulk-loader.jar,opencsv2.1.jar,tools.jar) in the library.
Should i upgrade the java to the version which you use?
Thanks,
Sushupsi
This is for MAC, format may change for Windows. This is what worked for me
- Downloaded below jar files in download folder
force-wsc-39.0.0.jar http://mvnrepository.com/artifact/com.force.api/force-wsc
rhino1.7.7/js.jar https://developer.mozilla.org/en-US/docs/Rhino/Download_Rhino
ST-4.0.8.jar http://www.stringtemplate.org/download.html (http://http://www.stringtemplate.org/download.html)
jackson-core-asl.jar http://mvnrepository.com/artifact/org.codehaus.jackson/jackson-core-asl/1.9.13 (http://mvnrepository.com/artifact/org.codehaus.jackson/jackson-core-asl/1.9.13 )
jackson-mapper-asl.jar http://mvnrepository.com/artifact/org.codehaus.jackson/jackson-mapper-asl/1.9.13
- Ran this script in command prompt (pay attention to dots, blank space and colon!!!)
java -classpath force-wsc-39.0.0.jar:rhino1.7.7/js.jar:ST-4.0.8.jar:. com.sforce.ws.tools.wsdlc ./partner.wsdl.xml ./partner.jar
- Imported below jar files in the project
partner.jar (created from above script)
force-wsc-39.0.0.jar
2 jackson jar files (link above)
All my files were in download folder and I changed the folder in command prompt to point to that one. And it worked!
Salesforce guide: https://developer.salesforce.com/docs/atlas.en-us.salesforce_developer_environment_tipsheet.meta/salesforce_developer_environment_tipsheet/salesforce_developer_environment_wsc.htm
However, I get the below error while converting tooling.wdsl to tooling.jar
C:\Users\madhuri.patil\AppData\Local\Temp\wsc-scratch7575966558443779900tmp\com\
sforce\soap\tooling\sobject\AuraDefinition.java:29: error: cannot find symbol
public void setAuraDefinitionBundle(com.sforce.soap.tooling.sobject.AuraDefi
nitionBundle AuraDefinitionBundle) {
^
symbol: class AuraDefinitionBundle
location: package com.sforce.soap.tooling.sobject
3 errors
Error: Failed to compile
Please let me know if there's any workaround for this